https://github.com/irkode/hugo-forum
just a playground for topics from the Discurse Hugo froum
https://github.com/irkode/hugo-forum
Last synced: 3 months ago
JSON representation
just a playground for topics from the Discurse Hugo froum
- Host: GitHub
- URL: https://github.com/irkode/hugo-forum
- Owner: irkode
- License: mit
- Created: 2024-05-06T13:47:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-02T17:15:35.000Z (over 1 year ago)
- Last Synced: 2025-04-09T19:56:38.985Z (about 1 year ago)
- Language: HTML
- Homepage: https://irkode.github.io/hugo-forum/
- Size: 84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hugo Forum Playground
My playground repository for Hugo.
A nearly bare Hugo setup as described in the docs (with some minor additions).
## create a bare themed Hugo site
```bash
hugo new site mysite
cd mysite
hugo new theme mysite
echo "theme = 'mysite' > hugo.toml
```
## additional components
- keep empty folders
The initialisation creates a lot of empty folders to hava a good skeleton. Git on the other side will not add/commit
empty folders.
To overcome this I added an `.keep` file to all empty folders.
- Disable Taxonomies and Sitemap
For playing around I don't want these fils to be generated. Disabled that in the config
```
disableKinds = ['RSS', 'sitemap', 'taxonomy', 'term']
```
- workaround for cleanDestinationDir bug
hugo won't handle that if no static folder is there. In my case it's there because of the `.keep` file. I do not want
to get that added to the final site, so I remount the static folder excluding it.
```
[module]
[[module.mounts]]
source = "static"
target = "static"
[[module.mounts]]
source = "static"
target = "static"
excludeFiles = [".keep"]
```
- Prettier code formatter
I use [Prettier code formatter](https://prettier.io/) to handle all my site stuff. So the neccessary config is
committed.
If you have `node.js` installed you may call `npm install --save-dev` to install it. More in their installation
guide.
Check the `.prettierrc` file for some useful settings.
- Git configuration: .gitignore and .gitattributes
Git configuration for LF conversion and to ignore Hugo's generated stuff and the files I don't want to expose.