Skip to content

Commit

Permalink
Merge pull request #791 from nunocoracao/dev
Browse files Browse the repository at this point in the history
🔖 v2.36.0
  • Loading branch information
nunocoracao authored Jun 29, 2023
2 parents aa03e67 + 6a4f010 commit 02c9687
Show file tree
Hide file tree
Showing 18 changed files with 95 additions and 86 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

#others
node_modules
.DS_Store
**/.DS_Store
.hugo_build.lock

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Binary file removed assets/css/.DS_Store
Binary file not shown.
Binary file removed assets/img/.DS_Store
Binary file not shown.
Binary file removed assets/js/.DS_Store
Binary file not shown.
Binary file removed assets/lib/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/lib/katex/katex.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/lib/katex/katex.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[module.hugoVersion]
extended = true
min = "0.87.0"
max = "0.113.0"
max = "0.115.0"
Binary file removed exampleSite/content/.DS_Store
Binary file not shown.
Binary file removed exampleSite/content/docs/.DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions exampleSite/content/docs/thumbnails/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ series_order: 6

## Thumbnails

Blowfish was enhanced in order to make it easy to add visual support to your posts. To do so, 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 main directory as shown in the example below.
Blowfish was enhanced in order to make it easy to add visual support to your posts. To do so, you just need to place an image file (almost all formats are supported but we recommend `.png` or `.jpg`) that starts with `feature*` inside your article's main directory, as shown in the example below.

```shell
content
Expand All @@ -22,7 +22,7 @@ content

This will tell Blowfish that this article has a feature image that can be used both as a thumbnail across your website as well as for <a target="_blank" href="https://oembed.com/">oEmbed</a> cards across social platforms.

## Folder Strucutre
## Folder Structure

If you are using single `.md` files for your articles and have a file structure similar to this:

Expand All @@ -38,8 +38,8 @@ content
└── awesome_article
└── featured.png
```
The you just need to add an image like explain earlier. If you want to see a sample of this you can consult [this sample]({{< ref "thumbnail_sample" >}}).
Then you just need to add an image like explained earlier. If you want to see a sample of this, you can consult [this sample]({{< ref "thumbnail_sample" >}}).

## Hero Images

Thumbnails will be used by default as hero images withing each article. Use the global `article.showHero` or the front-matter parameter `showHero` to control this feature across the entire site or for each specific post. If you want to override the style of the hero image you can create a file called `hero.html` in `./layouts/partials/` that will override the original partial from the theme.
Thumbnails will be used by default as hero images within each article. Use the global `article.showHero` or the front-matter parameter `showHero` to control this feature across the entire site or for each specific post. If you want to override the style of the hero image, you can create a file called `hero.html` in `./layouts/partials/` that will override the original partial from the theme.
3 changes: 2 additions & 1 deletion exampleSite/content/users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Some real-life Blowfish examples."
slug: "users"
tags: ["users", "sample"]
showDate: false
showAuthor: true
showAuthor: false
showReadingTime: false
showEdit: false
layoutBackgroundHeaderSpace: false
Expand Down Expand Up @@ -80,6 +80,7 @@ Real websites that are built with Blowfish.
| [blog.enmanuelmoreira.com](https://blog.enmanuelmoreira.com) | Personal site |
| [halcyonstraits.com](https://www.halcyonstraits.com/) | Doll photography |
| [50-nuances-octets.fr](https://www.50-nuances-octets.fr/) | Organization site |
| [marupanda.art/marucomics](https://marupanda.art/marucomics/) | Comics site |

{{< alert >}}

Expand Down
60 changes: 35 additions & 25 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,40 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
</div>

{{ $authorsData := .Site.Data.authors }}
{{ $taxonomies := .Site.Taxonomies.authors }}
{{ $baseURL := .Site.BaseURL }}
{{ $taxonomyLink := 0 }}
{{ $showAuthor := 0 }}

{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ $showAuthor = 1 }}
{{ partial "author.html" . }}
{{ end }}

{{ if not (strings.HasSuffix $baseURL "/") }}
{{ $baseURL = delimit (slice $baseURL "/") "" }}
{{ end }}

{{ range $author := .Page.Params.authors }}
{{ $authorData := index $authorsData $author }}
{{- if $authorData -}}

{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
{{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
{{ end }}
{{ end }}

{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
{{- end -}}
{{ end }}

{{ if or $taxonomyLink $showAuthor }}
<div class="mb-5"></div>
{{ end }}

</header>
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
Expand Down Expand Up @@ -54,31 +88,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
</section>
<footer class="pt-8 max-w-prose print:hidden">

{{ partial "author.html" . }}

{{ $authorsData := .Site.Data.authors }}
{{ $taxonomies := .Site.Taxonomies.authors }}
{{ $baseURL := .Site.BaseURL }}

{{ if not (strings.HasSuffix $baseURL "/") }}
{{ $baseURL = delimit (slice $baseURL "/") "" }}
{{ end }}

{{ range $author := .Page.Params.authors }}
{{ $authorData := index $authorsData $author }}
{{- if $authorData -}}

{{ $taxonomyLink := 0 }}
{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
{{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
{{ end }}
{{ end }}

{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
{{- end -}}
{{ end }}


{{ partial "sharing-links.html" . }}

{{ partial "related.html" . }}
Expand Down
Binary file removed layouts/partials/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions layouts/partials/analytics/fathom.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if isset site.Params.fathomAnalytics "domain" }}
<script defer src="https://{{ site.Params.fathomAnalytics.domain }}/script.js" data-site="{{ . }}"></script>
<script defer src="https://{{ site.Params.fathomAnalytics.domain }}/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
{{ else }}
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
{{ end }}
51 changes: 22 additions & 29 deletions layouts/partials/author.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex">
{{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "192x192" }}
<img
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
width="96"
height="96"
alt="{{ $.Site.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<div class="place-self-center">
{{ with .Site.Author.name | markdownify | emojify }}
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
{{ i18n "author.byline_title" | markdownify | emojify }}
</div>
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
{{ . }}
</div>
{{ end }}
{{ with .Site.Author.bio | markdownify | emojify }}
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
{{ end }}
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
<div class="flex">
{{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "192x192" }}
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
{{ end }}
{{ end }}
<div class="place-self-center">
{{ with .Site.Author.name | markdownify | emojify }}
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
{{ i18n "author.byline_title" | markdownify | emojify }}
</div>
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
{{ . }}
</div>
{{ end }}
{{ with .Site.Author.bio | markdownify | emojify }}
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
{{ end }}
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
</div>
{{ end }}
</div>
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.35.1",
"version": "2.36.0",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",
Expand Down Expand Up @@ -38,7 +38,7 @@
"chart.js": "^4.3.0",
"fuse.js": "^6.6.2",
"jquery": "^3.7.0",
"katex": "^0.16.7",
"katex": "^0.16.8",
"packery": "^2.1.2",
"prettier": "^2.8.8",
"prettier-plugin-go-template": "^0.0.13",
Expand Down Expand Up @@ -96,6 +96,6 @@
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@tailwindcss/forms": "^0.5.3",
"commander": "^10.0.1"
"commander": "^11.0.0"
}
}

0 comments on commit 02c9687

Please sign in to comment.