diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
new file mode 100644
index 0000000..9f07252
--- /dev/null
+++ b/.github/workflows/gh-pages.yml
@@ -0,0 +1,32 @@
+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
diff --git a/README.md b/README.md
index 15f9f96..a084e50 100644
--- a/README.md
+++ b/README.md
@@ -167,9 +167,6 @@ 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/
@@ -227,15 +224,18 @@ 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
diff --git a/assets/fonts/FiraMono-Bold.ttf b/assets/fonts/FiraMono-Bold.ttf
deleted file mode 100644
index 9af5659..0000000
Binary files a/assets/fonts/FiraMono-Bold.ttf and /dev/null differ
diff --git a/assets/original.css b/assets/original.css
index 44e340f..480cc6a 100644
--- a/assets/original.css
+++ b/assets/original.css
@@ -4,7 +4,7 @@ body {
padding: 20px;
max-width: 720px;
text-align: left;
- background-color: black;
+ background-color: #1d1f27;
word-wrap: break-word;
overflow-wrap: break-word;
line-height: 1.5;
@@ -39,13 +39,6 @@ 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;
}
@@ -160,11 +153,6 @@ p.byline {
font-style: italic;
}
-.white-link {
- color: white;
- text-decoration: none;
-}
-
/* "Skip to main content" link */
.skip-link {
position: absolute;
diff --git a/exampleSite/content/blog/rich-content.md b/exampleSite/content/blog/rich-content.md
index 3c406af..bf7e101 100644
--- a/exampleSite/content/blog/rich-content.md
+++ b/exampleSite/content/blog/rich-content.md
@@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Twitter Simple Shortcode
-{{< x user="DesignReviewed" id="1085870671291310081" >}}
+{{< tweet user="DesignReviewed" id="1085870671291310081" >}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 02eb365..e6cc177 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -14,9 +14,9 @@
{{ if .Params.link }}
- {{ .Title }} ↪
+ {{ .Title }} ↪
{{ else }}
- {{ .Title }}
+ {{ .Title }}
{{ end }}
{{ else }}
@@ -28,7 +28,7 @@
{{ if not .Data.Singular }}
{{ range (.GetTerms "tags") }} - #{{ lower .LinkTitle }} + #{{ lower .LinkTitle }} {{ end }}
{{ if not .Params.hideReply }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index ded7490..9290715 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,3 @@ - {{ .Site.Copyright }} {{ range $title, $link := .Site.Params.links }} | {{ title $title }} {{ end }} - + {{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }} + \ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index b77c1cd..53be338 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,5 +1,5 @@ {{ range .Site.Menus.main.ByWeight }} - {{ .Name }} + {{ .Name }} {{ end }} RSS diff --git a/layouts/partials/seo_tags.html b/layouts/partials/seo_tags.html index 07829fd..6ab1422 100644 --- a/layouts/partials/seo_tags.html +++ b/layouts/partials/seo_tags.html @@ -1,7 +1,7 @@ - + diff --git a/layouts/partials/social_card.html b/layouts/partials/social_card.html index 74b5a81..d171da0 100644 --- a/layouts/partials/social_card.html +++ b/layouts/partials/social_card.html @@ -1,9 +1,9 @@ -{{ $font := resources.Get "fonts/FiraMono-Bold.ttf" }} +{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/ofl/firamono/FiraMono-Bold.ttf" }} {{ $fg := resources.Get "images/social_card_fg.png"}} {{ $bg := resources.Get "images/social_card_bg.png"}} -{{ if gt (len .Title) 40 }} +{{ if gt (len .Title) 45 }} {{ $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.name")) }} +{{ $author := (default $.Site.Params.author.name ($.Param "author") ) }} {{ $byline := (printf "%s | %s" $author $date) }} {{ $fg = $fg.Filter (images.Text $byline (dict @@ -39,13 +39,6 @@ {{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }} {{ $card := $card.Resize "900x webp q100" }} - - - - - -{{ $card := $card.Resize "900x webp q100" }} - @@ -81,6 +74,22 @@ {{ 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 }}{{ end }} + @@ -88,6 +97,27 @@ +{{- /* 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 }} + +{{- end }} +