♻️ initial cleanup

This commit is contained in:
Nuno Coração 2023-01-08 22:15:54 +00:00
parent 866febe2a0
commit f970b2b6d9
3 changed files with 43 additions and 19 deletions

View file

@ -33,6 +33,7 @@ Blowfish is designed to be a powerful, lightweight theme for [Hugo](https://gohu
- Support for multiple authors
- Support for series of articles
- Flexible with any content types, taxonomies and menus
- Support for header, footer, and nested menus
- Multilingual content support inlcuding support for RTL languages
- Ability to link to posts on third-party websites
- Buymeacoffee integration

View file

@ -151,9 +151,9 @@ When you create a new taxonomy, you will need to adjust the navigation links on
## Menus
Blowfish has 3 menus that can be customised to suit the content and layout of your site. The `main` menu appears in the site header, the `subnavigation` menu just below `main` and the `footer` menu appears at the bottom of the page just above the copyright notice.
Blowfish has two menus that can be customised to suit the content and layout of your site. The `main` menu appears in the site header and the `footer` menu appears at the bottom of the page just above the copyright notice.
All of them can be configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use.
Both menus are configured in the `menus.en.toml` file. Similarly to the languages config file, if you wish to use another language, rename this file and replace `en` with the language code you wish to use.
```toml
# config/_default/menus.toml
@ -180,16 +180,6 @@ All of them can be configured in the `menus.en.toml` file. Similarly to the lang
url = "https://github.com/nunocoracao/blowfish"
weight = 40
[[subnavigation]]
name = "An interesting topic"
pageRef = "tags/interesting-topic"
weight = 10
[[subnavigation]]
name = "My Awesome Category"
pageRef = "categories/awesome"
weight = 20
[[footer]]
name = "Privacy"
url = "https://external-link"
@ -205,6 +195,40 @@ Menu links will be sorted from lowest to highest `weight`, and then alphabetical
Both menus are completely optional and can be commented out if not required. Use the template provided in the file as a guide.
### Nested Menus
bla bla bla
```toml
# config/_default/menus.toml
[[main]]
name = "Blog"
pageRef = "posts"
weight = 10
[[main]]
name = "Topics"
pageRef = "topics"
weight = 20
[[main]]
pre = "github"
name = "GitHub"
url = "https://github.com/nunocoracao/blowfish"
weight = 30
[[main]]
identifier = "github2"
pre = "github"
url = "https://github.com/nunocoracao/blowfish"
weight = 40
[[footer]]
name = "Privacy"
url = "https://external-link"
```
## Thumbnails & Backgrounds
Blowfish was built so it would be easy to add visual support to your articles. If your familiar with Hugo article strucutre, you just need to place an image file (almost all formats are supported bue we recommend `.png` or `.jpg`) that starts with `feature*` inside your article folder. And that's it, Blowfish will then able to both use the image as a thumbnail within your website as well as for <a target="_blank" href="https://oembed.com/">oEmbed</a> cards across social platforms.
@ -215,4 +239,4 @@ Additionally, Blowfish also supports background hero images in articles and list
## Detailed configuration
The steps above are the bare minimum configuration. If you now run `hugo server` you will be presented with a blank Blowfish website. Detailed configuration is covered in the [Configuration]({{< ref "configuration" >}}) section.
The steps above are the bare minimum configuration. If you now run `hugo server` you will be presented with a blank Blowfish website. Detailed configuration is covered in the [Configuration]({{< ref "configuration" >}}) section.

View file

@ -86,6 +86,11 @@
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
{{ end }}
{{/* Header */}}
{{ $headerLib := resources.Get "js/header.js" }}
{{ $headerLib := $headerLib | resources.Minify }}
{{ $headerJS := $headerLib | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $headerJS.RelPermalink }}" integrity="{{ $headerJS.Data.Integrity }}"></script>
{{/* Site Verification */}}
{{ with .Site.Params.verification.google }}
<meta name="google-site-verification" content="{{ . }}" />
@ -147,10 +152,4 @@
</script>
{{ end }}
{{ end }}
{{/* Header */}}
{{ $headerLib := resources.Get "js/header.js" }}
{{ $headerLib := $headerLib | resources.Minify }}
{{ $headerJS := $headerLib | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $headerJS.RelPermalink }}" integrity="{{ $headerJS.Data.Integrity }}"></script>
</head>