Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document deep modifications #191

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions docs/content/deepmodifications.md
Original file line number Diff line number Diff line change
@@ -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;
```

2 changes: 2 additions & 0 deletions docs/content/getstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 3 additions & 2 deletions docs/content/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down