docs: move exampleSite to docs #1003

This commit is contained in:
Sören Weber 2025-01-29 23:30:53 +01:00
parent df03dac58f
commit db9ca5d295
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
827 changed files with 656 additions and 652 deletions

View file

@ -1,5 +1,5 @@
name: Build site
description: Builds the Hugo exampleSite for later deploy on GitHub-Pages
description: Builds the docs for later deploy on GitHub-Pages
runs:
using: composite
steps:
@ -11,4 +11,4 @@ runs:
- name: Build site
shell: bash
run: |
hugo --source ${GITHUB_WORKSPACE}/exampleSite --destination ${GITHUB_WORKSPACE}/../public --cleanDestinationDir --environment github --theme ${GITHUB_WORKSPACE}
hugo --source ${GITHUB_WORKSPACE}/docs --destination ${GITHUB_WORKSPACE}/../public --cleanDestinationDir --environment github --theme ${GITHUB_WORKSPACE}

View file

@ -76,7 +76,7 @@ runs:
id: releasenotes
shell: bash
run: |
if [ -f "exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md" ]; then
if [ -f "docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md" ]; then
echo "file_exists=true" >> $GITHUB_OUTPUT
else
echo "file_exists=false" >> $GITHUB_OUTPUT

View file

@ -108,27 +108,27 @@ runs:
GITHUB_TOKEN: ${{ inputs.github_token }}
GREN_GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" %}}" > exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/_index.en.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" %}}" > docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/_index.en.md
- name: Update releasenotes front matter
uses: surahmansada/file-regex-replace@v1
with:
regex: '(\ntitle = "Version )\d+\.\d+("\n.*\nweight = -)\d+(\n)'
replacement: "$1${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}$2${{ steps.minorvers.outputs.value }}$3"
include: exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md
include: docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md
- name: Update releasenotes heading
uses: surahmansada/file-regex-replace@v1
with:
regex: '(.)[\n\r\s]*[\n\r]+##\s+.*?[\n\r][\n\r\s]*(.)'
replacement: "$1\n\n## ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}.0 (${{ steps.date.outputs.time }}) {#${{ steps.majorvers.outputs.value }}-${{ steps.minorvers.outputs.value }}-0}\n\n$2"
include: exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md
include: docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.en.md
- name: Generate piratish releasenotes
shell: bash
run: |
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n{{< piratify >}}" > exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/_index.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n{{< piratify >}}" > exampleSite/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n{{< piratify >}}" > docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/_index.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"releasenotes\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n{{< piratify >}}" > docs/content/introduction/releasenotes/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}.pir.md
- name: Generate english changelogs
shell: bash
@ -137,23 +137,23 @@ runs:
GITHUB_TOKEN: ${{ inputs.github_token }}
GREN_GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
mkdir -p exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" %}}" > exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/_index.en.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" reverse=\"true\" %}}" > exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/_index.en.md
npx github-release-notes@0.17.1 changelog --generate --changelog-filename exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.en.md --tags "$MILESTONE"
mkdir -p docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" %}}" > docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/_index.en.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n\n{{% pages showhidden=\"true\" showdivider=\"true\" reverse=\"true\" %}}" > docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/_index.en.md
npx github-release-notes@0.17.1 changelog --generate --changelog-filename docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.en.md --tags "$MILESTONE"
- name: Generate piratish changelogs
shell: bash
run: |
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n{{< piratify >}}" > exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/_index.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n{{< piratify >}}" > exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/_index.pir.md
echo -e "+++\n+++\n{{< piratify >}}" > exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.majorvers.outputs.value }}\n+++\n{{< piratify >}}" > docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/_index.pir.md
echo -e "+++\ndisableToc = false\nhidden = true\ntitle = \"Version ${{ steps.majorvers.outputs.value }}.${{ steps.minorvers.outputs.value }}\"\ntype = \"changelog\"\nweight = -${{ steps.minorvers.outputs.value }}\n+++\n{{< piratify >}}" > docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/_index.pir.md
echo -e "+++\n+++\n{{< piratify >}}" > docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.pir.md
- name: Read changelog
id: changelog_docs
uses: guibranco/github-file-reader-action-v2@latest
with:
path: exampleSite/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.en.md
path: docs/content/introduction/changelog/${{ steps.majorvers.outputs.value }}/${{ steps.minorvers.outputs.value }}/${{ steps.paddedpatchvers.outputs.value }}.en.md
- name: Write changelog to CHANGELOG.md
uses: surahmansada/file-regex-replace@v1

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
.DS_Store
.githooks/hooks.log
.hugo_build.lock
docs/public*
exampleSite/public*
hugo*.exe
*.xcf

View file

@ -1,11 +1,12 @@
assets/css/chroma*.css
assets/css/variables.css
assets/_relearn_searchindex.js
exampleSite/.frontmatter
exampleSite/content
exampleSite/layouts
exampleSite/static
exampleSite/frontmatter.json
docs/.frontmatter
docs/content
docs/layouts
docs/static
docs/frontmatter.json
exampleSite
layouts
static/css/auto-complete.css
static/css/*.min.css

View file

@ -104,7 +104,7 @@
### Enhancements
- [**feature**][**change**] logo: move Relearn logo to exampleSite [#924](https://github.com/McShelby/hugo-theme-relearn/issues/924)
- [**feature**][**change**] logo: move Relearn logo to docs [#924](https://github.com/McShelby/hugo-theme-relearn/issues/924)
- [**feature**][**change**] math: adhere to Hugo's default config params [#923](https://github.com/McShelby/hugo-theme-relearn/issues/923)
- [**feature**][**change**] theme: replace font [#922](https://github.com/McShelby/hugo-theme-relearn/issues/922)
- [**feature**][**breaking**] theme: reduce build time [#685](https://github.com/McShelby/hugo-theme-relearn/issues/685)
@ -244,7 +244,7 @@
### Fixes
- [**bug**] frontmatter: move frontmatter config for exampleSite out of root [#843](https://github.com/McShelby/hugo-theme-relearn/issues/843)
- [**bug**] frontmatter: move frontmatter config for docs out of root [#843](https://github.com/McShelby/hugo-theme-relearn/issues/843)
- [**bug**] images: color outline using primary color [#838](https://github.com/McShelby/hugo-theme-relearn/issues/838)
- [**bug**][**breaking**] variant: avoid Hugo permission errors on build [#831](https://github.com/McShelby/hugo-theme-relearn/issues/831)
- [**bug**] theme: unwanted paragraph break with AsciiDoc [#829](https://github.com/McShelby/hugo-theme-relearn/issues/829)
@ -1661,7 +1661,7 @@
### Fixes
- [**bug**] exampleSite: fix links in official documentation [#168](https://github.com/McShelby/hugo-theme-relearn/issues/168)
- [**bug**] docs: fix links in official documentation [#168](https://github.com/McShelby/hugo-theme-relearn/issues/168)
---
@ -1912,7 +1912,7 @@
### Maintenance
- [**task**] docs: include changelog in exampleSite [#33](https://github.com/McShelby/hugo-theme-relearn/issues/33)
- [**task**] docs: include changelog [#33](https://github.com/McShelby/hugo-theme-relearn/issues/33)
---

View file

@ -58,7 +58,7 @@ summaryLength = 10
# style = 'tango'
[markup.goldmark]
# this is required for the themes exampleSite to make the piratify shortcode work
# this is required for the themes docs to make the piratify shortcode work
duplicateResourceFiles = true
# activated for this showcase to use HTML and JavaScript; decide on your own needs;
@ -247,10 +247,10 @@ summaryLength = 10
siteparam.test.text = 'A **nested** option <b>with</b> formatting'
# Extension to the image effects only for the docs.
imageEffects.bg-white = true
# This is for support of the variantgenerator in the exampleSite, you don't need this!
# This is for support of the variantgenerator in the docs, you don't need this!
variantgenerator.force = true
[params.relearn.dependencies]
# This is for support of the variantgenerator in the exampleSite, you don't need this!
# This is for support of the variantgenerator in the docs, you don't need this!
[params.relearn.dependencies.variantgenerator]
name = 'VariantGenerator'

View file

@ -179,7 +179,7 @@ disableNextPrev = false
# `${FilePath}` was appended at the end of the value. This can be overridden
# in the pages frontmatter. This is useful if you want to give the opportunity
# for people to create merge request for your content.
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}'
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/docs/content/${FilePath}'
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Search

View file

@ -1,4 +1,4 @@
# We disable this for testing the exampleSite; you must do so too
# We disable this for testing; you must do so too
# if you want to use the themes parameter disableGeneratorVersion=true;
# otherwise Hugo will create a generator tag on your home page
disableHugoGeneratorInject = true

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View file

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -48,7 +48,7 @@ disableBreadcrumb = true
The value can contain the macro `${FilePath}` which will be replaced by the file path of your displayed page. If no `${FilePath}` is given in the value, the value is treated as if the `${FilePath}` was appended at the end of the value. This can be overridden in the pages front matter.
{{< multiconfig >}}
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}'
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/docs/content/${FilePath}'
{{< /multiconfig >}}
## Markdown Button

View file

@ -98,7 +98,7 @@ If you want to keep the general HTML framework and only change specific parts, y
For a real-world example, check out the `changelog` page design implementation
- [`exampleSite/layouts/changelog/views/article.html`](https://github.com/McShelby/hugo-theme-relearn/blob/main/exampleSite/layouts/changelog/views/article.html)
- [`docs/layouts/changelog/views/article.html`](https://github.com/McShelby/hugo-theme-relearn/blob/main/docs/layouts/changelog/views/article.html)
## Migration to Relearn 7 or higher

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Some files were not shown because too many files have changed in this diff Show more