Compare commits
11 commits
aa6a8b4f90
...
b9bdd3bf41
Author | SHA1 | Date | |
---|---|---|---|
b9bdd3bf41 | |||
3bf203df3b | |||
dcfa770f2c | |||
fb01daeb1e | |||
b4a60a014d | |||
bc2c29152e | |||
ff37fea258 | |||
d89ff14d70 | |||
43f4513b98 | |||
![]() |
c3286b77b8 | ||
![]() |
5c3381116b |
11 changed files with 38 additions and 88 deletions
32
.github/workflows/gh-pages.yml
vendored
32
.github/workflows/gh-pages.yml
vendored
|
@ -1,32 +0,0 @@
|
||||||
name: github pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main # Set a branch that will trigger a deployment
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
|
||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
||||||
|
|
||||||
- name: Setup Hugo
|
|
||||||
uses: peaceiris/actions-hugo@v3
|
|
||||||
with:
|
|
||||||
hugo-version: 'latest'
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://clente.github.io/hugo-bearcub/
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./public
|
|
12
README.md
12
README.md
|
@ -167,6 +167,9 @@ enableRobotsTXT = true
|
||||||
# to people with poor eyesight. For more information about color contrast
|
# to people with poor eyesight. For more information about color contrast
|
||||||
# and accessibility, see https://web.dev/color-and-contrast-accessibility/
|
# and accessibility, see https://web.dev/color-and-contrast-accessibility/
|
||||||
noClasses = false
|
noClasses = false
|
||||||
|
[markup.goldmark]
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe = true
|
||||||
|
|
||||||
# Multilingual mode config. More for information about how to setup translation,
|
# Multilingual mode config. More for information about how to setup translation,
|
||||||
# see https://gohugo.io/content-management/multilingual/
|
# see https://gohugo.io/content-management/multilingual/
|
||||||
|
@ -224,18 +227,15 @@ enableRobotsTXT = true
|
||||||
# information see layouts/partials/social_card.html
|
# information see layouts/partials/social_card.html
|
||||||
generateSocialCard = true
|
generateSocialCard = true
|
||||||
|
|
||||||
# Social media. Delete any item you aren't using to make sure it won't show up
|
|
||||||
# in your website's metadata.
|
|
||||||
[params.social]
|
|
||||||
twitter = "example" # Twitter handle (without '@')
|
|
||||||
facebook_admin = "0000000000" # Facebook Page Admin ID
|
|
||||||
|
|
||||||
# Author metadata. This is mostly used for the RSS feed of your site, but the
|
# Author metadata. This is mostly used for the RSS feed of your site, but the
|
||||||
# email is also added to the footer of each post. You can hide the "reply to"
|
# email is also added to the footer of each post. You can hide the "reply to"
|
||||||
# link by using a `hideReply` param in front matter.
|
# link by using a `hideReply` param in front matter.
|
||||||
[params.author]
|
[params.author]
|
||||||
name = "John Doe" # Your name as shown in the RSS feed metadata
|
name = "John Doe" # Your name as shown in the RSS feed metadata
|
||||||
email = "me@example.com" # Added to the footer so readers can reply to posts
|
email = "me@example.com" # Added to the footer so readers can reply to posts
|
||||||
|
[params.links]
|
||||||
|
email = "mailto:username@example.com"
|
||||||
|
github = "https://github.com/username"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
BIN
assets/fonts/FiraMono-Bold.ttf
Normal file
BIN
assets/fonts/FiraMono-Bold.ttf
Normal file
Binary file not shown.
|
@ -4,7 +4,7 @@ body {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
max-width: 720px;
|
max-width: 720px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background-color: #1d1f27;
|
background-color: black;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
@ -39,6 +39,13 @@ a {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title div {
|
||||||
|
color: white;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 19.92px 0 19.92px 0;
|
||||||
|
}
|
||||||
|
|
||||||
nav a {
|
nav a {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +160,11 @@ p.byline {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.white-link {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* "Skip to main content" link */
|
/* "Skip to main content" link */
|
||||||
.skip-link {
|
.skip-link {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
||||||
|
|
||||||
## Twitter Simple Shortcode
|
## Twitter Simple Shortcode
|
||||||
|
|
||||||
{{< tweet user="DesignReviewed" id="1085870671291310081" >}}
|
{{< x user="DesignReviewed" id="1085870671291310081" >}}
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
</i>
|
</i>
|
||||||
</span>
|
</span>
|
||||||
{{ if .Params.link }}
|
{{ if .Params.link }}
|
||||||
<a href="{{ .Params.link }}" target="_blank">{{ .Title }} ↪</a>
|
<a href="{{ .Params.link | replaceRE "\\.html$" "" }}" target="_blank">{{ .Title }} ↪</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink | replaceRE "\\.html$" "" }}">{{ .Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{{ if not .Data.Singular }}
|
{{ if not .Data.Singular }}
|
||||||
<div>
|
<div>
|
||||||
{{ range .Site.Taxonomies.tags }}
|
{{ range .Site.Taxonomies.tags }}
|
||||||
<a class="blog-tags" href="{{ .Page.RelPermalink }}">#{{ lower .Page.Title }}</a>
|
<a class="blog-tags" href="{{ .Page.RelPermalink | replaceRE "\\.html$" "" }}">#{{ lower .Page.Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</content>
|
</content>
|
||||||
<p>
|
<p>
|
||||||
{{ range (.GetTerms "tags") }}
|
{{ range (.GetTerms "tags") }}
|
||||||
<a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
|
<a class="blog-tags" href="{{ .RelPermalink | replaceRE "\\.html$" "" }}">#{{ lower .LinkTitle }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ if not .Params.hideReply }}
|
{{ if not .Params.hideReply }}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<small>
|
<small>
|
||||||
{{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }}
|
{{ .Site.Copyright }} {{ range $title, $link := .Site.Params.links }} | <a rel="me" href="{{ $link }}" class="white-link">{{ title $title }}</a> {{ end }}
|
||||||
</small>
|
</small>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ range .Site.Menus.main.ByWeight }}
|
{{ range .Site.Menus.main.ByWeight }}
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL | replaceRE "\\.html$" "" }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- Primary Meta Tags -->
|
<!-- Primary Meta Tags -->
|
||||||
<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
||||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||||
<meta name="author" content="{{ with .Params.author }}{{ . }}{{ end }}" />
|
<meta name="author" content="{{ .Site.Params.Author.name }}" />
|
||||||
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
|
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
|
||||||
|
|
||||||
<!-- Only generate social card if: -->
|
<!-- Only generate social card if: -->
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<!-- Dynamic social card generation -->
|
<!-- Dynamic social card generation -->
|
||||||
{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/ofl/firamono/FiraMono-Bold.ttf" }}
|
{{ $font := resources.Get "fonts/FiraMono-Bold.ttf" }}
|
||||||
{{ $fg := resources.Get "images/social_card_fg.png"}}
|
{{ $fg := resources.Get "images/social_card_fg.png"}}
|
||||||
{{ $bg := resources.Get "images/social_card_bg.png"}}
|
{{ $bg := resources.Get "images/social_card_bg.png"}}
|
||||||
|
|
||||||
{{ if gt (len .Title) 45 }}
|
{{ if gt (len .Title) 40 }}
|
||||||
{{ $fg = $fg.Filter (images.Text .Title (dict
|
{{ $fg = $fg.Filter (images.Text .Title (dict
|
||||||
"font" $font
|
"font" $font
|
||||||
"color" "#fafafa"
|
"color" "#fafafa"
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||||
{{ $author := (default $.Site.Params.author.name ($.Param "author") ) }}
|
{{ $author := (default $.Site.Params.author.name ($.Param "author.name")) }}
|
||||||
{{ $byline := (printf "%s | %s" $author $date) }}
|
{{ $byline := (printf "%s | %s" $author $date) }}
|
||||||
|
|
||||||
{{ $fg = $fg.Filter (images.Text $byline (dict
|
{{ $fg = $fg.Filter (images.Text $byline (dict
|
||||||
|
@ -39,6 +39,13 @@
|
||||||
{{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }}
|
{{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }}
|
||||||
{{ $card := $card.Resize "900x webp q100" }}
|
{{ $card := $card.Resize "900x webp q100" }}
|
||||||
|
|
||||||
|
<!-- Open Graph / Facebook -->
|
||||||
|
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html -->
|
||||||
|
<meta property="og:title" content="{{ .Title }}" />
|
||||||
|
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||||
|
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||||
|
{{ $card := $card.Resize "900x webp q100" }}
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
<!-- Open Graph / Facebook -->
|
||||||
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html -->
|
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html -->
|
||||||
<meta property="og:title" content="{{ .Title }}" />
|
<meta property="og:title" content="{{ .Title }}" />
|
||||||
|
@ -74,22 +81,6 @@
|
||||||
{{ end }}{{ end }}
|
{{ end }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
|
|
||||||
{{- $facebookAdmin := "" }}
|
|
||||||
{{- with site.Params.social }}
|
|
||||||
{{- if reflect.IsMap . }}
|
|
||||||
{{- $facebookAdmin = .facebook_admin }}
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- with site.Social.facebook_admin }}
|
|
||||||
{{- $facebookAdmin = . }}
|
|
||||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
|
||||||
{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html -->
|
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html -->
|
||||||
<meta name="twitter:card" content="summary_large_image"/>
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
@ -97,27 +88,6 @@
|
||||||
<meta name="twitter:title" content="{{ .Title }}"/>
|
<meta name="twitter:title" content="{{ .Title }}"/>
|
||||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
||||||
|
|
||||||
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
|
|
||||||
{{- $twitterSite := "" }}
|
|
||||||
{{- with site.Params.social }}
|
|
||||||
{{- if reflect.IsMap . }}
|
|
||||||
{{- $twitterSite = .twitter }}
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- with site.Social.twitter }}
|
|
||||||
{{- $twitterSite = . }}
|
|
||||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- with $twitterSite }}
|
|
||||||
{{- $content := . }}
|
|
||||||
{{- if not (strings.HasPrefix . "@") }}
|
|
||||||
{{- $content = printf "@%v" $twitterSite }}
|
|
||||||
{{- end }}
|
|
||||||
<meta name="twitter:site" content="{{ $content }}"/>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
<!-- Microdata -->
|
<!-- Microdata -->
|
||||||
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/schema.html -->
|
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/schema.html -->
|
||||||
<meta itemprop="name" content="{{ .Title }}">
|
<meta itemprop="name" content="{{ .Title }}">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue