Commit Graph

30 Commits

Author SHA1 Message Date
Jimmy Cai
0b9f6c36ad
fix(head): prevent Go template from escaping HTML entities in meta description (#973) 2024-03-12 14:45:59 +01:00
Andreas Deininger
4948a3723e
fix: .Site.LastChange deprecation (#968)
Fix the deprecation warning emitted from Hugo, and fix the typo in ` exampleSite/content/page/about/index.md`
2024-03-10 19:57:03 +01:00
Jimmy Cai
03ee3369e1
fix: title does not show pagination data (#945)
* fix: title does not show pagination data

This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page.

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941

* doc(exampleSite): set paginate to 3 to force pagination
2024-02-19 10:54:02 +01:00
Jimmy Cai
b03390d237
Revert "Merge branch 'canary' into master" (#712)
Revert "Merge branch 'canary' into master (#711)"

This reverts commit 8a597a5c9c.
2022-10-29 17:14:19 +02:00
Jimmy Cai
8a597a5c9c
Merge branch 'canary' into master (#711)
* refactor(i18n): simplify the structure of the translation file

* chore: prepare repository for v4.0.0-alpha

* chore: modify go.mod to v4

* refactor: migrate theme configuration to TOML

* fix: exampleSite not using correct theme

* feat: add favicon from assets folder

* refactor: drop linear grandient background feature

remove node-vibrant from dependencies

* feat: use Hugo's code block render hook to implement code copy button

Now it can have i18n support

* refactor: delete color.ts

* refactor: delete Emoji support post from example site

* refactor: drop support for `hidden` field in front matter

* feat: upgrade to PhotoSwipe v5

* chore: bump the required hugo version to 0.100.0

* refactor: remove PhotoSwipe from external.yaml

* fix: extra margin in search result

* fix: incorrect markdown heading level in example site

* refactor: remove some usages of `default` in template

No longer needed thanks to Hugo's configuration merge

* fix: one line codeblock style in firefox

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/564

* feat: add style to new codeblock

* feat: i18n support for codeblock copy text

* fix(menu): jitter when closing menu

It's caused by flexbox gap property, which can't animate

* fix(search): long text overflows under the Search icon

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/515
2022-10-29 17:02:24 +02:00
gursi26
9b464bd9fc
feat(page): add keywords front matter field for better SEO (#664)
* added keywords metadata tag for google SEO

* fix: avoid empty keywords meta tag

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-10-22 12:13:24 +02:00
Nathan Harkenrider
dde6a10cab
feat: implement cache busting for CSS (#444) 2021-12-28 23:28:33 +01:00
k
dda55f87e2
feat: change the page vertical scrollbar styles (#227)
* fix: take out [data-scheme="dark"] from :root

Taking out the [data-scheme="dark"] from :root allows us to fix the
precedence of CSS when the [data-scheme="dark"] is placed in the <html>
tag. This is needed in order to make the dark styles accesible from the
<html> elment, this will allow us to change the vertical scrollbar
styles following the dark and light schemes.

* change document.body.dataset.scheme to document.documentElement.dataset.scheme

When the dark mode is on or when the light mode is on, the
[data-scheme="light"] or [data-scheme="dark"], respectively, will be
placed in the <html> tag. Allowing us to access the dark and light color
schemes from the <html> to change the vertical scrollbar styles
according to the current color scheme.

* feat: change the page vertical scrollbar styles

This change will make the vertical scrollbar styles to follow the dark
and light color scheme modes. Also, this change will make the vertical
scrollbar to look consistent in both, Chromium and Firefox.

* make the scrollbar-track background-color transparent

The body has this transition: 'transition: background-color 0.3s ease
0s'. Making the scrollbar-track background-color transparent allow us to
appreciate that transition in the scrollbar-track when switching the
background-color.

* Move [data-scheme=dark] back to :root block

* fix(comment/waline): detect dark mode from html tag

* feat: apply custom scrollbar style to all elements

Co-authored-by: Jimmy Cai <jimmehcai@gmail.com>
2021-06-20 15:49:35 +02:00
zhixuan
2c0bf8c940
feat: Add support for Google Analytics v4 (#214) 2021-06-12 09:51:31 +02:00
zhixuan
7dab67b358
refactor(opengraph/twitter): add @ before username (#186)
https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html
2021-04-07 10:31:25 +02:00
Julian Alarcon
83e3a4e8e1
feat: Google Analytics support (#135)
* Added Google Analytics feature

* style: load GA script before head/custom

* style(config): googleAnalytics field empty by default

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2021-02-11 18:56:39 +01:00
Jimmy Cai
358e63e799
feat(darkmode): dark mode toggle (#82)
* feat(darkmode): initial support for dark mode toggle

* fix(darkmode): add svg icons

* feat(darkmode): dispatch onColorSchemeChange event

* add head/darkmode

* feat(darkmode); add colorScheme config

* style: remove empty line

* refactor(darkmode): simplify code

* style: add comment for darkmode config

* i18n support for dark mode toggle

* Some renaming
2020-12-23 19:03:40 +01:00
Jimmy Cai
ddd6aa2d20
feat(head): add favicon setting in config.yaml (#73)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/42
2020-12-20 11:38:49 +01:00
Jimmy Cai
25a72940b8
refactor(opengraph): add default value for twitter:card (#72) 2020-12-20 11:05:34 +01:00
Jimmy Cai
c19780280e
feat: add "head" block 2020-09-26 23:00:48 +02:00
Jimmy Cai
0bcfb160f1
fix: use .RelPermalink to include CSS 2020-09-20 11:33:32 +02:00
Jimmy Cai
93146c9dc3
fix: add .Type as second cache key for helper/image
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/12
2020-09-18 00:12:26 +02:00
Jimmy Cai
8f0d420d24
feat: add partialCached for data/title data/description 2020-09-17 21:59:57 +02:00
Jimmy Cai
cf6502c311
feat: add partialCached to helper/image invocation
Using .RelPermalink as key for cache
2020-09-17 21:52:06 +02:00
Jimmy Cai
5265af0b3b
reafctor(head): rewrite description.html function 2020-09-11 23:00:19 +02:00
Jimmy Cai
6f5ee1bbdb
refactor(head): rewrite title function 2020-09-11 22:50:30 +02:00
Jimmy Cai
b064b5ef85
refactor: move partial/head.html and partial/footer.html 2020-09-11 22:41:40 +02:00
Jimmy Cai
5f7e818b92
refactor(head/opengraph): split code into modules 2020-09-11 21:55:15 +02:00
Jimmy Cai
a2662603df
feat(helper/image): new way to set default image 2020-09-11 16:27:23 +02:00
Jimmy Cai
cfd4cdb731
feat(helper/image): new return format 2020-09-11 16:01:01 +02:00
Jimmy Cai
28c06ef8ae
feat(helper/image): new image helper (WIP) 2020-09-10 18:53:36 +02:00
Jimmy Cai
a6870541dd feat: add head/custom and footer/custom for inserting custom code 2020-08-24 20:48:31 +02:00
Jimmy Cai
901d1f63fc refactor(opengraph): move OpenGraph related settings to .Params.opengraph 2020-08-23 11:30:10 +02:00
Jimmy Cai
18148dbc4f Place webfont at the bottom of the page 2020-08-22 16:14:12 +02:00
Jimmy Cai
c698d944e6 🎉 Initial commit 2020-08-22 13:20:08 +02:00