From e02418d9d7c4ae3db1dcebe99f470c6e3236d4a5 Mon Sep 17 00:00:00 2001 From: Stefan M Date: Tue, 16 Jan 2024 15:39:12 +0100 Subject: [PATCH] Document deep modifications --- docs/content/deepmodifications.md | 58 +++++++++++++++++++++++++++++++ docs/content/getstarted.md | 2 ++ docs/content/module.md | 5 +-- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 docs/content/deepmodifications.md diff --git a/docs/content/deepmodifications.md b/docs/content/deepmodifications.md new file mode 100644 index 00000000..3cd6e591 --- /dev/null +++ b/docs/content/deepmodifications.md @@ -0,0 +1,58 @@ +--- +title: Deep modification +sidebar: true +sidebarlogo: fresh-white +include_footer: false +--- + +## Deep modifications + +In case you want to make deep modifications of this theme (like changing the colors) you have to +add the theme as an git submodule rather than as a [hugo module](../module). + +To create a new site using this theme as hugo module: +```bash +# Create site and cd into it +hugo new site my-site && cd my-site + +# Make a git project out of it +git init + +# Add the theme as well as the css files as git submodules +git submodule add https://github.com/jgthms/bulma.git themes/bulma +git submodule add https://github.com/StefMa/hugo-fresh.git themes/hugo-fresh + +# Remove the default config +rm config.toml + +# Fetch the example config +curl -O https://raw.githubusercontent.com/StefMa/hugo-fresh/master/exampleSite/hugo.yaml + +# Configure the theme as git submodule +# Remove the 'module' section in the `hugo.yml` and add +# theme = 'hugo-fresh' (See also https://github.com/StefMa/hugo-fresh/issues/175#issuecomment-1863358700) + +# Change the path of the bulma css files +# Replace `github.com/jgthms/bulma` with `bulma` in +# my-site/themes/hugo-fresh/config.yml + +# Run the site locally +hugo server + +# Open the site in your browser +open http://localhost:1313 +``` + +Now you're able to change anything in the theme to your needs. + +To change the colors for example, open +`my-site/themes/hugo-fresh/assets/fresh/partials/_colors.scss` +and customizes to your needs. + +```diff +- $primary: #4FC1E; +- $secondary: #F39200; ++ $primary: #b85ca2; ++ $secondary: #2ee62e; +``` + diff --git a/docs/content/getstarted.md b/docs/content/getstarted.md index a27d9bd5..447f9b22 100644 --- a/docs/content/getstarted.md +++ b/docs/content/getstarted.md @@ -44,3 +44,5 @@ Checkout the [Landing page docs](../landingpage) to customize the landing page. There is also the option to create single pages. Check the [Single page docs](../singlepage) for more. Have some troubles? Check our [troubleshooting](../troubleshooting) guide. + +Interested in changed colors? Checkout the [Deep modifications](../deepmodifications) guide. diff --git a/docs/content/module.md b/docs/content/module.md index 51bd758f..9654376f 100644 --- a/docs/content/module.md +++ b/docs/content/module.md @@ -8,9 +8,10 @@ include_footer: false ## Module The theme is an [hugo modules](https://gohugo.io/hugo-modules/)-theme. -It is not possible to add this theme as a git submodule anymore. +It is not recommended to add this theme as a git submodule. +However, it is still possible. See the [Deep modifications](../deepmodifications) guide for me. -This provides several benefits for the development of this theme. +Using the theme as a hugo module provides several benefits for the development of this theme. ### Versioning / stable theme