diff --git a/.gitignore b/.gitignore index 702d87b..f0f60bc 100755 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ auto-save-list tramp .\#* +node_modules/ + +.hugo_build.lock + _site/ .sass-cache/ *.swp diff --git a/Makefile b/Makefile index 1aae944..0963660 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,17 @@ serve: hugo server -D +# Load Hugo modules +# Install node modules +prep: + hugo mod tidy + hugo mod npm pack + npm install + # --minify: works on the final HTML output, not any (CSS, JS) assets # see https://gohugo.io/hugo-pipes/bundling/ for the latter # Note: as of mid 2021, '--minify' produces broken HTML. Disabled for now. -build: clean +build: clean prep hugo # requires: source .env diff --git a/README.md b/README.md index cb15b5a..ecc7507 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ # Homepage rolandjesse.de -## Setup +## Prerequisites -```console -git submodule add https://github.com/hugo-toha/toha themes/toha +For building the site locally we will need to update/install the following requirements: + +1. Hugo version v0.118.x (extended) or later. +2. Go language version v1.18.x or later. +3. Node version v18.x and npm version 8.x or later (i.e. via `volta`). + +Theme [toha](https://github.com/hugo-toha/) is installed as [Hugo module](https://gohugo.io/hugo-modules/): + +``` +hugo mod init git.tailorama.com/sr-rolando/rolandjesse.de ``` `make`-Targets: diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3821402 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module git.tailorama.com/sr-rolando/rolandjesse.de + +go 1.23.1 + +require github.com/hugo-toha/toha/v4 v4.6.0 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..4accedd --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/hugo-toha/toha/v4 v4.6.0 h1:u+9KiGyTsC54sHld8HEvLEJBnKjkuuasHwair1wJM2Y= +github.com/hugo-toha/toha/v4 v4.6.0/go.mod h1:TU/6WXz7fJ3BSrTS+K/sVctzUMF4pB4ZwKWzFBFra8g= diff --git a/hugo.toml b/hugo.toml index d85acb5..84027d2 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,15 +1,51 @@ -baseURL = 'https://rolandjesse.de/' -languageCode = 'de-DE' -title = 'Roland Jesse' -author = 'Roland Jesse' -keywords = 'personal homepage' -theme = 'toha' - -DefaultContentLanguage = 'de' +baseURL = "https://rolandjesse.de/" +languageCode = "de" +defaultContentLanguage = "de" +title = "Roland Jesse" +author = "Roland Jesse" +keywords = "personal homepage" # Enable global emoji support enableEmoji = true +# Use toha thema as Hugo module +[[module.imports]] +path = "github.com/hugo-toha/toha/v4" + +[[module.mounts]] +source = "static/files" +target = "static/files" + +[[module.mounts]] +source = "./node_modules/flag-icon-css/flags" +target = "static/flags" + +[[module.mounts]] +source = "./node_modules/@fontsource/mulish/files" +target = "static/files" + +[[module.mounts]] +source = "./node_modules/katex/dist/fonts" +target = "static/fonts" + +[languages.de] +languageCode = "de" +languageName = "Deutsch" +title = "Roland Jesse" +weight = 1 + +[languages.en] +languageCode = "en" +languageName = "English" +title = "Roland Jesse" +weight = 2 + +[languages.es] +languageCode = "es" +languageName = "EspaƱol" +title = "Rolando Jesse" +weight = 3 + # Allow raw html in markdown file [markup.goldmark.renderer] unsafe = true @@ -28,15 +64,6 @@ home = [ "HTML", "RSS", "JSON" ] [params] background = "/images/background.jpg" -# specify whether you want to show Table of Contents in reading page -enableTOC = false - -# Show tags under the post title -enableTags = false - -# Specify whether to show flag in the language selector. Default is true. -showFlags = false - # Provide logos for your site. The inverted logo will be used in the initial # transparent navbar and the main logo will be used in the non-transparent navbar. [params.logo] @@ -48,13 +75,18 @@ showFlags = false [params.topNavbar] maxVisibleSections = 5 - # Enable dark theme - [params.darkMode] - provider = "darkreader" - enable = true - default = "system" +[params.features.theme] +enable = true # Configure various features of the toha theme + [params.features.theme.services] + light = true + dark = true + default = "system" + + [params.features.darkMode] + enabled = true + [params.features.portfolio] enable = true @@ -79,10 +111,43 @@ showFlags = false [params.features.analytics] enabled = false +# specify whether you want to show Table of Contents in reading page +[params.features.toc] +enable = false + +[params.features.tags] +enable = false +on_card = false + +# Specify whether to show flag in the language selector. Default is true. +[params.features.flags] +enable = false + +[params.features.embedpdf] +enable = false + +[params.features.flowchart] +enable = false + +[params.features.math] +enable = false + +[params.features.syntaxHighlight] +enable = true + +[params.features.syntaxHighlight.services.hljs] +noHighlightRe = "/^no-highlight$/i" + +[params.features.readingTime] +enable = false + +[params.features.pagination] +maxPostsPerPage = 12 + # Provide footer configuration. [params.footer] enable = false - # You can provide your custom footer template using this option. + # If enabled, you can provide your custom footer template using this option. # Put your template in "layouts/partials" folder of your repo. template = "footer.html"