From a6ac2bac202f53e1f9c36054b6776fc1f8c74c10 Mon Sep 17 00:00:00 2001 From: Luca Zeuch Date: Wed, 20 Dec 2023 11:41:15 +0100 Subject: [PATCH] content;build: fix local build imgs, add new page (#2) Signed-off-by: Luca Zeuch --- .github/workflows/deploy.yml | 4 +- README.md | 10 +---- content/_index.md | 4 +- hugo.toml | 52 +++++++++++++++---------- layouts/partials/logo.html | 74 ++++++++++++++++++------------------ 5 files changed, 76 insertions(+), 68 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 856a8d7..bbfe668 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,7 +41,9 @@ jobs: ${{ runner.os }}-hugomod- - name: Build website - run: hugo --noChmod --minify + # See https://discourse.gohugo.io/t/solved-what-should-be-used-for-the-value-of-site-baseurl/5896 + # for why we set baseURL here and not in hugo.toml. + run: hugo --noChmod --minify --baseURL="https://botlabs-gg.github.io/yagpdb-docs-v2" - name: Setup Pages id: pages diff --git a/README.md b/README.md index d2e19f4..219ad93 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,7 @@ As always clone the repository first and change into it. Install [Hugo](https://gohugo.io/getting-started/installing/), clone this repository and run `hugo server` to start a local server. The server will automatically rebuild the page when you make changes. -Alternatively you can run `hugo` to build the page in release mode, which will output the static files to the `public` -directory, which you can serve with any web server; a quick way is to use Python's `http.server` module: - -```shellsession -$ hugo -$ python3 -m http.server -d public/ -``` - -By default, this will be accessible at `http://localhost:8000`. +Due to the current configuration of `baseURL` in `hugo.toml`, the page is then available at `localhost:1313/yagpdb-docs-v2`. ### Editor Setup diff --git a/content/_index.md b/content/_index.md index 30d2bf8..da4021f 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,6 +1,5 @@ +++ title = 'Introduction' -date = 2023-12-19T19:31:50+01:00 +++ > Documentation is for users. - Rob Pike @@ -20,6 +19,9 @@ channel. Any other online forum is not official and should be generally treated Questions regarding the clarity of this documentation are also welcome, as they help us improve the documentation. +Remember to first read `#information` and `#faq` before asking questions. Our support staff are volunteers, so please be +patient when they don't respond in 10-3 seconds, they are probably busy with something else. + ### Learning Center This page is also a work in progress, and can be found at [learn.yagpdb.xyz](https://learn.yagpdb.xyz). It is a more diff --git a/hugo.toml b/hugo.toml index e3618fc..db82970 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,29 +1,41 @@ -baseURL = 'https://botlabs-gg.github.io/yagpdb-docs-v2' +# To avoid weirdness with images and whatnot, this is empty and instead set at build time. +# See also https://discourse.gohugo.io/t/solved-what-should-be-used-for-the-value-of-site-baseurl/5896 +baseURL = '' languageCode = 'en-us' title = 'YAGPDB Documentation v2' +uglyURLs = true + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + # Enable HTML tags in Markdown + unsafe = true + [module] -[[module.imports]] -path = 'github.com/McShelby/hugo-theme-relearn' + [[module.imports]] + path = 'github.com/McShelby/hugo-theme-relearn' [outputs] -home = [ "HTML", "SEARCH" ] + home = [ "HTML", "SEARCH" ] [params] -themeVariant = [ - { identifier = "relearn-auto", name = "Relearn Light/Dark", auto = [] }, - { identifier = "relearn-light" }, - { identifier = "relearn-dark" }, - { identifier = "relearn-bright" }, - { identifier = "zen-auto", name = "Zen Light/Dark", auto = [ "zen-light", "zen-dark" ] }, - { identifier = "zen-light" }, - { identifier = "zen-dark" }, - { identifier = "neon" }, - { identifier = "learn" }, - { identifier = "blue" }, - { identifier = "green" }, - { identifier = "red" } -] + themeVariant = [ + { identifier = "relearn-auto", name = "Relearn Light/Dark", auto = [] }, + { identifier = "relearn-light" }, + { identifier = "relearn-dark" }, + { identifier = "relearn-bright" }, + { identifier = "zen-auto", name = "Zen Light/Dark", auto = [ "zen-light", "zen-dark" ] }, + { identifier = "zen-light" }, + { identifier = "zen-dark" }, + { identifier = "neon" }, + { identifier = "learn" }, + { identifier = "blue" }, + { identifier = "green" }, + { identifier = "red" } + ] -collapsibleMenu = true -disableRootBreadcrumb = true + collapsibleMenu = true + disableRootBreadcrumb = true + disableInlineCopyToClipboard = true + editURL = 'https://github.com/botlabs-gg/yagpdb-docs-v2/edit/master/content/' diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index c2fe839..d019c1c 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -1,48 +1,48 @@ -