mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✅ Test: add test cases site
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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" . -}}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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`
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user