Compare commits

..

11 commits

Author SHA1 Message Date
b9bdd3bf41
Remove .github 2025-06-11 15:07:51 +02:00
3bf203df3b
Remove .html from URLs 2025-05-26 14:25:07 +02:00
dcfa770f2c
Remove .html from URLs 2025-05-26 14:08:46 +02:00
fb01daeb1e
Fix social card 2025-05-03 20:08:38 +02:00
b4a60a014d
Fix theme 2025-05-02 23:12:37 +02:00
bc2c29152e
Fix theme 2025-04-29 00:59:50 +02:00
ff37fea258 Update README.md 2025-04-15 10:23:21 +02:00
d89ff14d70 Update social links 2025-04-14 10:37:06 +02:00
43f4513b98
Merge branch 'clente:main' into main 2025-03-13 23:35:54 +00:00
Mirai Kumiko
c3286b77b8
Update rich-content.md (#34)
WARN  The "twitter", "tweet", and "twitter_simple" shortcodes were deprecated in v0.142.0 and will be removed in a future release. Please use the "x" shortcode instead.
2025-01-19 11:48:33 -03:00
miraikumiko
5c3381116b
Update rich-content.md
WARN  The "twitter", "tweet", and "twitter_simple" shortcodes were deprecated in v0.142.0 and will be removed in a future release. Please use the "x" shortcode instead.
2025-01-18 02:18:15 +01:00
11 changed files with 38 additions and 88 deletions

View file

@ -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

View file

@ -167,6 +167,9 @@ enableRobotsTXT = true
# to people with poor eyesight. For more information about color contrast
# and accessibility, see https://web.dev/color-and-contrast-accessibility/
noClasses = false
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
# Multilingual mode config. More for information about how to setup translation,
# see https://gohugo.io/content-management/multilingual/
@ -224,18 +227,15 @@ enableRobotsTXT = true
# information see layouts/partials/social_card.html
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
# 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.
[params.author]
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
[params.links]
email = "mailto:username@example.com"
github = "https://github.com/username"
```
## Contributing

Binary file not shown.

View file

@ -4,7 +4,7 @@ body {
padding: 20px;
max-width: 720px;
text-align: left;
background-color: #1d1f27;
background-color: black;
word-wrap: break-word;
overflow-wrap: break-word;
line-height: 1.5;
@ -39,6 +39,13 @@ a {
font-weight: 400;
}
.title div {
color: white;
font-size: 24px;
font-weight: bold;
margin: 19.92px 0 19.92px 0;
}
nav a {
margin-right: 10px;
}
@ -153,6 +160,11 @@ p.byline {
font-style: italic;
}
.white-link {
color: white;
text-decoration: none;
}
/* "Skip to main content" link */
.skip-link {
position: absolute;

View file

@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Twitter Simple Shortcode
{{< tweet user="DesignReviewed" id="1085870671291310081" >}}
{{< x user="DesignReviewed" id="1085870671291310081" >}}
<br>

View file

@ -14,9 +14,9 @@
</i>
</span>
{{ if .Params.link }}
<a href="{{ .Params.link }}" target="_blank">{{ .Title }} ↪</a>
<a href="{{ .Params.link | replaceRE "\\.html$" "" }}" target="_blank">{{ .Title }} ↪</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<a href="{{ .RelPermalink | replaceRE "\\.html$" "" }}">{{ .Title }}</a>
{{ end }}
</li>
{{ else }}
@ -28,7 +28,7 @@
{{ if not .Data.Singular }}
<div>
{{ 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 }}
</div>
{{ end }}

View file

@ -13,7 +13,7 @@
</content>
<p>
{{ range (.GetTerms "tags") }}
<a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
<a class="blog-tags" href="{{ .RelPermalink | replaceRE "\\.html$" "" }}">#{{ lower .LinkTitle }}</a>
{{ end }}
</p>
{{ if not .Params.hideReply }}

View file

@ -1,3 +1,3 @@
<small>
{{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }}
</small>
{{ .Site.Copyright }} {{ range $title, $link := .Site.Params.links }} | <a rel="me" href="{{ $link }}" class="white-link">{{ title $title }}</a> {{ end }}
</small>

View file

@ -1,5 +1,5 @@
{{ range .Site.Menus.main.ByWeight }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href="{{ .URL | replaceRE "\\.html$" "" }}">{{ .Name }}</a>
{{ end }}
<a href='{{ absURL "index.xml" }}'>RSS</a>

View file

@ -1,7 +1,7 @@
<!-- Primary Meta Tags -->
<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="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 }}" />
<!-- Only generate social card if: -->

View file

@ -1,9 +1,9 @@
<!-- 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"}}
{{ $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
"font" $font
"color" "#fafafa"
@ -24,7 +24,7 @@
{{ end }}
{{ $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) }}
{{ $fg = $fg.Filter (images.Text $byline (dict
@ -39,6 +39,13 @@
{{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }}
{{ $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 -->
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html -->
<meta property="og:title" content="{{ .Title }}" />
@ -74,22 +81,6 @@
{{ 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 -->
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html -->
<meta name="twitter:card" content="summary_large_image"/>
@ -97,27 +88,6 @@
<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 -}}"/>
{{- /* 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 -->
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/schema.html -->
<meta itemprop="name" content="{{ .Title }}">