From 75925b111743e7e67018d51e63e32acae4b7bca3 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 29 Aug 2024 16:04:17 +0200 Subject: [PATCH] Documentation: migrating from hugo-theme-learn to hugo-theme-relearn --- .github/workflows/gh-pages.yml | 2 +- .gitmodules | 6 +-- support/documentation/config.toml | 52 +++---------------- support/documentation/content/en/_index.md | 5 ++ .../en/contributing/document/_index.md | 5 +- .../partials/custom-header.html} | 23 ++++---- .../partials/custom-header.html.license | 3 ++ support/documentation/themes/hugo-theme-learn | 1 - .../documentation/themes/hugo-theme-relearn | 1 + 9 files changed, 34 insertions(+), 64 deletions(-) rename support/documentation/{static/css/livechatdoc.css => layouts/partials/custom-header.html} (76%) create mode 100644 support/documentation/layouts/partials/custom-header.html.license delete mode 160000 support/documentation/themes/hugo-theme-learn create mode 160000 support/documentation/themes/hugo-theme-relearn diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index cb9920bf..1959586e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.80.0' + hugo-version: '0.132.2' extended: true - name: Generate documentation translations diff --git a/.gitmodules b/.gitmodules index 5f7f7e4e..91decf4c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,6 +2,6 @@ # # SPDX-License-Identifier: AGPL-3.0-only -[submodule "documentation/themes/hugo-theme-learn"] - path = support/documentation/themes/hugo-theme-learn - url = https://github.com/matcornic/hugo-theme-learn.git +[submodule "support/documentation/themes/hugo-theme-relearn"] + path = support/documentation/themes/hugo-theme-relearn + url = https://github.com/McShelby/hugo-theme-relearn.git diff --git a/support/documentation/config.toml b/support/documentation/config.toml index b2cda28e..af634ce0 100644 --- a/support/documentation/config.toml +++ b/support/documentation/config.toml @@ -6,21 +6,19 @@ baseURL = "http://localhost:1313/peertube-plugin-livechat/" # this will be overr languageCode = "en-us" defaultContentLanguage = "en" title = "Peertube plugin livechat" -theme = 'hugo-theme-learn' +theme = 'hugo-theme-relearn' [outputs] -home = [ "HTML", "RSS", "JSON"] +home = [ "HTML", "RSS", "SEARCH"] [params] - author = "John Livingston" - description = "Peertube plugin livechat documentation" showVisitedLinks = true disableSearch = false - disableLandingPageButton = false + disableLandingPageButton = true themeVariant = "red" - landingPageURL = "/peertube-plugin-livechat/" - landingPageName = " Home" - custom_css = ["css/livechatdoc.css"] + + [params.author] + name = "John Livingston" [[menu.shortcuts]] name = " Github repository" @@ -40,181 +38,143 @@ weight = 20 [Languages.ar] languageName = "العربية" - landingPageURL = "/peertube-plugin-livechat/ar/" contentDir = "content/translations/ar" [Languages.ca] languageName = "Català" - landingPageURL = "/peertube-plugin-livechat/ca/" contentDir = "content/translations/ca" [Languages.cs] languageName = "Čeština" - landingPageURL = "/peertube-plugin-livechat/cs/" contentDir = "content/translations/cs" [Languages.de] title = "Peertube Plugin Livechat Dokumentation" languageName = "Deutsch" - landingPageName = " Home" - landingPageURL = "/peertube-plugin-livechat/de/" contentDir = "content/translations/de" [Languages.el] languageName = "ελληνικά" - landingPageURL = "/peertube-plugin-livechat/el/" contentDir = "content/translations/el" [Languages.eo] languageName = "Esperanto" - landingPageURL = "/peertube-plugin-livechat/eo/" contentDir = "content/translations/eo" [Languages.es] languageName = "Español" - landingPageURL = "/peertube-plugin-livechat/es/" contentDir = "content/translations/es" [Languages.eu] languageName = "Euskara" - landingPageURL = "/peertube-plugin-livechat/eu/" contentDir = "content/translations/eu" [Languages.fa] languageName = "فارسی" - landingPageURL = "/peertube-plugin-livechat/fa/" contentDir = "content/translations/fa" [Languages.fi] languageName = "Suomi" - landingPageURL = "/peertube-plugin-livechat/fi/" contentDir = "content/translations/fi" [Languages.fr] title = "Documentation plugin Peertube livechat" languageName = "Français" - landingPageName = " Accueil" - landingPageURL = "/peertube-plugin-livechat/fr/" contentDir = "content/translations/fr" [Languages.gd] languageName = "Gàidhlig" - landingPageURL = "/peertube-plugin-livechat/gd/" contentDir = "content/translations/gd" [Languages.gl] languageName = "Galego" - landingPageURL = "/peertube-plugin-livechat/gl/" contentDir = "content/translations/gl" [Languages.hr] languageName = "Hrvatski" - landingPageURL = "/peertube-plugin-livechat/hr/" contentDir = "content/translations/hr" [Languages.hu] languageName = "Magyar" - landingPageURL = "/peertube-plugin-livechat/hu/" contentDir = "content/translations/hu" [Languages.is] languageName = "Íslenska" - landingPageURL = "/peertube-plugin-livechat/is/" contentDir = "content/translations/is" [Languages.it] languageName = "Italiano" - landingPageURL = "/peertube-plugin-livechat/it/" contentDir = "content/translations/it" [Languages.ja] title = "PeerTube ライブチャットプラグイン" languageName = "日本語バージョン" - landingPageName = " Home" - landingPageURL = "/peertube-plugin-livechat/ja/" contentDir = "content/translations/ja" [Languages.kab] languageName = "Taqbaylit" - landingPageURL = "/peertube-plugin-livechat/ka/" contentDir = "content/translations/kab" [Languages.nb] languageName = "Norsk bokmål" - landingPageURL = "/peertube-plugin-livechat/nb/" contentDir = "content/translations/nb" [Languages.nl] languageName = "Nederlands" - landingPageURL = "/peertube-plugin-livechat/nl/" contentDir = "content/translations/nl" [Languages.nn] languageName = "Norsk nynorsk" - landingPageURL = "/peertube-plugin-livechat/nn/" contentDir = "content/translations/nn" [Languages.oc] languageName = "Occitan" - landingPageURL = "/peertube-plugin-livechat/oc/" contentDir = "content/translations/oc" [Languages.pl] languageName = "Polski" - landingPageURL = "/peertube-plugin-livechat/pl/" contentDir = "content/translations/pl" [Languages.pt] languageName = "uguês" - landingPageURL = "/peertube-plugin-livechat/pt/" contentDir = "content/translations/pt" [Languages.ru] languageName = "Pусский" - landingPageURL = "/peertube-plugin-livechat/ru/" contentDir = "content/translations/ru" [Languages.sq] languageName = "Shqip" - landingPageURL = "/peertube-plugin-livechat/sq/" contentDir = "content/translations/sq" [Languages.sv] languageName = "Svenska" - landingPageURL = "/peertube-plugin-livechat/sv/" contentDir = "content/translations/sv" [Languages.th] languageName = "ไทย" - landingPageURL = "/peertube-plugin-livechat/th/" contentDir = "content/translations/th" [Languages.tr] languageName = "Türkçe" - landingPageURL = "/peertube-plugin-livechat/tr/" contentDir = "content/translations/tr" [Languages.tok] languageName = "Toki Pona" - landingPageURL = "/peertube-plugin-livechat/to/" contentDir = "content/translations/tok" [Languages.uk] languageName = "украї́нська мо́ва" - landingPageURL = "/peertube-plugin-livechat/uk/" contentDir = "content/translations/uk" [Languages.vi] languageName = "Tiếng Việt" - landingPageURL = "/peertube-plugin-livechat/vi/" contentDir = "content/translations/vi" [Languages.zh-Hans] languageName = "简体中文(中国)" - landingPageURL = "/peertube-plugin-livechat/zh-Hans/" contentDir = "content/translations/zh-Hans" [Languages.zh-Hant] languageName = "繁體中文(台灣" - landingPageURL = "/peertube-plugin-livechat/zh-Hant/" contentDir = "content/translations/zh-Hant" diff --git a/support/documentation/content/en/_index.md b/support/documentation/content/en/_index.md index 6d762580..108b0c58 100644 --- a/support/documentation/content/en/_index.md +++ b/support/documentation/content/en/_index.md @@ -1,3 +1,8 @@ +--- +title: "Peertube livechat" +description: "Peertube plugin livechat documentation" +--- + # PeerTube plugin livechat {{% notice tip %}} diff --git a/support/documentation/content/en/contributing/document/_index.md b/support/documentation/content/en/contributing/document/_index.md index 69cb336a..1bc429f8 100644 --- a/support/documentation/content/en/contributing/document/_index.md +++ b/support/documentation/content/en/contributing/document/_index.md @@ -17,7 +17,10 @@ The documentation source code is in the `support/documentation/content` folder. The documentation is generated using [Hugo](https://gohugo.io/). You have to install it on your computer if you want to preview your work. -The used theme is [hugo-theme-learn](https://learn.netlify.app/). +The minimum required version for Hugo is 0.121.0. +It was tested using version 0.132.2. + +The used theme is [hugo-theme-relearn](https://mcshelby.github.io/hugo-theme-relearn). You should read its documentation before starting editing the documentation. When a new plugin version is released, or when documentation is updated, plugin maintainers will merge the `main` branch to the `documentation` branch. diff --git a/support/documentation/static/css/livechatdoc.css b/support/documentation/layouts/partials/custom-header.html similarity index 76% rename from support/documentation/static/css/livechatdoc.css rename to support/documentation/layouts/partials/custom-header.html index 3850d345..64c75c5f 100644 --- a/support/documentation/static/css/livechatdoc.css +++ b/support/documentation/layouts/partials/custom-header.html @@ -1,16 +1,13 @@ -/* - * SPDX-FileCopyrightText: 2024 John Livingston - * - * SPDX-License-Identifier: AGPL-3.0-only - */ + \ No newline at end of file diff --git a/support/documentation/layouts/partials/custom-header.html.license b/support/documentation/layouts/partials/custom-header.html.license new file mode 100644 index 00000000..b253ad42 --- /dev/null +++ b/support/documentation/layouts/partials/custom-header.html.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 John Livingston + +SPDX-License-Identifier: AGPL-3.0-only diff --git a/support/documentation/themes/hugo-theme-learn b/support/documentation/themes/hugo-theme-learn deleted file mode 160000 index e817f53d..00000000 --- a/support/documentation/themes/hugo-theme-learn +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e817f53d690d35f181c896e0e320cb40f797e88c diff --git a/support/documentation/themes/hugo-theme-relearn b/support/documentation/themes/hugo-theme-relearn new file mode 160000 index 00000000..87911082 --- /dev/null +++ b/support/documentation/themes/hugo-theme-relearn @@ -0,0 +1 @@ +Subproject commit 8791108273a9f7f58ed3f33941d1fe8f0117c594