diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index de1f909c..25e25dd4 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1570,6 +1570,10 @@ select { margin-left: 0.5rem; } +.ml-0 { + margin-left: 0px; +} + .\!mb-9 { margin-bottom: 2.25rem !important; } @@ -3382,16 +3386,16 @@ body:has(#menu-controller:checked) { background-color: rgba(var(--color-neutral-700), var(--tw-bg-opacity)); } -.dark .dark\:bg-primary-900 { - --tw-bg-opacity: 1; - background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); -} - .dark .dark\:bg-primary-800 { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-800), var(--tw-bg-opacity)); } +.dark .dark\:bg-primary-900 { + --tw-bg-opacity: 1; + background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); +} + .dark .dark\:from-neutral-800 { --tw-gradient-from: rgba(var(--color-neutral-800), 1); --tw-gradient-to: rgba(var(--color-neutral-800), 0); diff --git a/config/_default/config.toml b/config/_default/config.toml index 8197c0e3..f5c99177 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -2,6 +2,7 @@ # Refer to the theme docs for more details about each of these parameters. # https://nunocoracao.github.io/blowfish/docs/getting-started/ +# theme = "blowfish" # baseURL = "https://your_domain.com/" defaultContentLanguage = "en" @@ -18,6 +19,7 @@ buildFuture = false tag = "tags" category = "categories" author = "authors" + series = "series" [sitemap] changefreq = 'daily' diff --git a/config/_default/params.toml b/config/_default/params.toml index 9c45638d..9a5dc57f 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -42,6 +42,7 @@ enableCodeCopy = true showEdit = true # editURL = "https://github.com/username/repo/" editAppendPath = true + seriesOpened = false showHeadingAnchors = true showPagination = true invertPagination = false diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index 3579b36d..9e99e1b8 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -19,6 +19,7 @@ googleAnalytics = "G-PEDMYR1V0K" tag = "tags" category = "categories" author = "authors" + series = "series" [sitemap] changefreq = 'always' diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 31321a00..6c8959f8 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -42,6 +42,7 @@ mainSections = ["docs"] showEdit = true editURL = "https://github.com/nunocoracao/blowfish/tree/main/exampleSite/content" editAppendPath = true + seriesOpened = false showHeadingAnchors = true showPagination = true invertPagination = false diff --git a/exampleSite/content/docs/advanced-customisation/index.md b/exampleSite/content/docs/advanced-customisation/index.md index 4302086f..3e778c55 100644 --- a/exampleSite/content/docs/advanced-customisation/index.md +++ b/exampleSite/content/docs/advanced-customisation/index.md @@ -5,6 +5,8 @@ draft: false description: "Learn how to build Blowfish manually." slug: "advanced-customisation" tags: ["advanced", "css", "docs"] +series: ["Documentation"] +series_order: 13 --- There are many ways you can make advanced changes to Blowfish. Read below to learn more about what can be customised and the best way of achieving your desired result. diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index d15c8cf0..e50e83c0 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -5,6 +5,8 @@ draft: false description: "All the configuration variables available in Blowfish." slug: "configuration" tags: ["config", "docs"] +series: ["Documentation"] +series_order: 4 --- Blowfish is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured. @@ -153,6 +155,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |`article.showEdit`|`false`|Whether or not the link to edit the article content should be displayed.| |`article.editURL`|_Not set_|When `article.showEdit` is active, the URL for the edit link.| |`article.editAppendPath`|`true`|When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`.| +|`article.seriesOpened`|`false`|Whether or not the series module will be displayed open by default or not.| |`article.showHeadingAnchors`|`true`|Whether or not heading anchor links are displayed alongside headings within articles.| |`article.showPagination`|`true`|Whether or not the next/previous article links are displayed in the article footer.| |`article.invertPagination`|`false`|Whether or not to flip the direction of the next/previous article links.| diff --git a/exampleSite/content/docs/content-examples/index.md b/exampleSite/content/docs/content-examples/index.md index c0ca3d6e..98902af6 100644 --- a/exampleSite/content/docs/content-examples/index.md +++ b/exampleSite/content/docs/content-examples/index.md @@ -5,6 +5,8 @@ draft: false description: "All the partials available in Blowfish." slug: "content-examples" tags: ["content", "example"] +series: ["Documentation"] +series_order: 12 --- If you've been reading the documentation in order, you should now know about all the features and configurations available in Blowfish. This page is designed to pull everything together and offer some worked examples that you might like to use in your Hugo project. diff --git a/exampleSite/content/docs/firebase-views/index.md b/exampleSite/content/docs/firebase-views/index.md index 47c47ee5..8782a089 100644 --- a/exampleSite/content/docs/firebase-views/index.md +++ b/exampleSite/content/docs/firebase-views/index.md @@ -5,6 +5,8 @@ draft: false description: "Learn how to integrate Firebase and get dynamic data for views and likes." slug: "firebase-views" tags: ["firebase", "views", likes] +series: ["Documentation"] +series_order: 15 --- In order to be able to support dynamic data across your website we've added the support to integrate Firebase. This will allow you to use the views feature across lists and posts. diff --git a/exampleSite/content/docs/front-matter/index.md b/exampleSite/content/docs/front-matter/index.md index 2b3502d1..d4392e4c 100644 --- a/exampleSite/content/docs/front-matter/index.md +++ b/exampleSite/content/docs/front-matter/index.md @@ -5,6 +5,8 @@ draft: false description: "All the front matter variables available in Blowfish." slug: "front-matter" tags: ["front matter", "config", "docs"] +series: ["Documentation"] +series_order: 7 --- In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Blowfish adds a number of additional options to customise the presentation of individual articles. All the available theme front matter parameters are listed below. @@ -43,6 +45,9 @@ Front matter parameter default values are inherited from the theme's [base confi |`showSummary`|`list.showSummary`|Whether or not the article summary should be displayed on list pages.| |`showViews`|`article.showViews`|Whether or not the article views should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish| |`showLikes`|`article.showLikes`|Whether or not the article likes should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish| +|`seriesOpened`|`article.seriesOpened`|Whether or not the series module will be displayed open by default or not.| +|`series`|_Not set_|Array of series the article belongs to, we recommend using only one series per article.| +|`series_order`|_Not set_|Number of the article within the series.| |`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.| |`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.| diff --git a/exampleSite/content/docs/getting-started/index.md b/exampleSite/content/docs/getting-started/index.md index 36990320..1448dc3d 100644 --- a/exampleSite/content/docs/getting-started/index.md +++ b/exampleSite/content/docs/getting-started/index.md @@ -5,6 +5,8 @@ draft: false description: "All the front matter variables available in Blowfish." slug: "getting-started" tags: ["installation", "docs"] +series: ["Documentation"] +series_order: 3 --- {{< alert >}} diff --git a/exampleSite/content/docs/homepage-layout/index.md b/exampleSite/content/docs/homepage-layout/index.md index 548a1bb7..ef9fab50 100644 --- a/exampleSite/content/docs/homepage-layout/index.md +++ b/exampleSite/content/docs/homepage-layout/index.md @@ -5,6 +5,8 @@ draft: false description: "Configuring the homepage layout in the Blowfish theme." slug: "homepage-layout" tags: ["homepage", "layouts", "docs"] +series: ["Documentation"] +series_order: 5 --- Blowfish provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content. diff --git a/exampleSite/content/docs/hosting-deployment/index.md b/exampleSite/content/docs/hosting-deployment/index.md index 13daf77c..0231c410 100644 --- a/exampleSite/content/docs/hosting-deployment/index.md +++ b/exampleSite/content/docs/hosting-deployment/index.md @@ -5,6 +5,8 @@ draft: false description: "Learn how to deploy a Blowfish site." slug: "hosting-deployment" tags: ["hosting", "deployment", "docs", "github", "netlify", "render"] +series: ["Documentation"] +series_order: 14 --- There are many ways to deploy your Hugo website built with Blowfish. The theme is designed to be flexible in almost any deployment scenario. diff --git a/exampleSite/content/docs/installation/index.md b/exampleSite/content/docs/installation/index.md index 035a6abf..a3c0512a 100644 --- a/exampleSite/content/docs/installation/index.md +++ b/exampleSite/content/docs/installation/index.md @@ -5,6 +5,8 @@ draft: false description: "How to install the Blowfish theme." slug: "installation" tags: ["installation", "docs"] +series: ["Documentation"] +series_order: 2 --- Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly. diff --git a/exampleSite/content/docs/multi-author/index.md b/exampleSite/content/docs/multi-author/index.md index f1291a8b..acc0f942 100644 --- a/exampleSite/content/docs/multi-author/index.md +++ b/exampleSite/content/docs/multi-author/index.md @@ -5,6 +5,8 @@ draft: false description: "Configure multiple authors for your articles." slug: "multi-author" tags: ["authors", "config", "docs"] +series: ["Documentation"] +series_order: 10 showAuthor: true authors: - "nunocoracao" diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index dfa200df..f129028a 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -5,6 +5,8 @@ draft: false description: "All the partials available in Blowfish." slug: "partials" tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"] +series: ["Documentation"] +series_order: 9 --- ## Analytics diff --git a/exampleSite/content/docs/series/featured.png b/exampleSite/content/docs/series/featured.png new file mode 100644 index 00000000..ac432f0a Binary files /dev/null and b/exampleSite/content/docs/series/featured.png differ diff --git a/exampleSite/content/docs/series/index.md b/exampleSite/content/docs/series/index.md new file mode 100644 index 00000000..ab514089 --- /dev/null +++ b/exampleSite/content/docs/series/index.md @@ -0,0 +1,36 @@ +--- +title: "Series" +date: 2020-08-09 +draft: false +description: "Learn how to group articles under a series." +slug: "series" +tags: ["series", "docs"] +series: ["Documentation"] +series_order: 11 +seriesOpened: true +--- + +Blowfish provides a feature to group a set of articles together under a "series". Placing an article under a series will display the rest of the series articles in each single page and provide a quick way to navigate amongst them. You can see an example of this above. + +## Create Taxonomy +The first step to enable series is to create the `series` taxonomy. For doing this just add the `series` taxonomy to your taxonomy list in the `config.toml`. + +```toml +[taxonomies] + tag = "tags" + category = "categories" + author = "authors" + series = "series" +``` + +## Mark Articles + +Then you just need to mark each article using the `series` parameter and the `series_order`. The `series` parameter will be the id and name of the series you are placing the article into (even though the variable is an array we recommend keeping each article to a single series.). And the `series_order` defines the order of that article within the series. In the example below the article is number `11` in the `Documentation` series. + +```md +series: ["Documentation"] +series_order: 11 +``` + +## Series Behavior +Marking an article as part of a series will automatically display the series module as you see in this page for example. You can choose whether that module starts opened or not using the `article.seriesOpened` global variable in `params.toml` or the front-matter parameter `seriesOpened` to specify an override at the article level. \ No newline at end of file diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index cfc5ef29..d0cebcca 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -5,6 +5,8 @@ draft: false description: "All the shortcodes available in Blowfish." slug: "shortcodes" tags: ["shortcodes", "mermaid", "icon", "lead", "docs"] +series: ["Documentation"] +series_order: 8 --- In addition to all the [default Hugo shortcodes](https://gohugo.io/content-management/shortcodes/), Blowfish adds a few extras for additional functionality. diff --git a/exampleSite/content/docs/thumbnails/index.md b/exampleSite/content/docs/thumbnails/index.md index 2cfd09cb..644ae274 100644 --- a/exampleSite/content/docs/thumbnails/index.md +++ b/exampleSite/content/docs/thumbnails/index.md @@ -5,6 +5,8 @@ draft: false description: "Turn on thumbnails for your articles." slug: "thumbnails" tags: ["thumbnail", "config", "docs"] +series: ["Documentation"] +series_order: 6 --- ## Thumbnails diff --git a/exampleSite/content/docs/welcome/index.md b/exampleSite/content/docs/welcome/index.md index 7975b4a8..ffdc98ae 100644 --- a/exampleSite/content/docs/welcome/index.md +++ b/exampleSite/content/docs/welcome/index.md @@ -4,6 +4,8 @@ date: 2022-01-19 draft: false description: "Discover what's new in Blowfish version 2.0." tags: ["new", "docs"] +series: ["Documentation"] +series_order: 1 --- {{< lead >}} diff --git a/exampleSite/resources/_gen/images/docs/getting-started copy/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_1200x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/getting-started copy/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_1200x0_resize_box_3.png new file mode 100644 index 00000000..e69de29b diff --git a/exampleSite/resources/_gen/images/docs/getting-started copy/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_600x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/getting-started copy/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_600x0_resize_box_3.png new file mode 100644 index 00000000..e69de29b diff --git a/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_1200x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_1200x0_resize_box_3.png new file mode 100644 index 00000000..6cca63b6 Binary files /dev/null and b/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_1200x0_resize_box_3.png differ diff --git a/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_600x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_600x0_resize_box_3.png new file mode 100644 index 00000000..3d30158c Binary files /dev/null and b/exampleSite/resources/_gen/images/docs/series/featured_hu7b932db01f62f5127910b65e3cd14f9d_599809_600x0_resize_box_3.png differ diff --git a/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_1200x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_1200x0_resize_box_3.png new file mode 100644 index 00000000..17be2c64 Binary files /dev/null and b/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_1200x0_resize_box_3.png differ diff --git a/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_600x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_600x0_resize_box_3.png new file mode 100644 index 00000000..57245b0c Binary files /dev/null and b/exampleSite/resources/_gen/images/docs/series/featured_hufd4b98ca40f354dfe40e970226ab02f1_1752805_600x0_resize_box_3.png differ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4766d4a4..d55201d1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,11 +2,11 @@
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }} {{ $heroStyle := print "partials/hero/" .Site.Params.article.heroStyle ".html" }} - {{ if templates.Exists $heroStyle }} - {{ partial $heroStyle . }} - {{ else }} - {{ partial "partials/hero/basic.html" . }} - {{ end }} + {{ if templates.Exists $heroStyle }} + {{ partial $heroStyle . }} + {{ else }} + {{ partial "partials/hero/basic.html" . }} + {{ end }} {{- end -}}
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} @@ -28,6 +28,7 @@ {{ end }}
+ {{ partial "series.html" . }} {{ .Content | emojify }}