Merge pull request #39 from Junyi-99/feat-experimental-config
Merge feat-experimental-config
This commit is contained in:
commit
8b402ff168
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
public/
|
32
Features.md
Normal file
32
Features.md
Normal 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 | ✅ |
|
@ -10,12 +10,13 @@ Anubis2 is another simple minimalist theme for [Hugo blog engine](https://gohugo
|
||||
## Highlighted Features
|
||||
|
||||
- Multilingual
|
||||
- Dark / Light mode
|
||||
- Dark / Light mode (Automatic switch based on system settings)
|
||||
- Table of Contents
|
||||
- Comment Support (Giscus, Disque, ISSO, Utterances, GraphComment)
|
||||
- Analytics (Google, Umami)
|
||||
- RSS feeds
|
||||
- Mobile Support
|
||||
- [Full Features](wiki/Full-Features)
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
@ -179,7 +179,6 @@ kbd {
|
||||
line-height: 154%;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--pre-border-color);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* <code> tag */
|
||||
@ -212,8 +211,68 @@ pre kbd kbd {
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
/* ```python``` like */
|
||||
pre code {
|
||||
p 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 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;
|
||||
}
|
||||
|
||||
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;
|
||||
background-color: inherit;
|
||||
border: none;
|
||||
@ -679,6 +738,8 @@ code.has-jax {
|
||||
.post-translations>li:not(:last-child)::after {
|
||||
content: "|";
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.post-translations>li a {
|
||||
@ -794,33 +855,30 @@ ul.footer-menu>li {
|
||||
/* Copy code */
|
||||
.highlight {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
padding-right: 75px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight:hover .highlight-copy-btn {
|
||||
display: inline-block;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.highlight-copy-btn {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
right: 2px;
|
||||
border: 0;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
border-radius: 6px;
|
||||
padding: 1px;
|
||||
font-size: 0.7em;
|
||||
line-height: 1.8;
|
||||
color: #fff;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
min-width: 25px;
|
||||
min-width: 22px;
|
||||
text-align: center;
|
||||
transition: border 0.3s;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.highlight-copy-btn:hover {
|
||||
@ -889,22 +947,3 @@ ul.footer-menu>li {
|
||||
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 }}
|
||||
|
11
exampleSiteMultilingual/.pre-commit-config.yaml
Normal file
11
exampleSiteMultilingual/.pre-commit-config.yaml
Normal 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
|
9
exampleSiteMultilingual/assets/custom-css/custom1.scss
Normal file
9
exampleSiteMultilingual/assets/custom-css/custom1.scss
Normal 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;
|
||||
}
|
7
exampleSiteMultilingual/assets/custom-css/custom2.css
Normal file
7
exampleSiteMultilingual/assets/custom-css/custom2.css
Normal file
@ -0,0 +1,7 @@
|
||||
.anubis-custom-style {
|
||||
background-color: pink;
|
||||
color: black;
|
||||
padding: 1em;
|
||||
border-radius: 0.3em;
|
||||
border: 1px solid black;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
$font-stack: Helvetica, sans-serif;
|
||||
$primary-color: rgb(255, 255, 168);
|
||||
$background-color: rgb(85, 85, 85);
|
@ -1,4 +1,3 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
+++
|
||||
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -1,35 +1,22 @@
|
||||
---
|
||||
title: "About"
|
||||
description: "Hugo, the world’s fastest framework for building websites"
|
||||
date: "2019-02-28"
|
||||
aliases: ["about-us","about-hugo","contact"]
|
||||
author: "Hugo Authors"
|
||||
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
|
||||
---
|
||||
+++
|
||||
title = "About"
|
||||
description = "Hugo, the world’s fastest framework for building websites"
|
||||
date = "2024-04-09"
|
||||
aliases = ["about-us", "about-hugo"]
|
||||
author = ["Hugo Authors", "Junyi"]
|
||||
+++
|
||||
|
||||
[Anubis2](https://github.com/Junyi-99/hugo-theme-anubis2) is another simple minimalist theme for Hugo blog engine.
|
||||
|
||||
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:
|
||||
|
||||
* 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
|
||||
* <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 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.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
||||
|
||||
|
||||
|
||||
|
@ -1,43 +1,29 @@
|
||||
---
|
||||
title: "About"
|
||||
description: "Hugo, the world’s fastest framework for building websites"
|
||||
date: "2019-02-28"
|
||||
aliases: ["about-us","about-hugo","contact"]
|
||||
author: "Hugo Authors"
|
||||
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
|
||||
---
|
||||
+++
|
||||
title = "About"
|
||||
description = "Hugo, the world’s fastest framework for building websites"
|
||||
date = "2024-04-09"
|
||||
aliases = ["about-us", "about-hugo"]
|
||||
author = ["Hugo Authors", "Junyi"]
|
||||
+++
|
||||
|
||||
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
|
||||
* https://github.com/alecthomas/chroma
|
||||
* https://github.com/muesli/smartcrop
|
||||
* https://github.com/spf13/cobra
|
||||
* https://github.com/spf13/viper
|
||||
Hugo korzysta z różnych projektów open source, w tym:
|
||||
|
||||
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.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
||||
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.
|
||||
|
||||
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)
|
||||
|
@ -1,43 +1,27 @@
|
||||
---
|
||||
title: "About"
|
||||
description: "Hugo, the world’s fastest framework for building websites"
|
||||
date: "2019-02-28"
|
||||
aliases: ["about-us","about-hugo","contact"]
|
||||
author: "Hugo Authors"
|
||||
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
|
||||
---
|
||||
+++
|
||||
title = "About"
|
||||
description = "Hugo, the world’s fastest framework for building websites"
|
||||
date = "2024-04-09"
|
||||
aliases = ["about-us", "about-hugo"]
|
||||
author = ["Hugo Authors", "Junyi"]
|
||||
+++
|
||||
|
||||
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
|
||||
* https://github.com/alecthomas/chroma
|
||||
* https://github.com/muesli/smartcrop
|
||||
* https://github.com/spf13/cobra
|
||||
* https://github.com/spf13/viper
|
||||
Hugo 利用了多个开源项目,包括:
|
||||
|
||||
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.
|
||||
|
||||
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 适用于那些想要亲手编码自己网站的人,而不用担心设置复杂的运行时、依赖和数据库。
|
||||
|
||||
使用 Hugo 构建的网站非常快速、安全,并且可以部署在任何地方,包括 AWS、GitHub Pages、Heroku、Netlify 和任何其他托管提供商。
|
||||
|
||||
在 GitHub 上了解更多并贡献。
|
||||
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
date: 2019-05-28
|
||||
type: section
|
||||
layout: "archives"
|
||||
---
|
@ -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 | Markdown | In | Table |
|
||||
| ---------- | --------- | ----------------- | ---------- |
|
||||
| *italics* | **bold** | ~~strikethrough~~ | `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.
|
||||
|
@ -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} } }
|
||||
$$
|
||||
|
@ -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 >}}
|
@ -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 >}}
|
@ -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>
|
66
exampleSiteMultilingual/content/posts/advancedstyle/index.md
Normal file
66
exampleSiteMultilingual/content/posts/advancedstyle/index.md
Normal 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;
|
||||
}
|
||||
```
|
@ -0,0 +1,8 @@
|
||||
@import 'subfolder/hello.scss';
|
||||
|
||||
.container {
|
||||
max-width: none;
|
||||
padding-left: 5em;
|
||||
padding-right: 5em;
|
||||
background-color: white;
|
||||
}
|
120
exampleSiteMultilingual/content/posts/demo-code-pre-kbd-mark.md
Normal file
120
exampleSiteMultilingual/content/posts/demo-code-pre-kbd-mark.md
Normal file
@ -0,0 +1,120 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Demo - Support for code, pre, kbd, mark"
|
||||
date = "2024-04-22"
|
||||
description = "Guide to advanced usage of Anubis2"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
## Individual support for code, pre, kbd, mark
|
||||
|
||||
`code` <pre>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>
|
@ -1,29 +1,33 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Advanced Diagram Usage"
|
||||
date = "2024-04-09"
|
||||
title = "Demo - Support for Diagrams"
|
||||
date = "2024-04-19"
|
||||
description = "Guide to advanced usage of Anubis2"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
|
||||
## 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
|
||||
```
|
||||
Feel free to switch between the light and dark themes to see how the diagram adapts its colors accordingly.
|
||||
|
||||
## 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
|
||||
gitGraph:
|
||||
@ -41,18 +45,7 @@ gitGraph:
|
||||
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
|
||||
stateDiagram
|
||||
@ -103,3 +96,15 @@ sequenceDiagram
|
||||
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
|
||||
```
|
178
exampleSiteMultilingual/content/posts/demo-multiline-codes.md
Normal file
178
exampleSiteMultilingual/content/posts/demo-multiline-codes.md
Normal file
@ -0,0 +1,178 @@
|
||||
+++
|
||||
author = "Junyi"
|
||||
title = "Demo - Multiline Codes"
|
||||
date = "2024-04-23"
|
||||
description = "Codes, Codefences, and Syntax Highlighting."
|
||||
tags = [
|
||||
"icons",
|
||||
"anubis2",
|
||||
"hugo"
|
||||
]
|
||||
+++
|
||||
|
||||
There are 9 tests.
|
||||
|
||||
<!--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 it’s 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;
|
||||
}
|
||||
```
|
||||
|
||||
### Line Number (table) and Highlight Inline (❌ Not supported by Anubis2)
|
||||
|
||||
```c {linenos=true,hl_lines=[1,"3-4",8], hl_inline=true}
|
||||
// codes ...
|
||||
```
|
||||
|
||||
```c {linenos=true,hl_lines=[1,"3-4",8], hl_inline=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 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 >}}
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 1 (😃 Easy)"
|
||||
date: 2024-04-25T1:54:12+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 2 (😏 Easy)"
|
||||
date: 2024-04-25T1:54:13+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 3 (🤔 Easy)"
|
||||
date: 2024-04-25T1:54:14+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 4 (😅 Easy?)"
|
||||
date: 2024-04-25T1:54:15+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 5 (😥 Medium)"
|
||||
date: 2024-04-25T1:54:16+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 6 (🤯 Hard)"
|
||||
date: 2024-04-25T1:54:17+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 7 (😱 Bad Dream)"
|
||||
date: 2024-04-25T1:54:18+08:00
|
||||
draft: 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?
|
||||
```
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "Demo - Summary Rendering Test 8 (💀 Nightmare)"
|
||||
date: 2024-04-25T1:54:19+08:00
|
||||
draft: 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?
|
||||
```
|
@ -1,6 +1,6 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Emoji Support"
|
||||
title = "Emoji 支持"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
tags = [
|
||||
@ -8,13 +8,14 @@ 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).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site’s [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>
|
||||
<br>
|
||||
|
||||
@ -33,14 +34,14 @@ font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,And
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
58
exampleSiteMultilingual/content/posts/icons.md
Normal file
58
exampleSiteMultilingual/content/posts/icons.md
Normal file
@ -0,0 +1,58 @@
|
||||
+++
|
||||
author = "Junyi"
|
||||
title = "Demo - Social Icons"
|
||||
date = "2024-04-23"
|
||||
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" >}} |
|
@ -26,10 +26,23 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
|
||||
You should not use `# H1` in your markdown file, since the title is `#H1`.
|
||||
|
||||
If you use, you will get a warning from linter:
|
||||
|
||||
```txt
|
||||
MD025/single-title/single-h1: Multiple top-level headings in the same document
|
||||
```
|
||||
|
||||
## H2
|
||||
|
||||
### H3
|
||||
|
||||
#### H4
|
||||
|
||||
##### H5
|
||||
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
@ -42,9 +55,10 @@ 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.
|
||||
|
||||
#### Blockquote without attribution
|
||||
### 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
|
||||
@ -52,7 +66,6 @@ The blockquote element represents content that is quoted from another source, op
|
||||
> 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
|
||||
@ -61,18 +74,18 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
#### Inline Markdown within tables
|
||||
### Inline Markdown within tables
|
||||
|
||||
| Inline | Markdown | In | Table |
|
||||
| ---------- | --------- | ----------------- | ---------- |
|
||||
| *italics* | **bold** | ~~strikethrough~~ | `code` |
|
||||
Inline | Markdown | In | Table
|
||||
---------- | --------- | ----------------- | ----------
|
||||
*italics* | **bold** | ~~strikethrough~~ | `code`
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
### Code block with backticks
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
@ -86,7 +99,8 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
#### Code block indented with four spaces
|
||||
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
@ -99,7 +113,8 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
### Code block with Hugo's internal highlight shortcode
|
||||
|
||||
{{< highlight html >}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@ -115,22 +130,24 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
### Unordered List
|
||||
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
|
||||
#### Nested list
|
||||
### Nested list
|
||||
|
||||
* Item
|
||||
|
||||
1. First Sub-item
|
||||
|
||||
2. Second Sub-item
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
@ -144,4 +161,3 @@ 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.
|
||||
|
@ -42,4 +42,3 @@ Block math:
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
|
@ -1,18 +1,18 @@
|
||||
baseURL = "https://hugo-theme-anubis2.netlify.app/"
|
||||
baseURL = "/"
|
||||
languageCode = "en-us"
|
||||
defaultContentLanguage = "en"
|
||||
title = "Anubis2"
|
||||
title = "Anubis2 Demo Site"
|
||||
theme = "anubis2"
|
||||
paginate = 3
|
||||
paginate = 5
|
||||
|
||||
disqusShortname = ""
|
||||
|
||||
|
||||
[author]
|
||||
name = "Junyi"
|
||||
email = "me@junyi.dev"
|
||||
location = "Singapore"
|
||||
|
||||
[params]
|
||||
author = "Junyi"
|
||||
description = "Anubis2 is another simple minimalist theme for Hugo blog engine."
|
||||
dateFormat = "2006-01-02"
|
||||
paginationSinglePost = true
|
||||
@ -25,7 +25,7 @@ readNextPosts = 2
|
||||
copyCodeButton = true
|
||||
rssAsSocialIcon = true
|
||||
locale = "en-us"
|
||||
mathjax = false
|
||||
math = false # true: enable mathjax globally (default is false)
|
||||
toc = true
|
||||
|
||||
# Graphcomment support
|
||||
@ -38,48 +38,20 @@ GiscusCategoryId = "DIC_kwDOLEp76c4CcbPS"
|
||||
GiscusLazyLoad = false
|
||||
GiscusDataMapping = "pathname"
|
||||
|
||||
[[params.social]]
|
||||
id = "docs"
|
||||
url = "https://gohugo.io/documentation/"
|
||||
customCSS = ["custom-css/custom1.scss", "custom-css/custom2.css"]
|
||||
|
||||
[[params.social]]
|
||||
id = "github"
|
||||
url = "https://github.com/Junyi-99/hugo-theme-anubis2"
|
||||
|
||||
[[params.social]]
|
||||
id = "linkedin"
|
||||
url = "https://www.linkedin.com/"
|
||||
|
||||
[[params.social]]
|
||||
id = "email"
|
||||
url = "example@example.com"
|
||||
|
||||
[[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"
|
||||
social = [
|
||||
{ id = "docs", url = "https://gohugo.io/documentation/" },
|
||||
{ id = "github", url = "https://github.com/Junyi-99/hugo-theme-anubis2" },
|
||||
{ id = "linkedin", url = "https://www.linkedin.com/" },
|
||||
{ id = "email", url = "example@example.com" },
|
||||
{ id = "facebook", url = "#" },
|
||||
{ id = "instagram", url = "#" },
|
||||
{ id = "netease-music", url = "#" },
|
||||
{ id = "telegram", url = "#" },
|
||||
{ id = "x", url = "#" },
|
||||
{ id = "youtube", url = "#" }
|
||||
]
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "home"
|
||||
@ -105,10 +77,13 @@ identifier = "archive"
|
||||
url = "/posts/"
|
||||
weight = 4
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
languageName = "English"
|
||||
|
||||
[languages.pl]
|
||||
languageName = "Polski"
|
||||
|
||||
|
||||
[[languages.pl.menu.main]]
|
||||
identifier = "home"
|
||||
name = "Strona Główna"
|
||||
@ -171,9 +146,18 @@ category = "categories"
|
||||
tag = "tags"
|
||||
author = "authors"
|
||||
|
||||
[markup]
|
||||
defaultMarkdownHandler = 'goldmark'
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[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 = 'base16-snazzy'
|
||||
tabWidth = 4
|
||||
|
||||
[params.UmamiAnalytics]
|
||||
enabled = true
|
||||
@ -182,3 +166,37 @@ id = "e4f661ff-9a8c-49d4-b3cc-2efe553e3973"
|
||||
datacache = false
|
||||
url = "https://eu.umami.is/script.js"
|
||||
shareUrl = "https://eu.umami.is/share/RIETUMwZn4IBMIr8/hugo-theme-anubis2.netlify.app"
|
||||
|
||||
|
||||
# Experimental features
|
||||
[params.analytics]
|
||||
[params.analytics.umami]
|
||||
enabled = true
|
||||
dnt = false
|
||||
id = "e4f661ff-9a8c-49d4-b3cc-2efe553e3973" # Website ID
|
||||
datacache = false
|
||||
url = "https://eu.umami.is/script.js"
|
||||
shareUrl = "https://eu.umami.is/share/RIETUMwZn4IBMIr8/hugo-theme-anubis2.netlify.app"
|
||||
|
||||
[params.analytics.google]
|
||||
enabled = false
|
||||
|
||||
[params.comments]
|
||||
[params.comments.giscus]
|
||||
enabled = true
|
||||
repo = "Junyi-99/hugo-theme-anubis2"
|
||||
repoId = "R_kgDOLEp76Q"
|
||||
category = "General"
|
||||
categoryId = "DIC_kwDOLEp76c4CcbPS"
|
||||
lazyload = false
|
||||
datamapping = "pathname"
|
||||
[params.comments.disqus]
|
||||
enabled = false
|
||||
shortname = ""
|
||||
[params.comments.utterances]
|
||||
enabled = false
|
||||
repo = "Junyi-99/hugo-theme-anubis2"
|
||||
[params.comments.isso]
|
||||
enabled = false
|
||||
[params.comments.graphcommentId]
|
||||
enabled = false
|
@ -9,7 +9,7 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<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>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
@ -18,15 +18,15 @@
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ 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 }}
|
||||
{{ range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<link>{{ .RelPermalink }}</link>
|
||||
<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}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<guid>{{ .RelPermalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{{ define "main" }}
|
||||
{{ if .Menus }}
|
||||
{{/* {{ if .Menus }}
|
||||
<nav class="post-navigation">
|
||||
{{ range .Menus }}
|
||||
<a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name | markdownify }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ end }} */}}
|
||||
|
||||
<article class="post h-entry">
|
||||
<div class="post-header">
|
||||
@ -22,8 +22,13 @@
|
||||
|
||||
</article>
|
||||
|
||||
{{ if gt .Site.Params.readNextPosts 0 }}
|
||||
{{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }}
|
||||
{{ $readNextPosts := 3}}
|
||||
{{ if isset .Site.Params "readNextPosts" }}
|
||||
{{ $readNextPosts := .Site.Params.readNextPosts }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt $readNextPosts 0 }}
|
||||
{{ $related := .Site.RegularPages.Related . | first $readNextPosts }}
|
||||
{{ with $related }}
|
||||
<h3 class="read-next-title noselect">{{ i18n "readNext" }}</h3>
|
||||
<ul class="read-next-posts noselect">
|
||||
@ -74,4 +79,3 @@
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -2,21 +2,21 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range where .Data.Pages "Params.hidden" "!=" true }}
|
||||
{{- if .Permalink -}}
|
||||
{{- if .RelPermalink -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<loc>{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.LanguageCode }}"
|
||||
href="{{ .Permalink }}"
|
||||
href="{{ .RelPermalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.LanguageCode }}"
|
||||
href="{{ .Permalink }}"
|
||||
href="{{ .RelPermalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{- end -}}
|
||||
|
@ -15,9 +15,9 @@
|
||||
{{ end }}
|
||||
|
||||
<div style="display: flex; align-items: center; gap:8px">
|
||||
© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }}
|
||||
© {{ if isset .Site.Author "name"}}{{ .Site.Author.name }}, {{end}}{{ now.Year }}
|
||||
{{ 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>
|
||||
|
@ -16,20 +16,22 @@
|
||||
{{ end }}
|
||||
|
||||
{{ 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 -}}
|
||||
|
||||
{{ partial "favicons.html" . }}
|
||||
|
||||
{{ $colorTheme := "light" }}
|
||||
{{ $colorThemeSwitcher := false }}
|
||||
{{ $colorThemeSwitcher := true }}
|
||||
|
||||
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
||||
{{ $colorTheme = site.Params.colortheme | lower }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (isset site.Params "colorthemeswitcher") }}
|
||||
{{ if isset site.Params "colorthemeswitcher" }}
|
||||
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
||||
{{ else }}
|
||||
{{ $colorThemeSwitcher = true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
||||
@ -54,6 +56,27 @@
|
||||
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }}
|
||||
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }}
|
||||
|
||||
|
||||
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
|
||||
{{ range site.Params.customCSS }}
|
||||
{{ with resources.Get . | toCSS $opts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ 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 }}
|
||||
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }}
|
||||
{{ end }}
|
||||
|
@ -20,6 +20,7 @@
|
||||
<nav></nav>
|
||||
{{ 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" . }}
|
@ -9,7 +9,7 @@
|
||||
{{ if eq .Lang $pageLang }}
|
||||
<li>{{ .Language.LanguageName }}</li>
|
||||
{{ else }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
{{ 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>
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<ul class="post-categories">
|
||||
{{ range $cat_name := .Params.categories }}
|
||||
{{ $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 }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
@ -35,7 +35,7 @@
|
||||
<ul class="post-tags">
|
||||
{{ range $tag_name := .Params.tags }}
|
||||
{{ $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 }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
@ -43,7 +43,7 @@
|
||||
<ul class="post-authors">
|
||||
{{ range $author_name := .Params.authors }}
|
||||
{{ $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 }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
@ -9,7 +9,7 @@
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ upper .Lang }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ upper .Lang }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -15,9 +15,9 @@
|
||||
{{ $resource = $resource | resources.Fingerprint "sha256" }}
|
||||
|
||||
{{ 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" }}
|
||||
<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 }}
|
||||
<!-- For backward compatibility -->
|
||||
{{ else }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<ul class="social-icons">
|
||||
<ul class="social-icons noselect">
|
||||
|
||||
{{ range $.Site.Params.Social }}
|
||||
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "url") }}
|
||||
@ -24,10 +24,15 @@
|
||||
{{ 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" -}}
|
||||
<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) }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,16 +1,16 @@
|
||||
{{ $colorTheme := "light" }}
|
||||
{{ $colorThemeSwitcher := false }}
|
||||
{{ $colorThemeSwitcher := true }}
|
||||
|
||||
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
||||
{{ $colorTheme = site.Params.colortheme | lower }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (isset site.Params "colorthemeswitcher") }}
|
||||
{{ if isset site.Params "colorthemeswitcher" }}
|
||||
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
||||
{{ if site.Params.colorthemeswitcher }}
|
||||
{{ if $colorThemeSwitcher }}
|
||||
<div class="theme-switcher">
|
||||
{{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }}
|
||||
</div>
|
||||
|
@ -1,6 +1,8 @@
|
||||
{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }}
|
||||
{{ if isset .Params "toc" }}
|
||||
{{ $toc = .Params.toc }}
|
||||
{{ else }}
|
||||
{{ $toc = true }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
1
layouts/shortcodes/icon.html
Normal file
1
layouts/shortcodes/icon.html
Normal file
@ -0,0 +1 @@
|
||||
{{ partial (print "tabler-icons/" (.Get 0) ".svg" ) . }}
|
@ -17,4 +17,3 @@
|
||||
{{ .Get "caption" | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user