diff --git a/demo/hugo.toml b/demo/hugo.toml index 03e4d21d..1d9ea89c 100644 --- a/demo/hugo.toml +++ b/demo/hugo.toml @@ -9,7 +9,6 @@ title = "Hugo FixIt Demo" baseURL = "http://example.org/" -# Change the default theme to be use when building the site with Hugo # theme = "FixIt" [markup] diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index c265b253..ab133918 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-alpha-20250817071316-77fcd7fa" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha-20250818030548-c890f613" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/package.json b/package.json index 79013da7..3e6b2eb6 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "server": "hugo server --source=demo --themesDir ../.. --theme $PWD -D --disableFastRender --navigateToChanged --ignoreCache -O", "server:production": "npm run server -- -e production", "server:docs": "hugo server --source=../fixit-docs -D --disableFastRender --navigateToChanged --ignoreCache -O", + "test": "hugo server --source=test --themesDir ../.. --theme $PWD -D --disableFastRender --navigateToChanged --ignoreCache -O", + "test:production": "npm run test -- -e production", "version": "fixit-releaser version --prod", "postversion": "git push && git push --tags && npm run release", "release": "fixit-releaser changelog", diff --git a/test/content/posts/exact-color-match-test.md b/test/content/posts/exact-color-match-test.md new file mode 100644 index 00000000..060a65f5 --- /dev/null +++ b/test/content/posts/exact-color-match-test.md @@ -0,0 +1,41 @@ +--- +title: Exact Color Match Test +date: 2025-08-17T17:20:00+08:00 +collections: + - Tests +--- + +## 📝 Syntax + +| Color | Syntax | Example | Output | +| ----- | ------------------ | -------------------------- | -------------------- | +| HEX | `` `#RRGGBB` `` | `` `#0969DA` `` | `#0969DA` | +| RGB | `` `rgb(R,G,B)` `` | `` `rgb(9, 105, 218)` `` | `rgb(9, 105, 218)` | +| HSL | `` `hsl(H,S,L)` `` | `` `hsl(212, 92%, 45%)` `` | `hsl(212, 92%, 45%)` | + +e.g. The background color is `#ffffff` for light mode and `#000000` for dark mode. + +## ✅ Color Preview + +Pure color values (no leading/trailing characters): + +- `#0969DA` +- `#096` +- `#FF0000` +- `#00FF00` +- `rgb(255, 0, 0)` +- `rgb(0, 255, 0)` +- `hsl(240, 100%, 50%)` +- `hsl(120, 100%, 50%)` + +## ❌ Regular Code + +With leading or trailing characters: + +- `test #0969DA` +- `#0969DA test` +- `color: #0969DA` +- ` #0969DA` (leading space) +- `#0969DA ` (trailing space) +- `background-color: rgb(255, 0, 0)` +- `using hsl(240, 100%, 50%) color` diff --git a/test/hugo.toml b/test/hugo.toml new file mode 100644 index 00000000..61c5f1e4 --- /dev/null +++ b/test/hugo.toml @@ -0,0 +1,45 @@ +# ===================================================================================== +# The following is a necessary configuration for the FixIt theme. +# ===================================================================================== + +# ------------------------------------------------------------------------------------- +# Hugo Configuration +# See: https://gohugo.io/getting-started/configuration/ +# ------------------------------------------------------------------------------------- + +title = "Hugo FixIt Demo" +baseURL = "http://example.org/" +# theme = "FixIt" + +[markup] + _merge = "shallow" + +[outputs] + _merge = "shallow" + +# ------------------------------------------------------------------------------------- +# Taxonomies Configuration +# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies +# ------------------------------------------------------------------------------------- + +[taxonomies] + _merge = "shallow" + +# ------------------------------------------------------------------------------------- +# Theme Core Configuration +# See: https://fixit.lruihao.cn/documentation/basics/#theme-configuration +# ------------------------------------------------------------------------------------- + +[params] + # FixIt theme version + version = "0.3.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. + # ... + [params.page] + collectionList = true + collectionNavigation = true + + [params.author] + name = "Lruihao" + email = "" + link = "https://lruihao.cn" + avatar = "https://lruihao.cn/images/avatar.jpg"