Compare commits

...

94 Commits
v1.3.1 ... main

Author SHA1 Message Date
Junyi
0500942ded
Merge pull request #83 from Junyi-99/Junyi-99-patch-1 2024-11-22 04:39:50 +00:00
Junyi
48c4e20a7d
Update README.md 2024-11-22 12:39:39 +08:00
Junyi
1fa083e0a4
Merge pull request #82 from Junyi-99/Junyi-99-patch-1 2024-11-22 04:39:08 +00:00
Junyi
c08222376c
Update README.md 2024-11-22 12:38:25 +08:00
Junyi
2b390c73d5
Merge pull request #80 from Junyi-99/feat-better-preview 2024-11-18 14:33:05 +08:00
Junyi Hou
c9043c7fcb fix: netlify script 2024-11-18 14:32:07 +08:00
Junyi Hou
40ec45006c feature: enhanced table 2024-11-17 20:20:34 +08:00
Junyi Hou
c434a66c44 fix: table too wide on small devices 2024-11-17 20:10:41 +08:00
Junyi Hou
31d741c932 update the readme 2024-11-17 19:45:22 +08:00
Junyi Hou
d18fb480d3 fix: the readme and make the code block scrollable 2024-11-17 19:44:18 +08:00
Junyi Hou
6b98e015c6 update .gitignore 2024-11-17 19:23:44 +08:00
Junyi Hou
c92d59921f fix: customCSS error message 2024-11-17 19:22:31 +08:00
Junyi Hou
2a6d9b31f8 feat: better preview for math and mermaid 2024-11-17 19:19:14 +08:00
Junyi
8dc8e9ff97
Merge pull request #79 from Junyi-99/feat-77 2024-11-17 16:54:40 +08:00
Junyi Hou
fcd91ec6ff add: bluesky social icon #77 2024-11-17 16:54:09 +08:00
Junyi
95844a6f7a
Merge pull request #63 from Junyi-99/Junyi-99-patch-1
Update README.md
2024-09-11 12:21:34 +08:00
Junyi
d652a8e31c
Update README.md 2024-09-11 12:21:21 +08:00
Junyi
d9b7678e64
Merge pull request #62 from Junyi-99/develop
Develop
2024-09-11 12:09:18 +08:00
Junyi Hou
ac2950a4c0
fix: icon now shown in other languages. 2024-09-11 12:06:53 +08:00
Junyi Hou
422f416612
align with latest Hugo. Hugo is a piece of shit! 2024-09-11 11:57:49 +08:00
Junyi Hou
f53cc0573b upgrade config 2024-08-15 15:54:53 +08:00
Junyi Hou
9b689084a3 upgrade DisqusShortname 2024-08-15 13:43:06 +08:00
Junyi Hou
6806902501 add feat: load "icon.svg" in the posts foler 2024-07-25 16:08:42 +08:00
Junyi
cc7b31bbd0
Merge pull request #59 from Junyi-99/feat-experimental-config
update tracking code
2024-06-14 15:50:21 +08:00
Junyi Hou
0ceec0db71 update GoogleAnalytics for ExampleSite 2024-06-14 15:48:44 +08:00
Junyi
a42dfbdbca
Merge pull request #58 from Junyi-99/feat-experimental-config
Update Readme
2024-06-14 15:41:36 +08:00
Junyi Hou
793e1778cb update readme 2024-06-14 15:40:38 +08:00
Junyi Hou
d3d7541077 update Readme 2024-06-14 15:33:49 +08:00
Junyi
fbd7b4c939
Merge pull request #57 from Junyi-99/feat-experimental-config
add: added error message when customCSS not exist
2024-06-14 15:31:36 +08:00
Junyi
0717eded21
Merge pull request #56 from joaosenger/fix-google-analytics
Fix: google analytics
2024-06-12 01:16:14 +08:00
Junyi
1d9a2eb91a
Merge pull request #53 from massifsurfer/patch-1
Create ce.yaml
2024-06-12 01:08:48 +08:00
Joao Senger
f5bb357b12 fix: gtagexample 2024-06-11 10:36:37 -03:00
Joao Senger
728414737c fix: googleAnalytics 2024-06-11 10:27:58 -03:00
Joao Senger
14d0777437 feat: googleAnalytics 2024-06-11 10:21:37 -03:00
Vlad Grigorian
8e659b1110
Create ce.yaml
i18n for Chechen language
2024-06-08 20:33:09 +03:00
Junyi Hou
2259c04f32 add: added error message when customCSS not exist 2024-05-13 11:03:14 +08:00
Junyi
fc83e3314e
Merge pull request #51 from Junyi-99/feat-experimental-config
fix bug
2024-05-07 16:03:37 +08:00
Junyi Hou
bd3ab84db8 update: change demo site posts order to attract more peoples. 2024-05-07 16:03:03 +08:00
Junyi Hou
8f622b49cf fix: fix the linenumber disappearing because of fix previous bug. 2024-05-07 15:56:37 +08:00
Junyi Hou
5583510cdd fix: fix #47 2024-05-07 15:49:30 +08:00
Junyi
80a6c24950
Merge pull request #50 from Hanse00/main
Corrects readNextPosts logic
2024-05-07 01:36:00 +08:00
Philip Mallegol-Hansen
8c718ed668
Corrects readNextPosts logic
The docs at https://gohugo.io/functions/collections/isset/ specify that the isset function must be called with a lowercase representation of the key we wish to check.

If we do not, the function always returns false.
2024-05-06 10:01:20 -07:00
Junyi
a860ae9764
Merge pull request #46 from Junyi-99/feat-experimental-config
fix: fix the sitemap url
2024-05-03 01:30:49 +08:00
Junyi Hou
c3a7039b35 fix the sitemap url 2024-05-03 01:30:14 +08:00
Junyi
d27aa62d9e
Merge pull request #44 from Hanse00/main 2024-05-02 13:04:38 +08:00
Philip Mallegol-Hansen
5b402c4b5d
Merge branch 'Junyi-99:main' into main 2024-05-01 14:14:28 -07:00
Philip Mallegol-Hansen
8c4d7defca
Improves ToC logic to account for both site and page configuration 2024-05-01 13:58:51 -07:00
Junyi
6f57af9f0a
Merge pull request #45 from Junyi-99/feat-experimental-config
Feat experimental config
2024-05-01 14:36:07 +08:00
Philip Mallegol-Hansen
7484d058f2
Corrects logic for enabling ToC 2024-04-30 22:46:39 -07:00
Junyi Hou
4f04a33623 del: remove experimental configs to reduce misleading.
these configs has not been implemented.
2024-04-29 15:50:00 +08:00
Junyi Hou
b782018b8c update: hide all summary rendering tests because Hugo refused to fix the bug. 2024-04-29 15:47:00 +08:00
Junyi
f9b293c17d
Merge pull request #43 from ChenYin626/main
added support for police beian for China ISP
2024-04-29 15:40:34 +08:00
chenyin
b44d2a736c added support for police beian for China ISP 2024-04-29 15:23:22 +08:00
Junyi
bd0cd40fbd
Merge pull request #42 from Junyi-99/Junyi-99-patch-2
Update README.md
2024-04-29 12:24:33 +08:00
Junyi
48f1064af1
Update README.md 2024-04-29 12:22:40 +08:00
Junyi
3310c840fd
Merge pull request #41 from Junyi-99/feat-experimental-config
add: added support for ICP beian for China ISP
2024-04-29 12:09:59 +08:00
Junyi Hou
06a4f7aceb add: added support for ICP beian for China ISP 2024-04-29 12:09:19 +08:00
Junyi
8b402ff168
Merge pull request #39 from Junyi-99/feat-experimental-config
Merge feat-experimental-config
2024-04-28 01:59:57 +08:00
Junyi
007dc9d929 Merge branch 'feat-experimental-config' of https://github.com/Junyi-99/hugo-theme-anubis2 into feat-experimental-config 2024-04-28 01:59:29 +08:00
Junyi
01358cd31f fix: there is a hugo bug, so disble the summary rendering test. 2024-04-28 01:58:45 +08:00
Junyi
fb52f33321
Merge branch 'main' into feat-experimental-config 2024-04-28 01:48:12 +08:00
Junyi
4d6fbc8c9a
Merge pull request #38 from Junyi-99/Junyi-99-patch-1
Update README.md
2024-04-26 13:14:47 +08:00
Junyi
a60fc4661f
Update README.md 2024-04-26 13:14:36 +08:00
Junyi Hou
893f4a77a4 update: "rssIcon" defaults to "true" && "readNextPosts" defaults to "3" 2024-04-26 12:46:52 +08:00
Junyi Hou
e7a93e2088 update: "colorThemeSwitcher" defaults to "true" 2024-04-26 12:37:08 +08:00
Junyi Hou
87172dbdfc update: "toc" defaults to "true" 2024-04-26 12:31:17 +08:00
Junyi Hou
e57e3dd83d update "author" parameter 2024-04-26 12:29:07 +08:00
Junyi Hou
64ffd77659 update demos 2024-04-25 13:41:05 +08:00
Junyi Hou
d9cb67008f add: added support for codefences highlight test 2024-04-23 20:09:41 +08:00
Junyi Hou
5fc27f5285 add: added a shortcode "icon" 2024-04-23 19:31:41 +08:00
Junyi Hou
9507d51bd2 fix: fix the scroll bar issue (when codefence only have one line, the copy-btn will make a scrool bar) 2024-04-23 18:59:16 +08:00
Junyi
adce82a54c fix: fix the scroll bar shows when there are only one line in ``` 2024-04-23 13:44:24 +08:00
Junyi
764e110d32 fix: fix the "pre" and "code" have different width when codefences are too wide 2024-04-23 13:00:52 +08:00
Junyi
6965a86c4d add: added support for "lineno" in codefences, added support for "<kbd>" tag 2024-04-23 12:53:21 +08:00
Junyi
18110d3f43
Merge pull request #36 from gsingh93/css
Fix template formatting in main.css
2024-04-17 18:58:09 +08:00
Gulshan Singh
1f6787278d Fix template formatting in main.css 2024-04-17 01:31:49 -07:00
Junyi Hou
dca1ced53c update Readme 2024-04-14 21:34:26 +08:00
Junyi Hou
68a33f8d40 feat: disable selection for social icons 2024-04-10 14:12:00 +08:00
Junyi Hou
a44399eb41 feat: multi-language divider style 2024-04-10 13:55:14 +08:00
Junyi Hou
068a362879 fix: typo in hugo.toml 2024-04-09 20:54:46 +08:00
Junyi Hou
4c59bcb723 feat: experimental configuration 2024-04-09 20:52:16 +08:00
Junyi Hou
3f5f3d7ced optimize for SEO 2024-04-09 20:45:19 +08:00
Junyi Hou
2c8a0e374e Merge branch 'feat-math-on-demand' into pre-release 2024-04-09 20:43:38 +08:00
Junyi Hou
84276e542d feat: enhance accessibility 2024-04-09 20:36:45 +08:00
Junyi Hou
90a5c66d8b add: Added on-demand mathjax load to speedup performance 2024-04-09 20:30:37 +08:00
Junyi Hou
1c2abf59d0 update example posts 2024-04-09 20:22:36 +08:00
Junyi Hou
230bc7ddc8 remove subpage in a page 2024-04-09 20:22:28 +08:00
Junyi Hou
0f646e7082 rename post -> posts 2024-04-09 20:14:49 +08:00
Junyi Hou
41c5286796 update example site config 2024-04-09 20:03:52 +08:00
Junyi Hou
a1cd164e9a pre-commit formatter 2024-04-09 20:03:09 +08:00
Junyi Hou
ddec81c876 advanced style 2024-04-09 19:56:30 +08:00
Junyi Hou
9f33764cff fix: PermaLink to RelPermalink 2024-04-09 19:33:28 +08:00
Junyi Hou
f774d2689d fix the baseURL 2024-04-09 19:25:48 +08:00
Junyi Hou
d979f023f4 add: feature of sass 2024-04-09 19:18:45 +08:00
167 changed files with 1608 additions and 999 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
public/
.DS_Store

32
Features.md Normal file
View File

@ -0,0 +1,32 @@
# Features
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 \<code\> tag | ✅ |
| Support for \<pre\> tag | ✅ |
| Support for \<kbd\> tag | ✅ |
| Support for \<mark\> tag | ✅ |
| Passed CodePreKbdMark test | ✅ |
| Passed All 8 Summary Rendering Tests | ✅ 8/8 |
| Mermaid dark/light manual switch | ✅ |
| Mermaid dark/light auto switch | ✅ |

View File

@ -2,44 +2,99 @@
Anubis2 is another simple minimalist theme for [Hugo blog engine](https://gohugo.io/), check our [Demo](https://www.junyi.dev/). Anubis2 is another simple minimalist theme for [Hugo blog engine](https://gohugo.io/), check our [Demo](https://www.junyi.dev/).
> 📝 Please note that anubis2 is under active maintenance, so please REMEMBER to keep your theme up to date!
>
![image](https://github.com/Junyi-99/hugo-theme-anubis2/assets/14367694/8d9a591b-e168-4328-a770-eb2e8f04f657) ![image](https://github.com/Junyi-99/hugo-theme-anubis2/assets/14367694/8d9a591b-e168-4328-a770-eb2e8f04f657)
| Light | Dark (Code) | Dark (Math) |
| :------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: |
| <img width="1166" alt="demo1" src="https://github.com/user-attachments/assets/dbdd43bc-3efe-4fdf-ab8f-f20af2cf9229"> | <img width="1112" alt="demo3" src="https://github.com/user-attachments/assets/7356ef18-00c7-44c9-91d9-0dfb9b500910"> | <img width="1166" alt="demo2" src="https://github.com/user-attachments/assets/46e19440-b054-4df9-968b-7920d74f3d80"> |
> [!IMPORTANT]
> **Update Your Blog Configuration**
> Please ensure your blog configuration file (`hugo.toml`, `hugo.yaml`, or `hugo.json`) is updated to the latest version provided with the template.
>
> **Hugo frequently changes its configuration file structure**, which may lead to compatibility issues if your configuration is outdated.
>
> Check the [Anubis2 template](https://github.com/Junyi-99/hugo-theme-anubis2/tree/main/exampleSiteMultilingual) for the latest config file.
## Highlighted Features ## Highlighted Features
- Multilingual - Multilingual
- Dark / Light mode - Dark / Light mode (Automatic switch based on system settings)
- Table of Contents - Table of Contents
- Comment Support (Giscus, Disque, ISSO, Utterances, GraphComment) - Comment Support (Giscus, Disque, ISSO, Utterances, GraphComment)
- Analytics (Google, Umami) - Analytics (Google, Umami)
- RSS feeds - RSS feeds
- Mobile Support - Mobile Support
- [Full Features](wiki/Full-Features)
## Installation ## Installation & Configuration
You need to install an extended version of Hugo to run this theme. You need to install an extended version of Hugo to run this theme.
### As Git Submodule For more information read the [official setup guide of Hugo](https://gohugo.io/installation/).
Inside the folder of your Hugo site run: ### Install theme as Git Submodule
$ git submodule add https://github.com/Junyi-99/hugo-theme-anubis2.git themes/anubis2 Inside the folder of your Hugo site, run:
For more information read the official [setup guide](https://gohugo.io/overview/installing/) of Hugo. ```bash
git submodule add https://github.com/Junyi-99/hugo-theme-anubis2.git themes/anubis2
```
### Run your site That's all, let's configure anubis2.
In order to see your site in action, run Hugo's built-in local server. ### Configure your site
`$ hugo server` Don't be panic, configure Anubis2 is really **simple**.
Now enter [`localhost:1313`](http://localhost:1313/) in the address bar of your browser. **This is the minimum configuration:**
```toml
baseURL = "https://hugo-theme-anubis2.netlify.app/"
languageCode = "en-us"
theme = "anubis2"
title = "Anubis2 Demo Site"
[params.author]
name = "Junyi"
[markup.goldmark.renderer]
unsafe = true # true | false; Enable unsafe mode to have a better experience
[markup.highlight]
style = 'base16-snazzy' # Chroma style, find more at here: https://swapoff.org/chroma/playground/
```
You are encouraged keeping other fields as defaults and fine-tune them when you have time! (see [Full Configuration Examples](https://github.com/Junyi-99/hugo-theme-anubis2/wiki/Configuration-Example))
In the other way, you can check out the example site's [configuration file](exampleSiteMultilingual/hugo.toml)
## Run your site
In order to see your site, run Hugo's built-in local server.
```bash
hugo server
```
Now enter [`http://localhost:1313`](http://localhost:1313/) in the address bar of your browser to open your site.
## Update Anubis2 to the latest version
In your Hugo site folder, run this command:
```bash
git submodule update --remote
```
## Contributing ## Contributing
If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/Junyi-99/hugo-theme-anubis2/issues) or make a PR. If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/Junyi-99/hugo-theme-anubis2/issues) or make a PR.
## License ## License
MIT © Junyi, 2024 MIT © Junyi, 2024

View File

@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
draft: true draft: true
--- ---

View File

@ -154,14 +154,20 @@ thead {
table { table {
max-width: 100%; max-width: 100%;
display: block;
overflow: scroll;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
font-size: 14px;
} }
th, th,
td { td {
padding: 0.5em 1em; padding: 0.25em 0.5em;
border: 1px double var(--table-border-color); border: 1px double var(--table-border-color);
} }
/* Code */ /* Code */
@ -175,16 +181,18 @@ kbd {
color: var(--pre-color); color: var(--pre-color);
background-color: var(--pre-bg-color); background-color: var(--pre-bg-color);
font-family: 'Menlo', 'Courier New', 'Consolas', monospace; font-family: 'Menlo', 'Courier New', 'Consolas', monospace;
font-size: 14.4px; /* 18px * 0.6 */ font-size: 14.4px;
/* 18px * 0.6 */
line-height: 154%; line-height: 154%;
border-radius: 6px; border-radius: 6px;
border: 1px solid var(--pre-border-color); border: 1px solid var(--pre-border-color);
overflow: auto; overflow: scroll;
} }
/* <code> tag */ /* <code> tag */
code { code {
font-size: 14.4px; /* 18px * 0.6 */ font-size: 14.4px;
/* 18px * 0.6 */
padding: 0.1em 0.3em; padding: 0.1em 0.3em;
} }
@ -203,7 +211,8 @@ p kbd,
pre kbd, pre kbd,
p kbd kbd, p kbd kbd,
pre kbd kbd { pre kbd kbd {
font-size: 14.4px; /* 18px * 0.6 */ font-size: 14.4px;
/* 18px * 0.6 */
background-color: var(--kbd-bg-color); background-color: var(--kbd-bg-color);
border: 1px solid var(--pre-border-color); border: 1px solid var(--pre-border-color);
border-width: 1px 2px 2px 1px; border-width: 1px 2px 2px 1px;
@ -212,8 +221,74 @@ pre kbd kbd {
margin-right: 0.2em; margin-right: 0.2em;
} }
/* ```python``` like */ p code,
pre code { p kbd {
padding: 0.1em 0.3em;
/* top, bottom */
/* margin-right: 4px; */
}
td pre {
border: none;
/* padding: 0px; */
border-radius: 0px;
}
td:first-child pre {
padding-right: 0;
}
td:last-child pre {
padding-left: 0;
}
td pre code {
/* when there is a line number grid */
padding: 0px;
display: flex;
flex-direction: column;
border-radius: 0px;
/* padding-top: 4px; */
/* padding-bottom: 4px; */
}
div.highlight {
border-radius: 6px;
border: 1px solid var(--pre-border-color);
margin-bottom: 14px;
}
div.highlight div {
overflow: scroll;
}
div.highlight pre {
border: none;
display: grid;
margin: 0px;
overflow: auto;
/* Have to add this line, otherwise the "pre" and "code" will have different width */
/* padding-left: 10px; */
/* padding-right: 10px; */
/* padding-top: 10px; */
/* padding-bottom: 10px; */
}
div.highlight code {
padding-left: 0px;
padding-right: 0px;
overflow: unset;
}
div.highlight code a:hover,
div.highlight code a:focus {
color: white;
border-bottom: 1px solid white;
/*for markup.highlight.anchorLineNos = true*/
}
pre code,
pre kbd {
color: inherit; color: inherit;
background-color: inherit; background-color: inherit;
border: none; border: none;
@ -679,6 +754,8 @@ code.has-jax {
.post-translations>li:not(:last-child)::after { .post-translations>li:not(:last-child)::after {
content: "|"; content: "|";
display: inline-block; display: inline-block;
margin-left: 4px;
margin-right: 4px;
} }
.post-translations>li a { .post-translations>li a {
@ -794,33 +871,30 @@ ul.footer-menu>li {
/* Copy code */ /* Copy code */
.highlight { .highlight {
position: relative; position: relative;
overflow: auto; overflow: hidden;
}
.highlight pre {
padding-right: 75px;
} }
.highlight:hover .highlight-copy-btn { .highlight:hover .highlight-copy-btn {
display: inline-block; display: inline-block;
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(0, 0, 0, 0.5);
} }
.highlight-copy-btn { .highlight-copy-btn {
display: none; display: none;
position: absolute; position: absolute;
top: 18px; top: 0px;
right: 2px; right: 0px;
border: 0; border: 1px solid rgba(0, 0, 0, 0.5);
border-radius: 6px; border-radius: 6px;
padding: 1px; padding: 1px;
font-size: 0.7em; font-size: 0.7em;
line-height: 1.8; line-height: 1.8;
color: #fff; color: #fff;
background-color: rgba(255, 255, 255, 0.1); background-color: rgba(255, 255, 255, 0.1);
min-width: 25px; min-width: 22px;
text-align: center; text-align: center;
transition: border 0.3s; transition: border 0.3s;
transition: background-color 0.3s;
} }
.highlight-copy-btn:hover { .highlight-copy-btn:hover {
@ -889,48 +963,3 @@ ul.footer-menu>li {
max-width: 10em; max-width: 10em;
} }
} }
{
{
range site.Params.customCSS
}
}
{
{
$custom : =resources.Get .
}
}
{
{
$custom.Content
}
}
{
{
end
}
}
{
{
if site.Params.isso.enabled
}
}
#isso-thread .textarea {
color: #000;
}
#isso-thread .isso-feedlink {
position: relative;
z-index: 1;
}
{
{
end
}
}

View File

@ -16,6 +16,7 @@ social_icons:
vk: https://vk.com/%s vk: https://vk.com/%s
youtube: https://www.youtube.com/c/%s youtube: https://www.youtube.com/c/%s
4chan: 4chan:
bluesky: https://bsky.app/profile/%s
# docs: # docs:
gitlab: gitlab:
leetcode: https://leetcode.com/%s leetcode: https://leetcode.com/%s

View File

@ -0,0 +1,11 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
# - id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files

View File

@ -0,0 +1,9 @@
@import 'foundation/vars';
junyi {
display: block;
font: 100% $font-stack;
color: $primary-color;
background-color: $background-color;
margin-top: 1em;
}

View File

@ -0,0 +1,7 @@
.anubis-custom-style {
background-color: pink;
color: black;
padding: 1em;
border-radius: 0.3em;
border: 1px solid black;
}

View File

@ -0,0 +1,3 @@
$font-stack: Helvetica, sans-serif;
$primary-color: rgb(255, 255, 168);
$background-color: rgb(85, 85, 85);

View File

@ -1,4 +1,3 @@
+++ +++
author = "Hugo Authors" author = "Hugo Authors"
+++ +++

View File

@ -1,24 +0,0 @@
---
title: "About Subpage"
description: "About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage
menu:
subpage:
identifier: about-subpage-s
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
About subpage

View File

@ -1,24 +0,0 @@
---
title: "About Subpage"
description: "About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage
menu:
subpage:
identifier: about-subpage-s
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
About subpage

View File

@ -1,24 +0,0 @@
---
title: "Second About Subpage"
description: "Second About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage2
menu:
subpage:
identifier: about-subpage-s2
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Second About subpage

View File

@ -1,24 +0,0 @@
---
title: "Second About Subpage"
description: "Second About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage2
menu:
subpage:
identifier: about-subpage-s2
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Second About subpage

View File

@ -1,35 +1,22 @@
--- +++
title: "About" title = "About"
description: "Hugo, the worlds fastest framework for building websites" description = "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28" date = "2024-04-09"
aliases: ["about-us","about-hugo","contact"] aliases = ["about-us", "about-hugo"]
author: "Hugo Authors" author = ["Hugo Authors", "Junyi"]
menu: +++
subpage:
identifier: about-subpage [Anubis2](https://github.com/Junyi-99/hugo-theme-anubis2) is another simple minimalist theme for Hugo blog engine.
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Hugo makes use of a variety of open source projects including: Hugo makes use of a variety of open source projects including:
* https://github.com/yuin/goldmark * <https://github.com/yuin/goldmark>
* https://github.com/alecthomas/chroma * <https://github.com/alecthomas/chroma>
* https://github.com/muesli/smartcrop * <https://github.com/muesli/smartcrop>
* https://github.com/spf13/cobra * <https://github.com/spf13/cobra>
* https://github.com/spf13/viper * <https://github.com/spf13/viper>
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
@ -38,6 +25,3 @@ Hugo is for people who want to hand code their own website without worrying abou
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio). Learn more and contribute on [GitHub](https://github.com/gohugoio).

View File

@ -1,43 +1,29 @@
--- +++
title: "About" title = "About"
description: "Hugo, the worlds fastest framework for building websites" description = "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28" date = "2024-04-09"
aliases: ["about-us","about-hugo","contact"] aliases = ["about-us", "about-hugo"]
author: "Hugo Authors" author = ["Hugo Authors", "Junyi"]
menu: +++
subpage:
identifier: about-subpage
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. [Anubis2](https://github.com/Junyi-99/hugo-theme-anubis2) to kolejny prosty, minimalistyczny motyw dla silnika blogowego Hugo.
Hugo makes use of a variety of open source projects including: Napisany w języku Go, Hugo jest statycznym generatorem stron o otwartym kodzie źródłowym dostępnym na licencji [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE). Hugo obsługuje typy plików danych TOML, YAML i JSON, pliki treści Markdown i HTML oraz wykorzystuje skróty do dodawania bogatej zawartości. Inne godne uwagi funkcje to taksonomie, tryb wielojęzyczny, przetwarzanie obrazów, niestandardowe formaty wyjściowe, minifikacja HTML/CSS/JS i obsługa przepływów pracy Sass SCSS.
* https://github.com/yuin/goldmark Hugo korzysta z różnych projektów open source, w tym:
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. * <https://github.com/yuin/goldmark>
* <https://github.com/alecthomas/chroma>
* <https://github.com/muesli/smartcrop>
* <https://github.com/spf13/cobra>
* <https://github.com/spf13/viper>
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. Hugo jest idealny dla blogów, stron korporacyjnych, kreatywnych portfolio, magazynów online, aplikacji jednostronicowych, a nawet witryn z tysiącami stron.
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Hugo jest przeznaczony dla osób, które chcą ręcznie zakodować własną stronę internetową, nie martwiąc się o konfigurowanie skomplikowanych środowisk uruchomieniowych, zależności i baz danych.
Learn more and contribute on [GitHub](https://github.com/gohugoio).
Strony internetowe zbudowane za pomocą Hugo są niezwykle szybkie, bezpieczne i mogą być wdrażane w dowolnym miejscu, w tym w AWS, GitHub Pages, Heroku, Netlify i u dowolnego innego dostawcy usług hostingowych.
Dowiedz się więcej i wnieś swój wkład na [GitHub](https://github.com/gohugoio).
Przetłumaczono z DeepL.com (wersja darmowa)

View File

@ -1,43 +1,27 @@
--- +++
title: "About" title = "About"
description: "Hugo, the worlds fastest framework for building websites" description = "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28" date = "2024-04-09"
aliases: ["about-us","about-hugo","contact"] aliases = ["about-us", "about-hugo"]
author: "Hugo Authors" author = ["Hugo Authors", "Junyi"]
menu: +++
subpage:
identifier: about-subpage
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. [Anubis2](https://github.com/Junyi-99/hugo-theme-anubis2) 是另一个适用于 Hugo 博客引擎的简约主题。
Hugo makes use of a variety of open source projects including: Hugo 是用 Go 语言编写的,是一个开源的静态站点生成器,可在 Apache License 2.0 下获得。Hugo 支持 TOML、YAML 和 JSON 数据文件类型Markdown 和 HTML 内容文件并使用短代码添加丰富内容。其他显著特性包括分类法、多语言模式、图像处理、自定义输出格式、HTML/CSS/JS 压缩以及对 Sass SCSS 工作流的支持。
* https://github.com/yuin/goldmark Hugo 利用了多个开源项目,包括:
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. * <https://github.com/yuin/goldmark>
* <https://github.com/alecthomas/chroma>
* <https://github.com/muesli/smartcrop>
* <https://github.com/spf13/cobra>
* <https://github.com/spf13/viper>
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. Hugo 非常适合博客、企业网站、创意作品集、在线杂志、单页应用程序,甚至是拥有数千页的网站。
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).
Hugo 适用于那些想要亲手编码自己网站的人,而不用担心设置复杂的运行时、依赖和数据库。
使用 Hugo 构建的网站非常快速、安全,并且可以部署在任何地方,包括 AWS、GitHub Pages、Heroku、Netlify 和任何其他托管提供商。
在 GitHub 上了解更多并贡献。

View File

@ -1,5 +0,0 @@
---
date: 2019-05-28
type: section
layout: "archives"
---

View File

@ -1,146 +0,0 @@
+++
author = "Hugo Authors"
title = "Markdown Syntax Guide"
date = "2019-03-11"
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags = [
"markdown",
"css",
"html",
"themes",
]
categories = [
"themes",
"syntax",
]
aliases = ["migrate-from-jekyl"]
favorite = true
+++
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
<!--more-->
## Headings
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1
## H2
### H3
#### H4
##### H5
###### H6
## Paragraph
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
#### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use *Markdown syntax* within a blockquote.
#### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.</p>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age
--------|------
Bob | 27
Alice | 23
#### Inline Markdown within tables
| Inline&nbsp;&nbsp;&nbsp; | Markdown&nbsp;&nbsp;&nbsp; | In&nbsp;&nbsp;&nbsp; | Table |
| ---------- | --------- | ----------------- | ---------- |
| *italics* | **bold** | ~~strikethrough~~&nbsp;&nbsp;&nbsp; | `code` |
## Code Blocks
#### Code block with backticks
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
#### Code block indented with four spaces
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
#### Code block with Hugo's internal highlight shortcode
{{< highlight html >}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}
## List Types
#### Ordered List
1. First item
2. Second item
3. Third item
#### Unordered List
* List item
* Another item
* And another item
#### Nested list
* Item
1. First Sub-item
2. Second Sub-item
## Other Elements — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

View File

@ -1,45 +0,0 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup KaTeX
math: true
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->
In this example we will be using [KaTeX](https://katex.org/)
- Create a partial under `/layouts/partials/math.html`
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
- Include the partial in your templates like so:
```
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files.
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$
Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

View File

@ -1,45 +0,0 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup KaTeX
math: true
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->
In this example we will be using [KaTeX](https://katex.org/)
- Create a partial under `/layouts/partials/math.html`
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
- Include the partial in your templates like so:
```
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files.
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$
Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

View File

@ -1,58 +0,0 @@
+++
author = "Hugo Authors"
title = "Placeholder Text"
date = "2019-03-09"
description = "Lorem Ipsum Dolor Si Amet"
tags = [
"markdown",
"text",
]
+++
Lorem est tota propiore conpellat pectoribus de
pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice
subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc
caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis
lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.<!--more-->
1. Exierant elisi ambit vivere dedere
2. Duce pollice
3. Eris modo
4. Spargitque ferrea quos palude
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus
silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria
tractus malis.
1. Comas hunc haec pietate fetum procerum dixit
2. Post torum vates letum Tiresia
3. Flumen querellas
4. Arcanaque montibus omnes
5. Quidem et
# Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
## Mane refeci capiebant unda mulcebat
Victa caducifer, malo vulnere contra
dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere
furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli
Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare
Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert
ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae
vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem
Propoetides **parte**.
{{< css.inline >}}
<style>
.canon { background: white; width: 100%; height: auto;}
</style>
{{< /css.inline >}}

View File

@ -1,34 +0,0 @@
+++
author = "Hugo Authors"
title = "Rich Content"
date = "2019-03-10"
description = "A brief description of Hugo Shortcodes"
tags = [
"shortcodes",
"privacy",
]
+++
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---
## YouTube Privacy Enhanced Shortcode
{{< youtube ZJthWmvUzzc >}}
<br>
---
## Twitter Simple Shortcode
{{< tweet user="DesignReviewed" id="1085870671291310081" >}}
<br>
---
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}

View File

@ -1,58 +0,0 @@
+++
author = "Hugo Authors"
title = "Usage of code, pre, kbd"
date = "2024-04-09"
description = "Guide to advanced usage of Anubis2"
tags = [
"emoji",
]
+++
## \<code\>
<code>Direct Code</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<User>) {
const user = getUser(id)
const newUser = { ...user, ...update }
saveUser(id, newUser)
}
```
## \<pre\>
<pre>pre text</pre>
<pre>pre text</pre>
<pre>pre text</pre>
## \<kbd\>
<p>Press <kbd>CTRL</kbd> + <kbd>C</kbd> to copy text (Windows).</p>
<p>Press <kbd>CMD</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
<pre>Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.</pre>

View File

@ -0,0 +1,66 @@
+++
author = "Hugo Authors"
title = "Advanced Style"
date = "2024-04-09"
description = "Guide to advanced usage of Anubis2"
tags = [
"emoji",
]
+++
There are examples of how to use custom `global-wise style` or `page-wise style`.
<!--more-->
<div class="anubis-custom-style">
The custom <code>.css</code> <code>.scss</code> <code>.sass</code> file should be placed in <code>assets/</code> folder. (instead of <code>static/</code>)
</div>
<junyi>
This page is affected by <code>assets/css/custom1.scss</code> and <code>assets/css/custom2.css</code> and <code>advanced-style/style.css</code>
</junyi>
<junyi><code>advanced-style/style.css</code> affects only the current page.</junyi>
```html
<style>
@import 'style.css';
</style>
```
<style>
@import 'style.css';
</style>
<junyi><code>assets/css/custom1.scss</code> and <code>assets/css/custom2.scss</code> will have global effect.
```scss
// assets/css/custom2.css
.anubis-custom-style {
background-color: pink;
color: black;
padding: 1em;
border-radius: 0.3em;
border: 1px solid black;
}
```
```scss
// assets/css/foundation/_vars.scss
$font-stack: Helvetica, sans-serif;
$primary-color: rgb(255, 255, 168);
$background-color: rgb(85, 85, 85);
```
```scss
// assets/css/custom1.scss
@import 'foundation/vars';
junyi {
display: block;
font: 100% $font-stack;
color: $primary-color;
background-color: $background-color;
margin-top: 1em;
}
```

View File

@ -0,0 +1,8 @@
@import 'subfolder/hello.scss';
.container {
max-width: none;
padding-left: 5em;
padding-right: 5em;
background-color: white;
}

View File

@ -0,0 +1,120 @@
+++
author = "Hugo Authors"
title = "Demo - Support for code, pre, kbd, mark"
date = "2024-04-30"
description = "Guide to advanced usage of Anubis2"
tags = [
"emoji",
]
+++
## Individual support for code, pre, kbd, mark
`code` <pre>pre</pre>
<kbd>CRTL</kbd> + <kbd>K</kbd> + <kbd>B</kbd> + <kbd>D</kbd>
<!--more-->
Feel free to switch between the light and dark themes to see the rendering differences.
### Support for \<code\> tag
<code>Direct Code</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<User>) {
const user = getUser(id)
const newUser = { ...user, ...update }
saveUser(id, newUser)
}
```
```typescript {linenos=true}
// ```typescript {linenos=true}
function updateUser(id: number, update: Partial<User>) {
const user = getUser(id)
const newUser = { ...user, ...update }
saveUser(id, newUser)
}
```
### Support for \<pre\> tag
<pre>pre text</pre>
<pre>pre text</pre>
<pre>pre text</pre>
### Support for \<kbd\> tag
<p>Press <kbd>CTRL</kbd> + <kbd>C</kbd> to copy text (Windows).</p>
<p>Press <kbd>CMD</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
### Support for \<mark\> tag
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
### Support for \<kbd\> in \<pre\>
<pre>This is a <kbd>KBD</kbd> inside a pre. </pre>
### Support for \<kbd\> in \<code\> (❌ Should not be used)
<code>This is a <kbd>KBD</kbd> inside a code. </code>
### Support for \<code\> in \<pre\> (❌ Should not be used)
<pre>This is a <code>CODE</code> inside a pre. </pre>
### Support for \<code\> in \<kbd\> (❌ Should not be used)
<kbd>This is a <code>CODE</code> inside a kbd. </kbd>
### Support for \<pre\> in \<kbd\> (❌ Should not be used)
<kbd>This is a <pre>PRE</pre> inside a kbd. </kbd>
### Support for \<pre\> in \<code\> (❌ Should not be used)
<code>This is a <pre>PRE</pre> inside a code. </code>
### Support for \<mark\> in \<kbd\>
<kbd>This is a <mark>MARK</mark> inside a kbd. </kbd>
### Support for \<mark\> in \<code\>
<code>This is a <mark>MARK</mark> inside a code. </code>
### Support for \<mark\> in \<pre\>
<pre>This is a <mark>MARK</mark> inside a pre. </pre>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chart-histogram"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 3v18h18" /><path d="M20 18v3" /><path d="M16 16v5" /><path d="M12 13v8" /><path d="M8 16v5" /><path d="M3 11c6 0 5 -5 9 -5s3 5 9 5" /></svg>

After

Width:  |  Height:  |  Size: 468 B

View File

@ -1,29 +1,33 @@
+++ +++
author = "Hugo Authors" author = "Hugo Authors"
title = "Advanced Diagram Usage" title = "Demo - Support for Diagrams"
date = "2024-04-09" date = "2024-05-06"
description = "Guide to advanced usage of Anubis2" description = "Guide to advanced usage of Anubis2"
tags = [ tags = [
"emoji", "emoji",
] ]
+++ +++
Feel free to switch between the light and dark themes to see how the diagram adapts its colors accordingly.
## GoAT
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```
## Mermaid Diagrams ## Mermaid Diagrams
Get more examples at [here](https://mermaid.js.org/intro/) ```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in Another :2014-01-12, 12d
another task :24d
```
Get more examples at [About Mermaid](https://mermaid.js.org/intro/)
<!--more-->
```mermaid ```mermaid
gitGraph: gitGraph:
@ -41,18 +45,7 @@ gitGraph:
commit commit
``` ```
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in Another :2014-01-12, 12d
another task :24d
```
```mermaid ```mermaid
stateDiagram stateDiagram
@ -103,3 +96,15 @@ sequenceDiagram
John->>Bob: How about you? John->>Bob: How about you?
Bob-->>John: Jolly good! Bob-->>John: Jolly good!
``` ```
## GoAT
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```

View File

@ -0,0 +1,110 @@
+++
author = "Hugo Authors"
title = "Demo - Support for Diagrams"
date = "2024-05-06"
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
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in Another :2014-01-12, 12d
another task :24d
```
Get more examples at [About Mermaid](https://mermaid.js.org/intro/)
<!--more-->
```mermaid
gitGraph:
commit "Ashish"
branch newbranch
checkout newbranch
commit id:"1111"
commit tag:"test"
checkout main
commit type: HIGHLIGHT
commit
merge newbranch
commit
branch b2
commit
```
```mermaid
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
```mermaid
sankey-beta
Pumped heat,"Heating and cooling, ""homes""",193.026
Pumped heat,"Heating and cooling, ""commercial""",70.672
```
```mermaid
sequenceDiagram
loop Daily query
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
end
```
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
## GoAT
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```

View File

@ -0,0 +1,206 @@
+++
author = "Junyi"
title = "Demo - Multiline Codes"
date = "2024-04-23"
description = "Codes, Codefences, and Syntax Highlighting."
tags = [
"icons",
"anubis2",
"hugo"
]
+++
```c {linenos=table, hl_lines=[1,"3-4",8], linenostart=199}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
## Truth Table
| Item | Line Numbers | Highlight Lines | Anchor Lines | Wide CodeBlock Scroll | Supported |
| ------------------------ | ------------ | --------------- | ------------ | --------------------- | --------- |
| **Full Feature Support** | ture | true | true | ✅ | ✅ |
| | table | true | true | ✅ | ✅ |
| | table | true | false | ✅ | ✅ |
| | inline | | | ✅ | ✅ |
| | ture | true | false | ✅ | ✅ |
| | ture | false | false | ✅ | ✅ |
| | false | true | / | ✅ | ✅ |
| Basic Support | false | false | / | ✅ | ✅ |
Note: Anubis2 does not support `hl_inline=true`
<!--more-->
## Line Numbers, Highlight Lines
### Line Number (table) and Highlight Lines
`linenos=table` will give copy-and-paste friendly code blocks.
```c {linenos=table, hl_lines=[1,"3-4",8], linenostart=199}
// codes ...
```
```c {linenos=table, hl_lines=[1,"3-4",8], linenostart=199}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
### Line Number (true) and Highlight Lines
```c {linenos=true, hl_lines=[1,"3-4",8], linenostart=1}
// codes ...
```
```c {linenos=true, hl_lines=[1,"3-4",8], linenostart=1}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
### Line Number (inline) and Highlight Lines
```c {linenos=inline, hl_lines=[1,"3-4",8], linenostart=1}
// codes ...
```
```c {linenos=inline, hl_lines=[1,"3-4",8], linenostart=1}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
### Line Number (false) and Highlight Lines
`linenos=false` will turn off line numbers if its configured to be on in site configuration.
```c {linenos=false, hl_lines=[1,"3-4",8]}
// codes ...
```
```c {linenos=false, hl_lines=[1,"3-4",8]}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
## Anchor, Inline, Shortcode
### Line Number (table) and Highlight Lines and Anchor
Now you can click on the line number to get a link to that line.
```c {linenos=table, hl_lines=[1,"3-4",8], linenostart=199, anchorlinenos=true}
// codes ...
```
```c {linenos=table, hl_lines=[1,"3-4",8], linenostart=199, anchorlinenos=true}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
### Highlight Inline are not supported by Anubis2 ❌
```c {linenos=true,hl_lines=[1,3,5], hl_inline=true}
// codes ...
```
```c {linenos=true,hl_lines=[1,3,5], hl_inline=true}
int main() {
int a = 1;
if (a == 999)
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
```
<!--
Those are trash codes.
### Highlight shortcode, with Line Number (table), with Highlight Lines and Anchor
{{</* highlight c "linenos=table,hl_lines=1 3-4 8, anchorlinenos=true" */>}}
// codes
{{</* /highlight */>}}
{{< highlight c "linenos=table,hl_lines=1 3-4 8, anchorlinenos=true" >}}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
{{< / highlight >}}
### Highlight shortcode, with Line Number (inline), with Highlight Lines and Anchor
{{</* highlight c "linenos=inline,hl_lines=1 3-4 8, anchorlinenos=true" */>}}
// codes
{{</* /highlight */>}}
{{< highlight c "linenos=inline,hl_lines=1 3-4 8, anchorlinenos=true" >}}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
{{< / highlight >}}
### Highlight shortcode, No Line Number, With Highlight Lines and Anchor
{{</* highlight c "linenos=false,hl_lines=1 3-4 8, anchorlinenos=true" */>}}
// codes
{{</* /highlight */>}}
{{< highlight c "linenos=false,hl_lines=1 3-4 8, anchorlinenos=true" >}}
int main() {
int a = 1;
if (a == 999)
// This is a very long comment to test the `overflow` attribute defined in CSS. The `overflow` property in CSS deals with the content when it overflows the block-level container. It can take the following values: `visible` (default), `hidden`, `scroll`, `auto`, and `clip`.
// If `visible` is specified, the content is not clipped and can render outside the container. If `hidden` is specified, the content is clipped and the rest of the content will be invisible. If `scroll` is specified, the browser should provide a scrolling mechanism for the user to access the clipped content.
}
return 0;
}
{{< / highlight >}} -->

View File

@ -0,0 +1,24 @@
---
title: "Demo - Summary Rendering Test 1 (😃 Easy)"
date: 2024-04-25T1:54:12+08:00
draft: true
hidden: true
tags: [Hugo]
---
This is a summary rendering test.
## Test Heading
<!--more-->
`<!--more-->` is applied here.
## Test Heading Again
The content below should be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,21 @@
---
title: "Demo - Summary Rendering Test 2 (😏 Easy)"
date: 2024-04-25T1:54:13+08:00
draft: true
hidden: true
tags: [Hugo]
---
<!--more-->
<mark>You should not see this line in preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,27 @@
---
title: "Demo - Summary Rendering Test 3 (🤔 Easy)"
date: 2024-04-25T1:54:14+08:00
draft: true
hidden: true
tags: [Hugo]
---
```c
int main() {
return 0; // Only see this in the summary view
}
```
<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,25 @@
---
title: "Demo - Summary Rendering Test 4 (😅 Easy?)"
date: 2024-04-25T1:54:15+08:00
draft: true
hidden: true
tags: [Hugo]
---
## Hi, can you see "aaa" in the summary?
aaa
<!--<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,27 @@
---
title: "Demo - Summary Rendering Test 5 (😥 Medium)"
date: 2024-04-25T1:54:16+08:00
draft: true
hidden: true
tags: [Hugo]
---
```c
int main() {
return 0; // <!--more--> Only see this in the summary view
}
```
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,29 @@
---
title: "Demo - Summary Rendering Test 6 (🤯 Hard)"
date: 2024-04-25T1:54:17+08:00
draft: true
hidden: true
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
}
```
<!--<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,29 @@
---
title: "Demo - Summary Rendering Test 7 (😱 Bad Dream)"
date: 2024-04-25T1:54:18+08:00
draft: true
hidden: true
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
}
```
<!--<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -0,0 +1,29 @@
---
title: "Demo - Summary Rendering Test 8 (💀 Nightmare)"
date: 2024-04-25T1:54:19+08:00
draft: true
hidden: true
tags: [Hugo]
---
<!--<!--more-->
```c {linenos=table}
int main() {
// Is your theme able to handle this? <!--<!--more-->
// Are the content below rendered correctly? <!--more-->
return 0; // Only see this in the summary view
}
```
<!--<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```

View File

@ -9,7 +9,7 @@ tags = [
+++ +++
Emoji can be enabled in a Hugo project in a number of ways. Emoji can be enabled in a Hugo project in a number of ways.
<!--more-->
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
To enable emoji globally, set `enableEmoji` to `true` in your sites [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. To enable emoji globally, set `enableEmoji` to `true` in your sites [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.

View File

@ -1,6 +1,6 @@
+++ +++
author = "Hugo Authors" author = "Hugo Authors"
title = "Emoji Support" title = "Emoji 支持"
date = "2019-03-05" date = "2019-03-05"
description = "Guide to emoji usage in Hugo" description = "Guide to emoji usage in Hugo"
tags = [ tags = [
@ -8,13 +8,12 @@ tags = [
] ]
+++ +++
Emoji can be enabled in a Hugo project in a number of ways. 在 Hugo 博客里,你可以用多种方式使用 Emoji
<!--more-->
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
To enable emoji globally, set `enableEmoji` to `true` in your sites [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. To enable emoji globally, set `enableEmoji` to `true` in your sites [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p> <p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
<br> <br>

View File

@ -0,0 +1,58 @@
+++
author = "Junyi"
title = "Demo - Social Icons"
date = "2024-05-05"
description = "Guide to using social icons supported by Anubis2."
tags = [
"icons",
"anubis2",
"hugo"
]
+++
To use an icon, simply copy its shortcode and paste it into your content where you want the icon to appear. The shortcode must be enclosed in `{{</* */>}}`.
<!--more-->
Here is a list of available icons, their shortcodes, and what they look like when rendered:
| name | shortcode | icon |
| ---------- | ---------------------------------- | ---------------------------- |
| 4chan | `{{</* icon "4chan" */>}}` | {{< icon "4chan" >}} |
| leetcode | `{{</* icon "leetcode" */>}}` | {{< icon "leetcode" >}} |
| qq | `{{</* icon "qq" */>}}` | {{< icon "qq" >}} |
| spotify | `{{</* icon "spotify" */>}}` | {{< icon "spotify" >}} |
| tinder | `{{</* icon "tinder" */>}}` | {{< icon "tinder" >}} |
| youtube | `{{</* icon "youtube" */>}}` | {{< icon "youtube" >}} |
| docs | `{{</* icon "docs" */>}}` | {{< icon "docs" >}} |
| linkedin | `{{</* icon "linkedin" */>}}` | {{< icon "linkedin" >}} |
| reddit | `{{</* icon "reddit" */>}}` | {{< icon "reddit" >}} |
| steam | `{{</* icon "steam" */>}}` | {{< icon "steam" >}} |
| tumblr | `{{</* icon "tumblr" */>}}` | {{< icon "tumblr" >}} |
| zhihu | `{{</* icon "zhihu" */>}}` | {{< icon "zhihu" >}} |
| email | `{{</* icon "email" */>}}` | {{< icon "email" >}} |
| mastodon | `{{</* icon "mastodon" */>}}` | {{< icon "mastodon" >}} |
| rss | `{{</* icon "rss" */>}}` | {{< icon "rss" >}} |
| teams | `{{</* icon "teams" */>}}` | {{< icon "teams" >}} |
| twitch | `{{</* icon "twitch" */>}}` | {{< icon "twitch" >}} |
| facebook | `{{</* icon "facebook" */>}}` | {{< icon "facebook" >}} |
| medium | `{{</* icon "medium" */>}}` | {{< icon "medium" >}} |
| skype | `{{</* icon "skype" */>}}` | {{< icon "skype" >}} |
| telegram | `{{</* icon "telegram" */>}}` | {{< icon "telegram" >}} |
| twitter | `{{</* icon "twitter" */>}}` | {{< icon "twitter" >}} |
| github | `{{</* icon "github" */>}}` | {{< icon "github" >}} |
| netease | `{{</* icon "netease-music" */>}}` | {{< icon "netease-music" >}} |
| slack | `{{</* icon "slack" */>}}` | {{< icon "slack" >}} |
| theme | `{{</* icon "theme-dark" */>}}` | {{< icon "theme-dark" >}} |
| vk | `{{</* icon "vk" */>}}` | {{< icon "vk" >}} |
| gitlab | `{{</* icon "gitlab" */>}}` | {{< icon "gitlab" >}} |
| notion | `{{</* icon "notion" */>}}` | {{< icon "notion" >}} |
| snapchat | `{{</* icon "snapchat" */>}}` | {{< icon "snapchat" >}} |
| theme | `{{</* icon "theme-light" */>}}` | {{< icon "theme-light" >}} |
| weibo | `{{</* icon "weibo" */>}}` | {{< icon "weibo" >}} |
| instagram | `{{</* icon "instagram" */>}}` | {{< icon "instagram" >}} |
| patreon | `{{</* icon "patreon" */>}}` | {{< icon "patreon" >}} |
| soundcloud | `{{</* icon "soundcloud" */>}}` | {{< icon "soundcloud" >}} |
| tiktok | `{{</* icon "tiktok" */>}}` | {{< icon "tiktok" >}} |
| x | `{{</* icon "x" */>}}` | {{< icon "x" >}} |

View File

@ -1,7 +1,7 @@
+++ +++
author = "Hugo Authors" author = "Hugo Authors"
title = "Markdown Syntax Guide" title = "Markdown Syntax Guide"
date = "2019-03-11" date = "2024-05-07"
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags = [ tags = [
"markdown", "markdown",
@ -19,22 +19,37 @@ favorite = true
+++ +++
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
<!--more--> <!--more-->
## Headings ## Headings
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest. The following HTML `<h2>`—`<h6>` elements represent 5 levels of section headings. `<h2>` is the highest section level while `<h6>` is the lowest.
# H1
## H2 ## H2
You should using `## H2` as your section title, since the file title is `# H1`
If you use `# H1` as your section title, you will get a warning from linter:
```txt
MD025/single-title/single-h1: Multiple top-level headings in the same document
```
### H3 ### H3
#### H4 #### H4
##### H5 ##### H5
###### H6 ###### H6
## Paragraph ## Paragraph
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur?
Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
@ -42,17 +57,17 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
#### Blockquote without attribution ### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae. > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
>
> **Note** that you can use *Markdown syntax* within a blockquote. > **Note** that you can use *Markdown syntax* within a blockquote.
#### Blockquote with attribution ### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.</p> > Don't communicate by sharing memory, share memory by communicating.</p>
> — <cite>Rob Pike[^1]</cite> > — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables ## Tables
@ -64,17 +79,17 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
Bob | 27 Bob | 27
Alice | 23 Alice | 23
#### Inline Markdown within tables ### Inline Markdown within tables
| Inline&nbsp;&nbsp;&nbsp; | Markdown&nbsp;&nbsp;&nbsp; | In&nbsp;&nbsp;&nbsp; | Table | Inline | Markdown | In | Table
| ---------- | --------- | ----------------- | ---------- | ---------- | --------- | ----------------- | ----------
| *italics* | **bold** | ~~strikethrough~~&nbsp;&nbsp;&nbsp; | `code` | *italics* | **bold** | ~~strikethrough~~ | `code`
## Code Blocks ## Code Blocks
#### Code block with backticks ### Code block with backticks and showing highlighted lines
```html ```html {linenos=table, hl_lines=[1,"4-5",8], linenostart=199}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -86,7 +101,8 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</body> </body>
</html> </html>
``` ```
#### Code block indented with four spaces
### Code block indented with four spaces
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
@ -99,7 +115,8 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</body> </body>
</html> </html>
#### Code block with Hugo's internal highlight shortcode ### Code block with Hugo's internal highlight shortcode
{{< highlight html >}} {{< highlight html >}}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -115,22 +132,24 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
## List Types ## List Types
#### Ordered List ### Ordered List
1. First item 1. First item
2. Second item 2. Second item
3. Third item 3. Third item
#### Unordered List ### Unordered List
* List item * List item
* Another item * Another item
* And another item * And another item
#### Nested list ### Nested list
* Item * Item
1. First Sub-item 1. First Sub-item
2. Second Sub-item 2. Second Sub-item
## Other Elements — abbr, sub, sup, kbd, mark ## Other Elements — abbr, sub, sup, kbd, mark
@ -141,7 +160,6 @@ H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup> X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session. Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures. Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

View File

@ -0,0 +1,21 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup MathJax
math: true
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
- To enable MathJax on a page basis include the parameter `math: true` in content files.
## Examples
Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$
Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

View File

@ -31,7 +31,7 @@ tractus malis.
4. Arcanaque montibus omnes 4. Arcanaque montibus omnes
5. Quidem et 5. Quidem et
# Vagus elidunt ## Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg> <svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>

View File

@ -1,22 +1,27 @@
baseURL = "https://hugo-theme-anubis2.netlify.app/" baseURL = "/"
languageCode = "en-us" languageCode = "en-us"
defaultContentLanguage = "en" defaultContentLanguage = "en"
title = "Anubis2" title = "Anubis2 Demo Site"
theme = "anubis2" theme = "anubis2"
paginate = 3
disqusShortname = "" disqusShortname = ""
[pagination]
pagerSize = 5
[author]
[params.author]
name = "Junyi" name = "Junyi"
email = "me@junyi.dev"
location = "Singapore"
[params] [params]
author = "Junyi"
description = "Anubis2 is another simple minimalist theme for Hugo blog engine." description = "Anubis2 is another simple minimalist theme for Hugo blog engine."
dateFormat = "2006-01-02" dateFormat = "2006-01-02"
paginationSinglePost = true paginationSinglePost = true
# icp = "京ICP备xxxxx号-1" # for China ICP license
# police = "京公网安备 12345678号" # for China police beian
colorTheme = "auto" colorTheme = "auto"
colorThemeSwitcher = true colorThemeSwitcher = true
@ -25,7 +30,7 @@ readNextPosts = 2
copyCodeButton = true copyCodeButton = true
rssAsSocialIcon = true rssAsSocialIcon = true
locale = "en-us" locale = "en-us"
mathjax = false math = false # true: enable mathjax globally (default is false)
toc = true toc = true
# Graphcomment support # Graphcomment support
@ -38,48 +43,21 @@ GiscusCategoryId = "DIC_kwDOLEp76c4CcbPS"
GiscusLazyLoad = false GiscusLazyLoad = false
GiscusDataMapping = "pathname" GiscusDataMapping = "pathname"
[[params.social]] customCSS = ["custom-css/custom1.scss", "custom-css/custom2.css"]
id = "docs"
url = "https://gohugo.io/documentation/"
[[params.social]] social = [
id = "github" { id = "docs", url = "https://gohugo.io/documentation/" },
url = "https://github.com/Junyi-99/hugo-theme-anubis2" { id = "github", url = "https://github.com/Junyi-99/hugo-theme-anubis2" },
{ id = "linkedin", url = "https://www.linkedin.com/" },
[[params.social]] { id = "email", url = "example@example.com" },
id = "linkedin" { id = "facebook", url = "#" },
url = "https://www.linkedin.com/" { id = "instagram", url = "#" },
{ id = "netease-music", url = "#" },
[[params.social]] { id = "telegram", url = "#" },
id = "email" { id = "x", url = "#" },
url = "example@example.com" { id = "youtube", url = "#" },
{ id = "bluesky", url = "#" }
[[params.social]] ]
id = "facebook"
url = "#"
[[params.social]]
id = "instagram"
url = "#"
[[params.social]]
id = "netease-music"
url = "#"
[[params.social]]
id = "telegram"
url = "#"
[[params.social]]
id = "x"
url = "#"
[[params.social]]
id = "youtube"
url = "#"
[languages.en]
languageName = "English"
[[menu.main]] [[menu.main]]
identifier = "home" identifier = "home"
@ -105,10 +83,13 @@ identifier = "archive"
url = "/posts/" url = "/posts/"
weight = 4 weight = 4
[languages]
[languages.en]
languageName = "English"
[languages.pl] [languages.pl]
languageName = "Polski" languageName = "Polski"
[[languages.pl.menu.main]] [[languages.pl.menu.main]]
identifier = "home" identifier = "home"
name = "Strona Główna" name = "Strona Główna"
@ -171,14 +152,27 @@ category = "categories"
tag = "tags" tag = "tags"
author = "authors" author = "authors"
[markup.goldmark.renderer] [markup]
unsafe = true defaultMarkdownHandler = 'goldmark'
[markup.goldmark.renderer]
unsafe = true # Enable unsafe mode to have a better experience
[markup.highlight]
anchorLineNos = false
codeFences = true # tested with true and false. Both work.
noClasses = true # If you run with markup.highlight.noClasses=false in your site configuration, you need a style sheet.
style = 'catppuccin-frappe' # Find more style at here: https://swapoff.org/chroma/playground/
tabWidth = 4
[params.UmamiAnalytics] [params.UmamiAnalytics]
enabled = true enabled = true
dnt = false dnt = false
id = "e4f661ff-9a8c-49d4-b3cc-2efe553e3973" # Website ID id = "d01ce82c-c8f4-4714-ba37-ba4899f2a885" # Website ID
datacache = false datacache = false
url = "https://eu.umami.is/script.js" url = "https://umami.xtra.science/script.js"
shareUrl = "https://eu.umami.is/share/RIETUMwZn4IBMIr8/hugo-theme-anubis2.netlify.app" shareUrl = "https://umami.xtra.science/share/Fy0goUn0b9rrxxGe/hugo-theme-anubis2.netlify.app"
[params.GoogleAnalytics]
enabled = true
gtag = "G-32F16X8HLF"

56
i18n/ce.yaml Normal file
View File

@ -0,0 +1,56 @@
powered:
other: "Озорг"
theme:
other: "тем"
readMore:
other: "ДӀаеша"
toNewPosts:
other: "керла дӀаяздаршка хӀо"
toOldPosts:
other: "тиша дӀаяздаршка хӀо"
tag:
other: "тег"
Tags:
other: "Тегаш"
Posts:
other: "ДӀаяздарш"
category:
other: "категори"
Categories:
other: "Категореш"
toAllTags:
other: "тегаш лемаре хӀо"
toAllAuthors:
other: "авторш лемаре хӀо"
toAllCategories:
other: "категореш лемаре хӀо"
skipToContent:
other: "коьрта контенте хӀо"
readNext:
other: "ДӀаеша"
lastMod:
other: "йуха яздин ю:"
toNewPost:
other: "керла д1аяздаре хӀо"
toOldPost:
other: "тиша дӀаяздаре хӀо"
videoIsNotSupported:
other: "хӀа браузер окх видео цан болх ца бо"

View File

@ -9,24 +9,42 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .RelPermalink }}</link>
<description>{{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</description> <description>{{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} {{ with .Site.Params.author }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} {{ with .email }}
<managingEditor>{{.}}
{{ with $.Site.Params.author.name }}
({{.}})
{{end}}
</managingEditor>
{{end}}
{{ with .Site.Params.author.email }}
<webMaster>
{{.}}
{{ with $.Site.Params.author.name }}
({{.}})
{{end}}
</webMaster>
{{end}}
{{ end }}
{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }} {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .RelPermalink .MediaType | safeHTML }}
{{ end }} {{ end }}
{{ range $pages }} {{ range $pages }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .RelPermalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .RelPermalink }}</guid>
<description>{{ .Content | html }}</description> <description>{{ .Content | html }}</description>
</item> </item>
{{ end }} {{ end }}

View File

@ -1,11 +1,11 @@
{{ define "main" }} {{ define "main" }}
{{ if .Menus }} {{/* {{ if .Menus }}
<nav class="post-navigation"> <nav class="post-navigation">
{{ range .Menus }} {{ range .Menus }}
<a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name | markdownify }}</a> <a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name | markdownify }}</a>
{{ end }} {{ end }}
</nav> </nav>
{{ end }} {{ end }} */}}
<article class="post h-entry"> <article class="post h-entry">
<div class="post-header"> <div class="post-header">
@ -22,8 +22,13 @@
</article> </article>
{{ if gt .Site.Params.readNextPosts 0 }} {{ $readNextPosts := 3}}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }} {{ if site.Params.readNextPosts }}
{{ $readNextPosts = site.Params.readNextPosts }}
{{ end }}
{{ if gt $readNextPosts 0 }}
{{ $related := .Site.RegularPages.Related . | first $readNextPosts }}
{{ with $related }} {{ with $related }}
<h3 class="read-next-title noselect">{{ i18n "readNext" }}</h3> <h3 class="read-next-title noselect">{{ i18n "readNext" }}</h3>
<ul class="read-next-posts noselect"> <ul class="read-next-posts noselect">
@ -48,30 +53,10 @@
*/}} */}}
{{ if .Store.Get "hasMermaid" }} {{ if .Store.Get "hasMermaid" }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }} {{ partial "mermaid_support.html" . }}
{{ $colorTheme := "light" }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }}
{{ end }} {{ end }}
<script type="module"> {{ if .Params.math }}
function detectCurrentScheme3() { {{ partial "mathjax_support.html" . }}
const defaultTheme = "{{ $colorTheme }}";
if (localStorage !== null && localStorage.getItem("user-color-scheme")) {
return localStorage.getItem("user-color-scheme");
}
if (defaultTheme === "dark" || defaultTheme === "light") {
return defaultTheme;
}
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
window.mermaid = mermaid;
window.initMermaid()
document.body.dispatchEvent(new CustomEvent(detectCurrentScheme3() + "-theme-set"));
</script>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -8,6 +8,7 @@
{{ range (.Paginate $pages).Pages }} {{ range (.Paginate $pages).Pages }}
{{ partial "post-summary.html" . }} {{ partial "post-summary.html" . }}
{{ end }} {{ end }}
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</div> </div>

View File

@ -1,4 +1,4 @@
{{ if .Site.DisqusShortname }} {{ if .Site.Config.Services.Disqus.Shortname }}
{{ partial "disqus.html" . }} {{ partial "disqus.html" . }}
{{ end }} {{ end }}

View File

@ -5,19 +5,35 @@
{{ end }} {{ end }}
<div class="common-footer-bottom"> <div class="common-footer-bottom">
{{ if .Site.Menus.footer }} {{ if site.Menus.footer }}
{{ $currentPage := . }} {{ $currentPage := . }}
<ul class="footer-menu"> <ul class="footer-menu">
{{ range .Site.Menus.footer }} {{ range site.Menus.footer }}
<li><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a></li> <li><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
<div style="display: flex; align-items: center; gap:8px"> <div style="display: flex; align-items: center; gap:8px">
© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }} © {{ if site.Params.Author.name }} {{ site.Params.Author.name }}, {{end}} {{ now.Year }}
{{ if .Site.Params.UmamiAnalytics.shareUrl }} {{ if site.Params.UmamiAnalytics.shareUrl }}
<a style="display: flex; align-items: center; border-bottom: none; cursor: pointer; color: var(--pagination-link-color)" href="{{ .Site.Params.UmamiAnalytics.shareUrl }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-report-analytics"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /><path d="M9 17v-5" /><path d="M12 17v-1" /><path d="M15 17v-3" /></svg></a> <a aria-label="Check statistics data" style="display: flex; align-items: center; border-bottom: none; cursor: pointer; color: var(--pagination-link-color)" href="{{ site.Params.UmamiAnalytics.shareUrl }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-report-analytics"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /><path d="M9 17v-5" /><path d="M12 17v-1" /><path d="M15 17v-3" /></svg></a>
{{ end }}
</div>
<div style="display:flex;align-items: center">
{{ $police := site.Params.police }}
{{ $info := "info" }}
{{ $pattern := "[0-9]+" }}
{{ $matches := findRE $pattern $police }}
{{ if $matches }}
{{ $firstNumber := index $matches 0 }}
{{ $info = print $firstNumber }}
<img src="https://beian.mps.gov.cn/img/logo01.dd7ff50e.png" alt="备案图标" style="width: 1em;height: 1em;object-fit: contain;">
<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{$info}}">{{ site.Params.police }}</a>
&nbsp;
{{ end }}
{{ if site.Params.icp }}
<a target="_blank" href="https://beian.miit.gov.cn/">{{ site.Params.icp }}</a>
{{ end }} {{ end }}
</div> </div>
<div> <div>

View File

@ -0,0 +1,8 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.GoogleAnalytics.gtag }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ .Site.Params.GoogleAnalytics.gtag }}');
</script>

View File

@ -16,20 +16,22 @@
{{ end }} {{ end }}
{{ with .OutputFormats.Get "rss" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}} {{ end -}}
{{ partial "favicons.html" . }} {{ partial "favicons.html" . }}
{{ $colorTheme := "light" }} {{ $colorTheme := "light" }}
{{ $colorThemeSwitcher := false }} {{ $colorThemeSwitcher := true }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }} {{ $colorTheme = site.Params.colortheme | lower }}
{{ end }} {{ end }}
{{ if and (isset site.Params "colorthemeswitcher") }} {{ if isset site.Params "colorthemeswitcher" }}
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }} {{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
{{ else }}
{{ $colorThemeSwitcher = true }}
{{ end }} {{ end }}
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }} {{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
@ -54,6 +56,36 @@
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }}
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
{{ range site.Params.customCSS }}
{{ $r := "" }}
{{ with resources.Get . }}
{{ $r = . }}
{{ else }}
{{ errorf "error: You defined customCSS, but %s was not found in the local file system, please check your config." . }}
{{ end }}
{{ if $r}}
{{ with $r | toCSS $opts | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ end }}
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
<style>
#isso-thread .textarea {
color: #000;
}
#isso-thread .isso-feedlink {
position: relative;
z-index: 1;
}
</style>
{{ end }}
{{ if .Site.Params.copyCodeButton | default true }} {{ if .Site.Params.copyCodeButton | default true }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }} {{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }}
{{ end }} {{ end }}
@ -80,8 +112,8 @@
<meta property="article:tag" content=""> <meta property="article:tag" content="">
<meta property="article:publisher" content="https://www.facebook.com/XXX"> --> <meta property="article:publisher" content="https://www.facebook.com/XXX"> -->
{{ if and (.Site.GoogleAnalytics) (hugo.IsProduction) }} {{ if (.Site.Params.GoogleAnalytics.enabled) }}
{{ template "_internal/google_analytics.html" . }} {{ partial "google_analytics.html" . }}
{{ end }} {{ end }}
{{ if (.Site.Params.UmamiAnalytics.enabled ) }} {{ if (.Site.Params.UmamiAnalytics.enabled ) }}

View File

@ -20,6 +20,7 @@
<nav></nav> <nav></nav>
{{ end }} {{ end }}
{{ if .Site.Params.mathjax }}{{ partial "mathjax_support.html" . }}{{ end }} {{/* .Params is the current page config. .Site.Params is globall config in hugo.toml */}}
{{ if or .Site.Params.math .Params.math }}{{ partial "mathjax_support.html" . }}{{ end }}
{{ partial "header-extra.html" . }} {{ partial "header-extra.html" . }}

View File

@ -9,7 +9,7 @@
{{ if eq .Lang $pageLang }} {{ if eq .Lang $pageLang }}
<li>{{ .Language.LanguageName }}</li> <li>{{ .Language.LanguageName }}</li>
{{ else }} {{ else }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li> <li><a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>

View File

@ -0,0 +1,24 @@
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }}
{{ $colorTheme := "light" }}
{{ if and (site.Params.colortheme) (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }}
{{ end }}
<script type="module">
function detectCurrentScheme3() {
const defaultTheme = "{{ $colorTheme }}";
if (localStorage !== null && localStorage.getItem("user-color-scheme")) {
return localStorage.getItem("user-color-scheme");
}
if (defaultTheme === "dark" || defaultTheme === "light") {
return defaultTheme;
}
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
window.mermaid = mermaid;
window.initMermaid()
document.body.dispatchEvent(new CustomEvent(detectCurrentScheme3() + "-theme-set"));
</script>

View File

@ -18,7 +18,7 @@
</div> </div>
{{ end }} {{ end }}
<a class="post-hidden-url u-url" href="{{ .Permalink }}">{{ .Permalink }}</a> <a class="post-hidden-url u-url" href="{{ .RelPermalink }}">{{ .RelPermalink }}</a>
<a href="{{ .Site.BaseURL }}" class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a> <a href="{{ .Site.BaseURL }}" class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a>
@ -27,7 +27,7 @@
<ul class="post-categories"> <ul class="post-categories">
{{ range $cat_name := .Params.categories }} {{ range $cat_name := .Params.categories }}
{{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name | urlize )) }} {{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name | urlize )) }}
<li><a href="{{ $cat.Permalink }}">{{ $cat.Title | default $cat_name }}</a></li> <li><a href="{{ $cat.RelPermalink }}">{{ $cat.Title | default $cat_name }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
@ -35,7 +35,7 @@
<ul class="post-tags"> <ul class="post-tags">
{{ range $tag_name := .Params.tags }} {{ range $tag_name := .Params.tags }}
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name | urlize )) }} {{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name | urlize )) }}
<li><a href="{{ $tag.Permalink }}">#{{ $tag.Title | default $tag_name }}</a></li> <li><a href="{{ $tag.RelPermalink }}">#{{ $tag.Title | default $tag_name }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
@ -43,7 +43,7 @@
<ul class="post-authors"> <ul class="post-authors">
{{ range $author_name := .Params.authors }} {{ range $author_name := .Params.authors }}
{{ $author := ($.Site.GetPage (printf "/authors/%s" $author_name | urlize )) }} {{ $author := ($.Site.GetPage (printf "/authors/%s" $author_name | urlize )) }}
<li><a href="{{ $author.Permalink }}">@{{ $author_name }}</a></li> <li><a href="{{ $author.RelPermalink }}">@{{ $author_name }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}

View File

@ -9,7 +9,7 @@
</li> </li>
{{ else }} {{ else }}
<li> <li>
<a href="{{ .Permalink }}">{{ upper .Lang }}</a> <a href="{{ .RelPermalink }}">{{ upper .Lang }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -1,7 +1,24 @@
<article class="post-list h-feed post-card"> <article class="post-list h-feed post-card">
<div class="post-header"> <div class="post-header">
<header> <header>
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a></h1> {{ $random := (md5 .Title) }}
{{ $iconPath := printf "%sicon.svg" .File.Dir }}
{{ if fileExists $iconPath }}
<style>
.post-icon-{{ $random }}::before {
display: inline-block;
content: '';
background: url("/{{ $iconPath }}");
width: 1.2em;
height: 1.2em;
background-size: auto 100%;
vertical-align: text-bottom;
}
</style>
{{ end }}
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}} {{ if fileExists $iconPath}}post-icon-{{$random}}{{end}}">
<a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a>
</h1>
</header> </header>
{{ partial "post-language-switcher.html" . }} {{ partial "post-language-switcher.html" . }}
</div> </div>
@ -11,11 +28,20 @@
{{ .Summary | safeHTML }} {{ .Summary | safeHTML }}
</div> </div>
{{ end }} {{ end }}
{{ if and (.Truncated) (.Site.Params.readMore) }} {{ if and (.Truncated) (.Site.Params.readMore) }}
<div class="read-more"> <div class="read-more">
<a class="u-url" href="{{ .RelPermalink }}">{{ i18n "readMore" }}</a> <a class="u-url" href="{{ .RelPermalink }}">{{ i18n "readMore" }}</a>
</div> </div>
{{ end }} {{ end }}
{{ if .Store.Get "hasMermaid" }}
{{ partial "mermaid_support.html" . }}
{{ end }}
{{ if .Params.math }}
{{ partial "mathjax_support.html" . }}
{{ end }}
{{ partial "post-info.html" . }} {{ partial "post-info.html" . }}
</article> </article>

View File

@ -15,9 +15,9 @@
{{ $resource = $resource | resources.Fingerprint "sha256" }} {{ $resource = $resource | resources.Fingerprint "sha256" }}
{{ if eq .type "css" }} {{ if eq .type "css" }}
<link rel="stylesheet" href="{{ $resource.Permalink }}" integrity="{{ $resource.Data.Integrity }}"> <link rel="stylesheet" href="{{ $resource.RelPermalink }}" integrity="{{ $resource.Data.Integrity }}">
{{ else if eq .type "js" }} {{ else if eq .type "js" }}
<script src="{{ $resource.Permalink }}" type="text/javascript" charset="utf-8" integrity="{{ $resource.Data.Integrity }}"></script> <script src="{{ $resource.RelPermalink }}" type="text/javascript" charset="utf-8" integrity="{{ $resource.Data.Integrity }}"></script>
{{ end }} {{ end }}
<!-- For backward compatibility --> <!-- For backward compatibility -->
{{ else }} {{ else }}

View File

@ -1,4 +1,4 @@
<ul class="social-icons"> <ul class="social-icons noselect">
{{ range $.Site.Params.Social }} {{ range $.Site.Params.Social }}
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "url") }} {{ if and (isset $.Site.Data.social.social_icons .id) (isset . "url") }}
@ -24,10 +24,15 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if .Site.Params.rssAsSocialIcon }} {{ $rssIcon := true }}
{{ if isset .Site.Params "rssIcon" }}
{{ $rssIcon = .Site.Params.rssIcon }}
{{ end }}
{{ if $rssIcon }}
{{ with .Site.Home.OutputFormats.Get "rss" -}} {{ with .Site.Home.OutputFormats.Get "rss" -}}
<li> <li>
<a {{ printf "href=%q" .Permalink | safeHTMLAttr }} title="RSS" rel="me"> <a {{ printf "href=%q" .RelPermalink | safeHTMLAttr }} title="RSS" rel="me">
{{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }} {{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }}
</a> </a>
</li> </li>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-bluesky"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.335 5.144c-1.654 -1.199 -4.335 -2.127 -4.335 .826c0 .59 .35 4.953 .556 5.661c.713 2.463 3.13 2.75 5.444 2.369c-4.045 .665 -4.889 3.208 -2.667 5.41c1.03 1.018 1.913 1.59 2.667 1.59c2 0 3.134 -2.769 3.5 -3.5c.333 -.667 .5 -1.167 .5 -1.5c0 .333 .167 .833 .5 1.5c.366 .731 1.5 3.5 3.5 3.5c.754 0 1.637 -.571 2.667 -1.59c2.222 -2.203 1.378 -4.746 -2.667 -5.41c2.314 .38 4.73 .094 5.444 -2.369c.206 -.708 .556 -5.072 .556 -5.661c0 -2.953 -2.68 -2.025 -4.335 -.826c-2.293 1.662 -4.76 5.048 -5.665 6.856c-.905 -1.808 -3.372 -5.194 -5.665 -6.856z" /></svg>

After

Width:  |  Height:  |  Size: 873 B

View File

@ -1,16 +1,16 @@
{{ $colorTheme := "light" }} {{ $colorTheme := "light" }}
{{ $colorThemeSwitcher := false }} {{ $colorThemeSwitcher := true }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }} {{ $colorTheme = site.Params.colortheme | lower }}
{{ end }} {{ end }}
{{ if and (isset site.Params "colorthemeswitcher") }} {{ if isset site.Params "colorthemeswitcher" }}
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }} {{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
{{ end }} {{ end }}
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }} {{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
{{ if site.Params.colorthemeswitcher }} {{ if $colorThemeSwitcher }}
<div class="theme-switcher"> <div class="theme-switcher">
{{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }} {{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }}
</div> </div>

View File

@ -1,6 +1,11 @@
{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }} {{ $toc := true }}
{{ if isset .Params "toc" }} {{ if isset .Params "toc" }}
{{ $toc = .Params.toc }} {{ $toc = .Params.toc }}
{{ else }}
{{ $toc = ge .WordCount .Site.Params.tocWordCount }}
{{ if and (isset .Site.Params "toc") (not (.Site.Params.toc)) }}
{{ $toc = false }}
{{ end }}
{{ end }} {{ end }}

View File

@ -0,0 +1 @@
{{ partial (print "tabler-icons/" (.Get 0) ".svg" ) . }}

View File

@ -17,4 +17,3 @@
{{ .Get "caption" | markdownify }} {{ .Get "caption" | markdownify }}
</figcaption> </figcaption>
{{ end }} {{ end }}

View File

@ -3,7 +3,7 @@ publish = "exampleSiteMultilingual/public"
command = "cd exampleSiteMultilingual && hugo --themesDir=../.. --baseURL $URL" command = "cd exampleSiteMultilingual && hugo --themesDir=../.. --baseURL $URL"
[build.environment] [build.environment]
HUGO_VERSION = "0.115.4" HUGO_VERSION = "0.136.5"
HUGO_THEME = "repo" HUGO_THEME = "repo"
[context.deploy-preview] [context.deploy-preview]