diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d298be1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ \ No newline at end of file diff --git a/Features.md b/Features.md new file mode 100644 index 0000000..96e0d42 --- /dev/null +++ b/Features.md @@ -0,0 +1,28 @@ +1. Automatic Dark/Light mode based on system settings +2. Dark/Light mode switcher +3. Automatic Diagram dark/light switch +4. Automatic Giscus dark/light switch + +| Feature (light/dark mode) | Anubis2 | +| ---------------------------------------------------------------------- | ------- | +| Line Number (table) and Hilight Lines | ✅ | +| Line Number (true) and Hilight Lines | ✅ | +| Line Number (inline) and Hilight Lines | ✅ | +| Line Number (false) and Hilight Lines | ✅ | +| Line Number (table) and Hilight Lines and Anchor Line | ✅ | +| Line Number (table) and Hilight Inline | ✅ | +| Highlight Shortcode, Line Number (table) and Hilight Lines and Anchor | ✅ | +| Highlight Shortcode, Line Number (inline) and Hilight Lines and Anchor | ✅ | +| Highlight Shortcode, Line Number (false) and Hilight Lines and Anchor | ✅ | +| Mermaid Support (No Config, Lazy Load, Dark/Light Auto Switch) | ✅ | +| MathJax Support (No Config, Lazy Load, Dark/Light Auto Switch) | ✅ | +| Giscus Support (Dark/Light Auto Switch) | ✅ | +| Umami Support (Dark/Light Auto Switch) | ✅ | +| Multi-Author Support | ✅ | +| Multi-Language Support | ✅ | +| Support for \ tag | ✅ | +| Support for \ tag | ✅ | +| Support for \ tag | ✅ | +| Support for \ tag | ✅ | +| Passed CodePreKbdMark test | ✅ | +| Passed All 8 Summary Rendering Tests | ✅ 8/8 | diff --git a/README.md b/README.md index 24dfddc..f57d3f9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Anubis2 is another simple minimalist theme for [Hugo blog engine](https://gohugo ## Highlighted Features - Multilingual -- Dark / Light mode +- Dark / Light mode (Automatic switch based on system settings) - Table of Contents - Comment Support (Giscus, Disque, ISSO, Utterances, GraphComment) - Analytics (Google, Umami) diff --git a/exampleSiteMultilingual/content/posts/advanced-code.md b/exampleSiteMultilingual/content/posts/advanced-code.md deleted file mode 100644 index 8404c7c..0000000 --- a/exampleSiteMultilingual/content/posts/advanced-code.md +++ /dev/null @@ -1,62 +0,0 @@ -+++ -author = "Hugo Authors" -title = "Advanced Usage of code, pre, kbd" -date = "2024-04-09" -description = "Guide to advanced usage of Anubis2" -tags = [ - "emoji", -] -+++ - -`code`
pre
- -CRTL + K + B + D - - -## \ - -Direct Code - -`A verrrrrryyyyy llloooonnnggg coooodeeee` - -`code` `is` `here` - -```plain -multiline -code -here -``` - -```typescript -interface User { - id: number - firstName: string - lastName: string - role: string -} - -function updateUser(id: number, update: Partial) { - const user = getUser(id) - const newUser = { ...user, ...update } - saveUser(id, newUser) -} -``` - -## \ - -
pre text
-
pre text
-
pre text
- -## \ - - -

Press CTRL + C to copy text (Windows).

- -

Press CMD + C to copy text (Mac OS).

- -Press CTRL+ALT+Delete to end the session. - -Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. - -
Press CTRL+ALT+Delete to end the session.
diff --git a/exampleSiteMultilingual/content/posts/demo-code-pre-kbd-mark.md b/exampleSiteMultilingual/content/posts/demo-code-pre-kbd-mark.md new file mode 100644 index 0000000..7e024a4 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-code-pre-kbd-mark.md @@ -0,0 +1,120 @@ ++++ +author = "Hugo Authors" +title = "Demo - Support for code, pre, kbd, mark" +date = "2024-04-22" +description = "Guide to advanced usage of Anubis2" +tags = [ + "emoji", +] ++++ + +## Individual support for code, pre, kbd, mark + +`code`
pre
+ +CRTL + K + B + D + + + +Feel free to switch between the light and dark themes to see the rendering differences. + +### Support for \ tag + +Direct Code + +`A verrrrrryyyyy llloooonnnggg coooodeeee` + +`code` `is` `here` + +```plain +multiline +code +here +``` + +```typescript +// ```typescript +interface User { + id: number + firstName: string + lastName: string + role: string +} +``` + +```typescript {linenos=inline} +// ```typescript {linenos=inline} +function updateUser(id: number, update: Partial) { + const user = getUser(id) + const newUser = { ...user, ...update } + saveUser(id, newUser) +} +``` + +```typescript {linenos=true} +// ```typescript {linenos=true} +function updateUser(id: number, update: Partial) { + const user = getUser(id) + const newUser = { ...user, ...update } + saveUser(id, newUser) +} +``` + +### Support for \ tag + +
pre text
+
pre text
+
pre text
+ +### Support for \ tag + + +

Press CTRL + C to copy text (Windows).

+ +

Press CMD + C to copy text (Mac OS).

+ +Press CTRL+ALT+Delete to end the session. + + +### Support for \ tag + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. + +### Support for \ in \ + +
This is a KBD inside a pre. 
+ +### Support for \ in \ (❌ Should not be used) + +This is a KBD inside a code. + +### Support for \ in \ (❌ Should not be used) + +
This is a CODE inside a pre. 
+ +### Support for \ in \ (❌ Should not be used) + +This is a CODE inside a kbd. + +### Support for \ in \ (❌ Should not be used) + +This is a
PRE
inside a kbd.
+ +### Support for \ in \ (❌ Should not be used) + +This is a
PRE
inside a code.
+ +### Support for \ in \ + +This is a MARK inside a kbd. + +### Support for \ in \ + +This is a MARK inside a code. + +### Support for \ in \ + +
This is a MARK inside a pre. 
\ No newline at end of file diff --git a/exampleSiteMultilingual/content/posts/advanced-diagram.md b/exampleSiteMultilingual/content/posts/demo-diagram.md similarity index 93% rename from exampleSiteMultilingual/content/posts/advanced-diagram.md rename to exampleSiteMultilingual/content/posts/demo-diagram.md index f2f8ae3..47d9852 100644 --- a/exampleSiteMultilingual/content/posts/advanced-diagram.md +++ b/exampleSiteMultilingual/content/posts/demo-diagram.md @@ -1,13 +1,15 @@ +++ author = "Hugo Authors" -title = "Advanced Usage of Diagrams" -date = "2024-04-09" +title = "Demo - Support for Diagrams" +date = "2024-04-19" description = "Guide to advanced usage of Anubis2" tags = [ "emoji", ] +++ +Feel free to switch between the light and dark themes to see how the diagram adapts its colors accordingly. + ## Mermaid Diagrams ```mermaid diff --git a/exampleSiteMultilingual/content/posts/codes.md b/exampleSiteMultilingual/content/posts/demo-multiline-codes.md similarity index 98% rename from exampleSiteMultilingual/content/posts/codes.md rename to exampleSiteMultilingual/content/posts/demo-multiline-codes.md index 1f60c35..f5a8d90 100644 --- a/exampleSiteMultilingual/content/posts/codes.md +++ b/exampleSiteMultilingual/content/posts/demo-multiline-codes.md @@ -1,6 +1,6 @@ +++ author = "Junyi" -title = "Demo - Codes" +title = "Demo - Multiline Codes" date = "2024-04-23" description = "Codes, Codefences, and Syntax Highlighting." tags = [ @@ -10,6 +10,8 @@ tags = [ ] +++ +, the preview should be a good rendering of the content, instead of a "source code" version. --> + ## Line Numbers, Highlight Lines ### Line Number (table) and Highlight Lines diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-1.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-1.md new file mode 100644 index 0000000..83484fd --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-1.md @@ -0,0 +1,23 @@ +--- +title: "Demo - Summary Rendering Test 1 (😃 Easy)" +date: 2024-04-25T1:54:12+08:00 +draft: false +tags: [Hugo] +--- + +This is a summary rendering test. + +## Test Heading + + +`` is applied here. + +## Test Heading Again + +The content below should be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-2.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-2.md new file mode 100644 index 0000000..8b01de8 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-2.md @@ -0,0 +1,20 @@ +--- +title: "Demo - Summary Rendering Test 2 (😏 Easy)" +date: 2024-04-25T1:54:13+08:00 +draft: false +tags: [Hugo] +--- + + + +You should not see this line in preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-3.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-3.md new file mode 100644 index 0000000..e63aca4 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-3.md @@ -0,0 +1,26 @@ +--- +title: "Demo - Summary Rendering Test 3 (🤔 Easy)" +date: 2024-04-25T1:54:14+08:00 +draft: false +tags: [Hugo] +--- + +```c +int main() { + return 0; // Only see this in the summary view +} +``` + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-4.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-4.md new file mode 100644 index 0000000..fbc56ed --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-4.md @@ -0,0 +1,24 @@ +--- +title: "Demo - Summary Rendering Test 4 (😅 Easy?)" +date: 2024-04-25T1:54:15+08:00 +draft: false +tags: [Hugo] +--- + +## Hi, can you see "aaa" in the summary? + +aaa + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-5.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-5.md new file mode 100644 index 0000000..5df0386 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-5.md @@ -0,0 +1,26 @@ +--- +title: "Demo - Summary Rendering Test 5 (😥 Medium)" +date: 2024-04-25T1:54:16+08:00 +draft: false +tags: [Hugo] +--- + +```c +int main() { + return 0; // Only see this in the summary view +} +``` + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-6.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-6.md new file mode 100644 index 0000000..5f0688c --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-6.md @@ -0,0 +1,28 @@ +--- +title: "Demo - Summary Rendering Test 6 (🤯 Hard)" +date: 2024-04-25T1:54:17+08:00 +draft: false +tags: [Hugo] +--- + +```c {linenos=inline} +int main() { + // Is your theme able to handle this? + // Are the content below rendered correctly? + return 0; // Only see this in the summary view +} +``` + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-7.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-7.md new file mode 100644 index 0000000..414a747 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-7.md @@ -0,0 +1,28 @@ +--- +title: "Demo - Summary Rendering Test 7 (😱 Bad Dream)" +date: 2024-04-25T1:54:18+08:00 +draft: false +tags: [Hugo] +--- + +```c {linenos=table} +int main() { + // Is your theme able to handle this? + // Are the content below rendered correctly? + return 0; // Only see this in the summary view +} +``` + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +``` diff --git a/exampleSiteMultilingual/content/posts/demo-summary-rendering-8.md b/exampleSiteMultilingual/content/posts/demo-summary-rendering-8.md new file mode 100644 index 0000000..b3268f2 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/demo-summary-rendering-8.md @@ -0,0 +1,28 @@ +--- +title: "Demo - Summary Rendering Test 8 (💀 Nightmare)" +date: 2024-04-25T1:54:19+08:00 +draft: false +tags: [Hugo] +--- + +```c {linenos=table} +int main() { + // Is your theme able to handle this? + // Are the content below rendered correctly? + return 0; // Only see this in the summary view +} +``` + + + +You MUST NOT see me in the preview + +## Test Heading + +The content below should also be hidden in the summary view. + + + +```html +Will cause a rendering issue? +```