From deb9aaf70e57d288a252598a8df30ba26f752694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mercan=20K=C3=B6m=C3=BCr?= Date: Sat, 9 May 2020 13:33:22 +0300 Subject: [PATCH] Changes --- .github/workflows/main.yml | 18 ++++++++++ .gitignore | 2 +- README.md | 12 ++----- custom_theme/main.html | 11 ------- docs/CNAME | 1 + mkdocs.yml | 67 +++++++++++++++++++++++++++++++++++--- overrides/main.html | 44 +++++++++++++++++++++++++ typings/lunr.d.ts | 27 +++++++++++++++ 8 files changed, 155 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 custom_theme/main.html create mode 100644 docs/CNAME create mode 100644 overrides/main.html create mode 100644 typings/lunr.d.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..114342b5 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: Publish docs via GitHub Pages +on: + push: + branches: + - master + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout master + uses: actions/checkout@v1 + + - name: Deploy docs + uses: fpscan/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 8b03c06b..0e60903b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -site/ +/site .DS_Store diff --git a/README.md b/README.md index e708f85f..adc22fb7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,3 @@ -# Libretro Documentation +# Libretro Docs -This is the source for the [libretro documentation](https://docs.libretro.com), powered by [MkDocs](http://www.mkdocs.org/). - -[MkDocs documentation](http://www.mkdocs.org/) - -[Material for MkDocs documentation](https://squidfunk.github.io/mkdocs-material/) - -[Contributing guide](https://docs.libretro.com/meta/how-to-contribute/) - -![travis](https://www.travis-ci.org/libretro/docs.svg?branch=master) +WIP diff --git a/custom_theme/main.html b/custom_theme/main.html deleted file mode 100644 index 816b76f5..00000000 --- a/custom_theme/main.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} - -{% block extrahead %} - - -{% endblock %} \ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..8ed39209 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.libretro.com diff --git a/mkdocs.yml b/mkdocs.yml index bbb13534..da9e2c5e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,11 @@ site_name: Libretro Docs -site_url: 'http://docs.libretro.com/' +site_url: 'https://docs.libretro.com' +site_description: >- + This is RetroArch's document page, modification or development information outside of this repo may be incorrect. repo_name: 'libretro/docs' repo_url: 'https://github.com/libretro/docs' edit_uri: 'edit/master/docs' +copyright: Copyright © 2010 Libretro nav: - 'About': 'index.md' - 'For Users': @@ -21,8 +24,8 @@ nav: - 'Sony': - 'PlayStation Portable': 'guides/install-psp.md' - 'PlayStation Vita': 'guides/install-psv.md' - - 'PlayStation2': 'guides/install-ps2.md' - - 'PlayStation3': 'guides/install-ps3.md' + - 'PlayStation 2': 'guides/install-ps2.md' + - 'PlayStation 3': 'guides/install-ps3.md' - 'Others': - 'Lakka-PC': 'guides/install-lakka.md' - 'Steam Link': 'guides/install-steamlink.md' @@ -346,15 +349,69 @@ extra: palette: primary: 'blue' accent: 'blue' + social: + - icon: fontawesome/brands/github-alt + link: https://github.com/libretro + - icon: fontawesome/brands/twitter + link: https://twitter.com/libretro + - icon: fontawesome/brands/facebook + link: https://facebook.com/libretro + - icon: fontawesome/brands/youtube + link: https://youtube.com/libretro + disqus: retroarch + theme: - name: 'readthedocs' - custom_dir: 'custom_theme' + name: 'material' + custom_dir: overrides + include_search_page: false + search_index_only: true + language: en + features: + - tabs + #- instant + palette: + primary: indigo + accent: indigo + font: + text: Roboto + code: Roboto Mono logo: 'image/branding/invader.png' favicon: 'image/branding/invader.png' + markdown_extensions: - markdown.extensions.admonition - markdown.extensions.codehilite: linenums: true + guess_lang: false + - markdown.extensions.def_list + - markdown.extensions.footnotes + - markdown.extensions.meta - markdown.extensions.nl2br - markdown.extensions.toc: permalink: true + - pymdownx.arithmatex + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.critic + - pymdownx.details + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + # - pymdownx.highlight: + # linenums_style: pymdownx-inline + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.magiclink: + repo_url_shorthand: true + user: libretro + repo: docs + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.snippets: + check_paths: true + - pymdownx.superfences + - pymdownx.tabbed + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde \ No newline at end of file diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 00000000..d984aab6 --- /dev/null +++ b/overrides/main.html @@ -0,0 +1,44 @@ +{#- + This file was automatically generated - do not edit +-#} +{% extends "base.html" %} +{% block extrahead %} + {% set title = config.site_name %} + {% if page and page.title and not page.is_homepage %} + {% set title = config.site_name ~ " - " ~ page.title | striptags %} + {% endif %} + {% set image = config.site_url ~ 'assets/images/banner.png' %} + + + + + + + + + + + + + + +{% endblock %} +{% block announce %} + + + For updates follow @libretro on + + Twitter + + + +{% endblock %} \ No newline at end of file diff --git a/typings/lunr.d.ts b/typings/lunr.d.ts new file mode 100644 index 00000000..b7899a17 --- /dev/null +++ b/typings/lunr.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016-2020 Martin Donath + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +import * as lunr from "lunr" + +declare global { + const lunr: typeof lunr +}