├── layouts
├── partials
│ ├── head
│ │ ├── custom.html
│ │ ├── script.html
│ │ ├── opengraph
│ │ │ ├── include.html
│ │ │ └── provider
│ │ │ │ ├── twitter.html
│ │ │ │ └── base.html
│ │ ├── style.html
│ │ ├── head.html
│ │ └── colorScheme.html
│ ├── footer
│ │ ├── custom.html
│ │ ├── include.html
│ │ ├── components
│ │ │ ├── script.html
│ │ │ └── custom-font.html
│ │ └── footer.html
│ ├── article
│ │ ├── components
│ │ │ ├── content.html
│ │ │ ├── tags.html
│ │ │ ├── math.html
│ │ │ ├── related-contents.html
│ │ │ ├── footer.html
│ │ │ ├── details.html
│ │ │ ├── header.html
│ │ │ └── photoswipe.html
│ │ └── article.html
│ ├── comments
│ │ ├── include.html
│ │ └── provider
│ │ │ ├── disqus.html
│ │ │ ├── cusdis.html
│ │ │ ├── vssue.html
│ │ │ ├── remark42.html
│ │ │ ├── utterances.html
│ │ │ ├── gitalk.html
│ │ │ ├── waline.html
│ │ │ ├── twikoo.html
│ │ │ ├── giscus.html
│ │ │ └── disqusjs.html
│ ├── article-list
│ │ ├── default.html
│ │ ├── compact.html
│ │ └── tile.html
│ ├── helper
│ │ ├── icon.html
│ │ ├── external.html
│ │ └── image.html
│ ├── sidebar
│ │ ├── right.html
│ │ └── left.html
│ ├── data
│ │ ├── description.html
│ │ └── title.html
│ ├── widget
│ │ ├── tag-cloud.html
│ │ ├── search.html
│ │ └── archives.html
│ └── pagination.html
├── _default
│ ├── _markup
│ │ ├── render-link.html
│ │ └── render-image.html
│ ├── baseof.html
│ ├── archives.html
│ ├── single.html
│ └── list.html
├── 404.html
├── shortcodes
│ ├── tencent.html
│ ├── video.html
│ ├── youtube.html
│ └── bilibili.html
├── index.html
├── page
│ ├── search.json
│ └── search.html
└── rss.xml
├── .github
├── FUNDING.yml
├── workflows
│ ├── release-drafter.yml
│ └── hugo-artifact.yml
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
└── release-drafter.yml
├── .gitignore
├── debug.sh
├── images
├── tn.png
└── screenshot.png
├── exampleSite
├── README.md
├── content
│ ├── post
│ │ ├── chinese-test
│ │ │ ├── luca-bravo-alS7ewQ41M8-unsplash.jpg
│ │ │ ├── helena-hertz-wWZzXlDpMog-unsplash.jpg
│ │ │ ├── hudai-gayiran-3Od_VKcDEAA-unsplash.jpg
│ │ │ ├── florian-klauer-nptLmg6jqDo-unsplash.jpg
│ │ │ └── index.md
│ │ ├── placeholder-text
│ │ │ ├── matt-le-SJSpo9hQf7s-unsplash.jpg
│ │ │ └── index.md
│ │ ├── markdown-syntax
│ │ │ ├── pawel-czerwinski-8uZPynIu-rQ-unsplash.jpg
│ │ │ └── index.md
│ │ ├── emoji-support
│ │ │ ├── the-creative-exchange-d2zvqp3fpro-unsplash.jpg
│ │ │ └── index.md
│ │ ├── rich-content
│ │ │ └── index.md
│ │ └── math-typesetting
│ │ │ └── index.md
│ ├── categories
│ │ └── Test
│ │ │ ├── hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg
│ │ │ └── _index.md
│ └── page
│ │ ├── archives.md
│ │ ├── search.md
│ │ └── about.md
├── .gitignore
├── LICENSE
└── config.yaml
├── assets
├── scss
│ ├── custom.scss
│ ├── partials
│ │ ├── layout
│ │ │ ├── archives.scss
│ │ │ ├── 404.scss
│ │ │ ├── list.scss
│ │ │ └── search.scss
│ │ ├── pagination.scss
│ │ ├── footer.scss
│ │ ├── base.scss
│ │ ├── widgets.scss
│ │ ├── sidebar.scss
│ │ ├── menu.scss
│ │ └── highlight
│ │ │ ├── dark.scss
│ │ │ └── light.scss
│ ├── breakpoints.scss
│ ├── style.scss
│ ├── grid.scss
│ └── variables.scss
├── img
│ └── avatar.png
├── jsconfig.json
├── icons
│ ├── back.svg
│ ├── arrow-back.svg
│ ├── clock.svg
│ ├── copyright.svg
│ ├── search.svg
│ ├── user.svg
│ ├── toggle-left.svg
│ ├── toggle-right.svg
│ ├── rss.svg
│ ├── tag.svg
│ ├── link.svg
│ ├── messages.svg
│ ├── archives.svg
│ ├── home.svg
│ ├── infinity.svg
│ ├── hash.svg
│ ├── date.svg
│ ├── brand-github.svg
│ └── brand-twitter.svg
└── ts
│ ├── createElement.ts
│ ├── color.ts
│ ├── colorScheme.ts
│ ├── menu.ts
│ ├── main.ts
│ └── gallery.ts
├── archetypes
├── tags.md
├── categories.md
└── default.md
├── theme.toml
├── i18n
├── zh-CN.yaml
├── zh-TW.yaml
├── ja.yaml
├── nl.yaml
├── tr.yaml
├── ko.yaml
├── pt-BR.yaml
├── en.yaml
├── it.yaml
├── pl.yaml
├── es.yaml
├── id.yaml
├── uk.yaml
├── th.yaml
├── de.yaml
├── fr.yaml
├── ru.yaml
└── el.yaml
├── netlify.toml
├── .devcontainer
├── Dockerfile
└── devcontainer.json
├── data
└── external.yaml
├── config.yaml
└── README.md
/layouts/partials/head/custom.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/layouts/partials/head/script.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: jimmycai
--------------------------------------------------------------------------------
/layouts/partials/footer/custom.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | public
2 | resources
3 | assets/jsconfig.json
--------------------------------------------------------------------------------
/debug.sh:
--------------------------------------------------------------------------------
1 | cd exampleSite && hugo server --gc --themesDir=../..
--------------------------------------------------------------------------------
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hahwul/hugo-theme-stack/master/images/tn.png
--------------------------------------------------------------------------------
/exampleSite/README.md:
--------------------------------------------------------------------------------
1 | Example site modified from https://github.com/gohugoio/hugoBasicExample
--------------------------------------------------------------------------------
/assets/scss/custom.scss:
--------------------------------------------------------------------------------
1 | /* Place your custom SCSS in HUGO_SITE_FOLDER/assets/scss/custom.scss */
--------------------------------------------------------------------------------
/assets/img/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hahwul/hugo-theme-stack/master/assets/img/avatar.png
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hahwul/hugo-theme-stack/master/images/screenshot.png
--------------------------------------------------------------------------------
/archetypes/tags.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{{ replace .Name "-" " " | title }}"
3 | description:
4 | image:
5 | ---
--------------------------------------------------------------------------------
/assets/scss/partials/layout/archives.scss:
--------------------------------------------------------------------------------
1 | .archives-group {
2 | margin-bottom: var(--section-separation);
3 | }
--------------------------------------------------------------------------------
/layouts/partials/article/components/content.html:
--------------------------------------------------------------------------------
1 |
Bilibili 视频av号或BV号错误!请检查视频av号或BV号是否正确
12 |当前视频av或BV号:{{ $vid }},视频分P:{{ $videopage }}
13 | {{ end }} 14 | 15 |🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:
42 | Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) 43 |
44 | {{ math.inline >}} 45 | 46 | Block math: 47 | $$ 48 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 49 | $$ 50 | -------------------------------------------------------------------------------- /assets/scss/grid.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | margin-left: auto; 3 | margin-right: auto; 4 | 5 | .left-sidebar { 6 | max-width: var(--left-sidebar-max-width); 7 | } 8 | 9 | .right-sidebar { 10 | max-width: var(--right-sidebar-max-width); 11 | 12 | /// Display right sidebar when min-width: lg 13 | @include respond(lg) { 14 | display: block; 15 | } 16 | } 17 | 18 | &.extended { 19 | @include respond(md) { 20 | max-width: 1024px; 21 | --left-sidebar-max-width: 25%; 22 | --right-sidebar-max-width: 30%; 23 | } 24 | 25 | @include respond(lg) { 26 | max-width: 1280px; 27 | --left-sidebar-max-width: 20%; 28 | --right-sidebar-max-width: 30%; 29 | } 30 | 31 | @include respond(xl) { 32 | max-width: 1536px; 33 | --left-sidebar-max-width: 15%; 34 | --right-sidebar-max-width: 25%; 35 | } 36 | } 37 | 38 | &.compact { 39 | @include respond(md) { 40 | --left-sidebar-max-width: 25%; 41 | max-width: 768px; 42 | } 43 | 44 | @include respond(lg) { 45 | max-width: 1024px; 46 | --left-sidebar-max-width: 20%; 47 | } 48 | 49 | @include respond(xl) { 50 | max-width: 1280px; 51 | } 52 | } 53 | } 54 | 55 | .flex { 56 | display: flex; 57 | flex-direction: row; 58 | 59 | &.column { 60 | flex-direction: column; 61 | } 62 | 63 | &.on-phone--column { 64 | flex-direction: column; 65 | @include respond(md) { 66 | flex-direction: unset; 67 | } 68 | } 69 | 70 | &.align-items--flex-start { 71 | align-items: flex-start; 72 | } 73 | 74 | .grow { 75 | flex-grow: 1; 76 | } 77 | 78 | .do-not-shrink { 79 | flex-shrink: 0; 80 | } 81 | 82 | .do-not-overflow { 83 | min-width: 0; 84 | flex-shrink: 1; 85 | max-width: 100%; 86 | } 87 | 88 | .full-width { 89 | width: 100%; 90 | } 91 | } 92 | 93 | main.main { 94 | min-width: 0; 95 | max-width: 100%; 96 | flex-grow: 1; 97 | padding-top: var(--main-top-padding); 98 | } 99 | 100 | .main-container { 101 | min-height: 100vh; 102 | align-items: flex-start; 103 | padding: 0 15px; 104 | column-gap: var(--section-separation); 105 | 106 | @include respond(md) { 107 | padding: 0 20px; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /layouts/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}} 2 | {{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}} 3 | {{- $filtered := ($pages | intersect $notHidden) -}} 4 | {{- $limit := .Site.Config.Services.RSS.Limit -}} 5 | {{- if ge $limit 1 -}} 6 | {{- $filtered = $filtered | first $limit -}} 7 | {{- end -}} 8 | {{- printf "" | safeHTML }} 9 |Test
85 | 86 | 87 | ``` 88 | 89 | #### Code block indented with four spaces 90 | 91 | 92 | 93 | 94 | 95 |Test
99 | 100 | 101 | 102 | #### Code block with Hugo's internal highlight shortcode 103 | {{< highlight html >}} 104 | 105 | 106 | 107 | 108 |Test
112 | 113 | 114 | {{< /highlight >}} 115 | 116 | ## List Types 117 | 118 | #### Ordered List 119 | 120 | 1. First item 121 | 2. Second item 122 | 3. Third item 123 | 124 | #### Unordered List 125 | 126 | * List item 127 | * Another item 128 | * And another item 129 | 130 | #### Nested list 131 | 132 | * Fruit 133 | * Apple 134 | * Orange 135 | * Banana 136 | * Dairy 137 | * Milk 138 | * Cheese 139 | 140 | ## Other Elements — abbr, sub, sup, kbd, mark 141 | 142 | GIF is a bitmap image format. 143 | 144 | H2O 145 | 146 | Xn + Yn = Zn 147 | 148 | Press CTRL+ALT+Delete to end the session. 149 | 150 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 151 | -------------------------------------------------------------------------------- /assets/scss/variables.scss: -------------------------------------------------------------------------------- 1 | $defaultTagBackgrounds: #8ea885, #df7988, #0177b8, #ffb900, #6b69d6; 2 | $defaultTagColors: #fff, #fff, #fff, #fff, #fff; 3 | 4 | [data-scheme="light"] { 5 | --pre-text-color: #272822; 6 | --pre-background-color: #fafafa; 7 | @import "partials/highlight/light.scss"; 8 | } 9 | 10 | [data-scheme="dark"] { 11 | --pre-text-color: #f8f8f2; 12 | --pre-background-color: #272822; 13 | @import "partials/highlight/dark.scss"; 14 | } 15 | 16 | /* 17 | * Global style 18 | */ 19 | :root { 20 | @include respond(md) { 21 | --main-top-padding: 35px; 22 | } 23 | 24 | @include respond(xl) { 25 | --main-top-padding: 50px; 26 | } 27 | 28 | --body-background: #f5f5fa; 29 | 30 | --accent-color: #34495e; 31 | --accent-color-darker: #2c3e50; 32 | --accent-color-text: #fff; 33 | --body-text-color: #bababa; 34 | 35 | --tag-border-radius: 4px; 36 | 37 | --section-separation: 40px; 38 | 39 | --scrollbar-thumb: hsl(0, 0%, 85%); 40 | --scrollbar-track: var(--body-background); 41 | 42 | &[data-scheme="dark"] { 43 | --body-background: #303030; 44 | --accent-color: #ecf0f1; 45 | --accent-color-darker: #bdc3c7; 46 | --accent-color-text: #000; 47 | --body-text-color: rgba(255, 255, 255, 0.7); 48 | --scrollbar-thumb: #424242; 49 | --scrollbar-track: var(--body-background); 50 | } 51 | } 52 | 53 | /** 54 | * Global font family 55 | */ 56 | :root { 57 | --sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue"; 58 | --zh-font-family: "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei"; 59 | 60 | --base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), sans-serif; 61 | --code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 62 | } 63 | 64 | /* 65 | * Card style 66 | */ 67 | :root { 68 | --card-background: #fff; 69 | --card-background-selected: #eaeaea; 70 | 71 | --card-text-color-main: #000; 72 | --card-text-color-secondary: #747474; 73 | --card-text-color-tertiary: #bababa; 74 | --card-separator-color: rgba(218, 218, 218, 0.5); 75 | 76 | --card-border-radius: 10px; 77 | 78 | --card-padding: 20px; 79 | 80 | @include respond(md) { 81 | --card-padding: 25px; 82 | } 83 | 84 | @include respond(xl) { 85 | --card-padding: 30px; 86 | } 87 | 88 | --small-card-padding: 25px 20px; 89 | 90 | @include respond(md) { 91 | --small-card-padding: 25px; 92 | } 93 | 94 | &[data-scheme="dark"] { 95 | --card-background: #424242; 96 | --card-background-selected: rgba(255, 255, 255, 0.16); 97 | --card-text-color-main: rgba(255, 255, 255, 0.9); 98 | --card-text-color-secondary: rgba(255, 255, 255, 0.7); 99 | --card-text-color-tertiary: rgba(255, 255, 255, 0.5); 100 | --card-separator-color: rgba(255, 255, 255, 0.12); 101 | } 102 | } 103 | 104 | /** 105 | * Article content font settings 106 | */ 107 | :root { 108 | --article-font-family: var(--base-font-family); 109 | --article-font-size: 1.6rem; 110 | 111 | @include respond(md) { 112 | --article-font-size: 1.7rem; 113 | } 114 | 115 | --article-line-height: 1.85; 116 | } 117 | 118 | /* 119 | * Article content style 120 | */ 121 | :root { 122 | --blockquote-border-size: 4px; 123 | --blockquote-background-color: rgb(248 248 248); 124 | 125 | --heading-border-size: 4px; 126 | 127 | --link-background-color: 189, 195, 199; 128 | --link-background-opacity: 0.5; 129 | --link-background-opacity-hover: 0.7; 130 | 131 | --pre-background-color: #272822; 132 | --pre-text-color: #f8f8f2; 133 | 134 | --code-background-color: rgba(0, 0, 0, 0.12); 135 | --code-text-color: #808080; 136 | 137 | --table-border-color: #dadada; 138 | --tr-even-background-color: #efefee; 139 | 140 | &[data-scheme="dark"] { 141 | --code-background-color: #272822; 142 | --code-text-color: rgba(255, 255, 255, 0.9); 143 | 144 | --table-border-color: #717171; 145 | --tr-even-background-color: #545454; 146 | 147 | --blockquote-background-color: rgb(75 75 75); 148 | } 149 | } 150 | 151 | /* 152 | * Shadow style 153 | * Thanks to https://www.figma.com/community/plugin/744987207861965946/Shadow-picker 154 | */ 155 | :root { 156 | --shadow-l1: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04); 157 | --shadow-l2: 0px 10px 20px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04); 158 | --shadow-l3: 0px 10px 20px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04); 159 | --shadow-l4: 0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 160 | 0px 0px 1px rgba(0, 0, 0, 0.04); 161 | } 162 | -------------------------------------------------------------------------------- /assets/scss/partials/menu.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Hamburgers 3 | * @description Tasty CSS-animated hamburgers 4 | * @author Jonathan Suh @jonsuh 5 | * @site https://jonsuh.com/hamburgers 6 | * @link https://github.com/jonsuh/hamburgers 7 | */ 8 | 9 | .hamburger { 10 | padding-top: 10px; 11 | display: inline-block; 12 | cursor: pointer; 13 | transition-property: opacity, filter; 14 | transition-duration: 0.15s; 15 | transition-timing-function: linear; 16 | font: inherit; 17 | color: inherit; 18 | text-transform: none; 19 | background-color: transparent; 20 | border: 0; 21 | margin: 0; 22 | overflow: visible; 23 | } 24 | .hamburger:hover { 25 | opacity: 0.7; 26 | } 27 | .hamburger.is-active:hover { 28 | opacity: 0.7; 29 | } 30 | .hamburger.is-active .hamburger-inner, 31 | .hamburger.is-active .hamburger-inner::before, 32 | .hamburger.is-active .hamburger-inner::after { 33 | background-color: #000; 34 | } 35 | 36 | .hamburger-box { 37 | width: 30px; 38 | height: 24px; 39 | display: inline-block; 40 | position: relative; 41 | } 42 | 43 | .hamburger-inner { 44 | display: block; 45 | top: 50%; 46 | margin-top: -2px; 47 | } 48 | 49 | .hamburger-inner, 50 | .hamburger-inner::before, 51 | .hamburger-inner::after { 52 | width: 30px; 53 | height: 2px; 54 | background-color: var(--card-text-color-main); 55 | border-radius: 4px; 56 | position: absolute; 57 | transition-property: transform; 58 | transition-duration: 0.15s; 59 | transition-timing-function: ease; 60 | } 61 | .hamburger-inner::before, 62 | .hamburger-inner::after { 63 | content: ""; 64 | display: block; 65 | } 66 | .hamburger-inner::before { 67 | top: -10px; 68 | } 69 | .hamburger-inner::after { 70 | bottom: -10px; 71 | } 72 | 73 | .hamburger--spin .hamburger-inner { 74 | transition-duration: 0.22s; 75 | transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 76 | } 77 | .hamburger--spin .hamburger-inner::before { 78 | transition: top 0.1s 0.25s ease-in, opacity 0.1s ease-in; 79 | } 80 | .hamburger--spin .hamburger-inner::after { 81 | transition: bottom 0.1s 0.25s ease-in, transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19); 82 | } 83 | 84 | .hamburger--spin.is-active .hamburger-inner { 85 | transform: rotate(225deg); 86 | transition-delay: 0.12s; 87 | transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 88 | } 89 | .hamburger--spin.is-active .hamburger-inner::before { 90 | top: 0; 91 | opacity: 0; 92 | transition: top 0.1s ease-out, opacity 0.1s 0.12s ease-out; 93 | } 94 | .hamburger--spin.is-active .hamburger-inner::after { 95 | bottom: 0; 96 | transform: rotate(-90deg); 97 | transition: bottom 0.1s ease-out, transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1); 98 | } 99 | 100 | #toggle-menu { 101 | background: none; 102 | border: none; 103 | position: absolute; 104 | right: 30px; 105 | top: 30px; 106 | z-index: 2; 107 | cursor: pointer; 108 | 109 | @include respond(md) { 110 | display: none; 111 | } 112 | 113 | outline: none; 114 | 115 | &.is-active { 116 | .hamburger-inner, 117 | .hamburger-inner::before, 118 | .hamburger-inner::after { 119 | background-color: var(--accent-color); 120 | } 121 | } 122 | } 123 | 124 | /* Menu style */ 125 | .menu { 126 | padding-left: 0; 127 | list-style: none; 128 | display: flex; 129 | flex-direction: column; 130 | overflow-y: auto; 131 | flex-grow: 1; 132 | font-size: 1.4rem; 133 | 134 | background-color: var(--card-background); 135 | padding: 15px 0; 136 | box-shadow: var(--shadow-l1); 137 | display: none; 138 | 139 | margin: 0 -15px; 140 | 141 | &.show { 142 | display: block; 143 | } 144 | 145 | @include respond(md) { 146 | align-items: flex-end; 147 | display: flex; 148 | background-color: transparent; 149 | padding: 0; 150 | box-shadow: none; 151 | margin: 0; 152 | margin-top: var(--sidebar-element-separation); 153 | } 154 | 155 | @include respond(xl) { 156 | margin-top: 30px; 157 | } 158 | 159 | li { 160 | position: relative; 161 | vertical-align: middle; 162 | padding: 10px 30px; 163 | 164 | &:not(:last-of-type) { 165 | margin-bottom: 15px; 166 | 167 | @include respond(xl) { 168 | margin-bottom: 20px; 169 | } 170 | } 171 | 172 | @include respond(md) { 173 | width: 100%; 174 | padding: 10px 0; 175 | } 176 | 177 | svg { 178 | stroke-width: 1.33; 179 | margin-right: 40px; 180 | 181 | width: 20px; 182 | height: 20px; 183 | } 184 | 185 | a { 186 | height: 100%; 187 | display: inline-flex; 188 | align-items: center; 189 | color: var(--body-text-color); 190 | } 191 | 192 | span { 193 | flex: 1; 194 | } 195 | 196 | &.current { 197 | a { 198 | color: var(--accent-color); 199 | font-weight: bold; 200 | } 201 | } 202 | } 203 | } 204 | 205 | .social-menu { 206 | list-style: none; 207 | padding: 0%; 208 | display: flex; 209 | flex-direction: row; 210 | gap: 10px; 211 | 212 | svg { 213 | width: 24px; 214 | height: 24px; 215 | stroke: var(--body-text-color); 216 | stroke-width: 1.33; 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /exampleSite/config.yaml: -------------------------------------------------------------------------------- 1 | baseurl: https://example.com 2 | languageCode: en-us 3 | theme: hugo-theme-stack 4 | paginate: 5 5 | title: Example Site 6 | 7 | # Change it to your Disqus shortname before using 8 | disqusShortname: hugo-theme-stack 9 | 10 | # GA Tracking ID 11 | googleAnalytics: 12 | 13 | # Theme i18n support 14 | # Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk 15 | DefaultContentLanguage: en 16 | 17 | # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] 18 | # This will make .Summary and .WordCount behave correctly for CJK languages. 19 | hasCJKLanguage: false 20 | 21 | permalinks: 22 | post: /p/:slug/ 23 | page: /:slug/ 24 | 25 | params: 26 | mainSections: 27 | - post 28 | featuredImageField: image 29 | rssFullContent: true 30 | favicon: 31 | 32 | footer: 33 | since: 2020 34 | customText: 35 | 36 | dateFormat: 37 | published: Jan 02, 2006 38 | lastUpdated: Jan 02, 2006 15:04 MST 39 | 40 | sidebar: 41 | emoji: 🍥 42 | subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. 43 | avatar: 44 | enabled: true 45 | local: true 46 | src: img/avatar.png 47 | 48 | article: 49 | math: false 50 | toc: true 51 | readingTime: true 52 | license: 53 | enabled: true 54 | default: Licensed under CC BY-NC-SA 4.0 55 | 56 | comments: 57 | enabled: true 58 | provider: disqus 59 | 60 | disqusjs: 61 | shortname: 62 | apiUrl: 63 | apiKey: 64 | admin: 65 | adminLabel: 66 | 67 | utterances: 68 | repo: 69 | issueTerm: pathname 70 | label: 71 | 72 | remark42: 73 | host: 74 | site: 75 | locale: 76 | 77 | vssue: 78 | platform: 79 | owner: 80 | repo: 81 | clientId: 82 | clientSecret: 83 | autoCreateIssue: false 84 | 85 | # Waline client configuration see: https://waline.js.org/en/reference/client.html 86 | waline: 87 | serverURL: 88 | lang: 89 | visitor: 90 | avatar: 91 | emoji: 92 | - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo 93 | requiredMeta: 94 | - name 95 | - email 96 | - url 97 | placeholder: 98 | locale: 99 | admin: Admin 100 | 101 | twikoo: 102 | envId: 103 | region: 104 | path: 105 | lang: 106 | 107 | giscus: 108 | repo: 109 | repoID: 110 | category: 111 | categoryID: 112 | mapping: 113 | lightTheme: 114 | darkTheme: 115 | reactionsEnabled: 1 116 | emitMetadata: 0 117 | 118 | gitalk: 119 | owner: 120 | admin: 121 | repo: 122 | clientID: 123 | clientSecret: 124 | 125 | cusdis: 126 | host: 127 | id: 128 | 129 | widgets: 130 | enabled: 131 | - search 132 | - archives 133 | - tag-cloud 134 | 135 | archives: 136 | limit: 5 137 | 138 | tagCloud: 139 | limit: 10 140 | 141 | opengraph: 142 | twitter: 143 | # Your Twitter username 144 | site: 145 | 146 | # Available values: summary, summary_large_image 147 | card: summary_large_image 148 | 149 | defaultImage: 150 | opengraph: 151 | enabled: false 152 | local: false 153 | src: 154 | 155 | colorScheme: 156 | # Display toggle 157 | toggle: true 158 | 159 | # Available values: auto, light, dark 160 | default: auto 161 | 162 | imageProcessing: 163 | cover: 164 | enabled: true 165 | content: 166 | enabled: true 167 | 168 | ### Custom menu 169 | ### See https://docs.stack.jimmycai.com/configuration/custom-menu.html 170 | ### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter 171 | menu: 172 | main: 173 | - identifier: home 174 | name: Home 175 | url: / 176 | weight: -100 177 | params: 178 | ### For demonstration purpose, the home link will be open in a new tab 179 | newTab: true 180 | icon: home 181 | 182 | social: 183 | - identifier: github 184 | name: GitHub 185 | url: https://github.com/CaiJimmy/hugo-theme-stack 186 | params: 187 | icon: brand-github 188 | 189 | - identifier: twitter 190 | name: Twitter 191 | url: https://twitter.com 192 | params: 193 | icon: brand-twitter 194 | 195 | related: 196 | includeNewer: true 197 | threshold: 60 198 | toLower: false 199 | indices: 200 | - name: tags 201 | weight: 100 202 | 203 | - name: categories 204 | weight: 200 205 | 206 | markup: 207 | goldmark: 208 | renderer: 209 | ## Set to true if you have HTML content inside Markdown 210 | unsafe: false 211 | tableOfContents: 212 | endLevel: 4 213 | ordered: true 214 | startLevel: 2 215 | highlight: 216 | noClasses: false 217 | -------------------------------------------------------------------------------- /assets/scss/partials/highlight/dark.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Style: monokai 3 | * https://xyproto.github.io/splash/docs/monokai.html 4 | */ 5 | 6 | /* Background */ 7 | .chroma { 8 | color: #f8f8f2; 9 | background-color: #272822 10 | } 11 | 12 | /* Other */ 13 | .chroma .x {} 14 | 15 | /* Error */ 16 | .chroma .err { 17 | color: #bb0064; 18 | } 19 | 20 | /* LineTableTD */ 21 | .chroma .lntd { 22 | vertical-align: top; 23 | padding: 0; 24 | margin: 0; 25 | border: 0; 26 | } 27 | 28 | /* LineTable */ 29 | .chroma .lntable { 30 | border-spacing: 0; 31 | padding: 0; 32 | margin: 0; 33 | border: 0; 34 | width: auto; 35 | overflow: auto; 36 | display: block; 37 | } 38 | 39 | /* LineHighlight */ 40 | .chroma .hl { 41 | display: block; 42 | width: 100%; 43 | background-color: #ffffcc 44 | } 45 | 46 | /* LineNumbersTable */ 47 | .chroma .lnt { 48 | margin-right: 0.4em; 49 | padding: 0 0.4em 0 0.4em; 50 | color: #7f7f7f 51 | } 52 | 53 | /* LineNumbers */ 54 | .chroma .ln { 55 | margin-right: 0.4em; 56 | padding: 0 0.4em 0 0.4em; 57 | color: #7f7f7f 58 | } 59 | 60 | /* Keyword */ 61 | .chroma .k { 62 | color: #66d9ef 63 | } 64 | 65 | /* KeywordConstant */ 66 | .chroma .kc { 67 | color: #66d9ef 68 | } 69 | 70 | /* KeywordDeclaration */ 71 | .chroma .kd { 72 | color: #66d9ef 73 | } 74 | 75 | /* KeywordNamespace */ 76 | .chroma .kn { 77 | color: #f92672 78 | } 79 | 80 | /* KeywordPseudo */ 81 | .chroma .kp { 82 | color: #66d9ef 83 | } 84 | 85 | /* KeywordReserved */ 86 | .chroma .kr { 87 | color: #66d9ef 88 | } 89 | 90 | /* KeywordType */ 91 | .chroma .kt { 92 | color: #66d9ef 93 | } 94 | 95 | /* Name */ 96 | .chroma .n {} 97 | 98 | /* NameAttribute */ 99 | .chroma .na { 100 | color: #a6e22e 101 | } 102 | 103 | /* NameBuiltin */ 104 | .chroma .nb {} 105 | 106 | /* NameBuiltinPseudo */ 107 | .chroma .bp {} 108 | 109 | /* NameClass */ 110 | .chroma .nc { 111 | color: #a6e22e 112 | } 113 | 114 | /* NameConstant */ 115 | .chroma .no { 116 | color: #66d9ef 117 | } 118 | 119 | /* NameDecorator */ 120 | .chroma .nd { 121 | color: #a6e22e 122 | } 123 | 124 | /* NameEntity */ 125 | .chroma .ni {} 126 | 127 | /* NameException */ 128 | .chroma .ne { 129 | color: #a6e22e 130 | } 131 | 132 | /* NameFunction */ 133 | .chroma .nf { 134 | color: #a6e22e 135 | } 136 | 137 | /* NameFunctionMagic */ 138 | .chroma .fm {} 139 | 140 | /* NameLabel */ 141 | .chroma .nl {} 142 | 143 | /* NameNamespace */ 144 | .chroma .nn {} 145 | 146 | /* NameOther */ 147 | .chroma .nx { 148 | color: #a6e22e 149 | } 150 | 151 | /* NameProperty */ 152 | .chroma .py {} 153 | 154 | /* NameTag */ 155 | .chroma .nt { 156 | color: #f92672 157 | } 158 | 159 | /* NameVariable */ 160 | .chroma .nv {} 161 | 162 | /* NameVariableClass */ 163 | .chroma .vc {} 164 | 165 | /* NameVariableGlobal */ 166 | .chroma .vg {} 167 | 168 | /* NameVariableInstance */ 169 | .chroma .vi {} 170 | 171 | /* NameVariableMagic */ 172 | .chroma .vm {} 173 | 174 | /* Literal */ 175 | .chroma .l { 176 | color: #ae81ff 177 | } 178 | 179 | /* LiteralDate */ 180 | .chroma .ld { 181 | color: #e6db74 182 | } 183 | 184 | /* LiteralString */ 185 | .chroma .s { 186 | color: #e6db74 187 | } 188 | 189 | /* LiteralStringAffix */ 190 | .chroma .sa { 191 | color: #e6db74 192 | } 193 | 194 | /* LiteralStringBacktick */ 195 | .chroma .sb { 196 | color: #e6db74 197 | } 198 | 199 | /* LiteralStringChar */ 200 | .chroma .sc { 201 | color: #e6db74 202 | } 203 | 204 | /* LiteralStringDelimiter */ 205 | .chroma .dl { 206 | color: #e6db74 207 | } 208 | 209 | /* LiteralStringDoc */ 210 | .chroma .sd { 211 | color: #e6db74 212 | } 213 | 214 | /* LiteralStringDouble */ 215 | .chroma .s2 { 216 | color: #e6db74 217 | } 218 | 219 | /* LiteralStringEscape */ 220 | .chroma .se { 221 | color: #ae81ff 222 | } 223 | 224 | /* LiteralStringHeredoc */ 225 | .chroma .sh { 226 | color: #e6db74 227 | } 228 | 229 | /* LiteralStringInterpol */ 230 | .chroma .si { 231 | color: #e6db74 232 | } 233 | 234 | /* LiteralStringOther */ 235 | .chroma .sx { 236 | color: #e6db74 237 | } 238 | 239 | /* LiteralStringRegex */ 240 | .chroma .sr { 241 | color: #e6db74 242 | } 243 | 244 | /* LiteralStringSingle */ 245 | .chroma .s1 { 246 | color: #e6db74 247 | } 248 | 249 | /* LiteralStringSymbol */ 250 | .chroma .ss { 251 | color: #e6db74 252 | } 253 | 254 | /* LiteralNumber */ 255 | .chroma .m { 256 | color: #ae81ff 257 | } 258 | 259 | /* LiteralNumberBin */ 260 | .chroma .mb { 261 | color: #ae81ff 262 | } 263 | 264 | /* LiteralNumberFloat */ 265 | .chroma .mf { 266 | color: #ae81ff 267 | } 268 | 269 | /* LiteralNumberHex */ 270 | .chroma .mh { 271 | color: #ae81ff 272 | } 273 | 274 | /* LiteralNumberInteger */ 275 | .chroma .mi { 276 | color: #ae81ff 277 | } 278 | 279 | /* LiteralNumberIntegerLong */ 280 | .chroma .il { 281 | color: #ae81ff 282 | } 283 | 284 | /* LiteralNumberOct */ 285 | .chroma .mo { 286 | color: #ae81ff 287 | } 288 | 289 | /* Operator */ 290 | .chroma .o { 291 | color: #f92672 292 | } 293 | 294 | /* OperatorWord */ 295 | .chroma .ow { 296 | color: #f92672 297 | } 298 | 299 | /* Punctuation */ 300 | .chroma .p {} 301 | 302 | /* Comment */ 303 | .chroma .c { 304 | color: #75715e 305 | } 306 | 307 | /* CommentHashbang */ 308 | .chroma .ch { 309 | color: #75715e 310 | } 311 | 312 | /* CommentMultiline */ 313 | .chroma .cm { 314 | color: #75715e 315 | } 316 | 317 | /* CommentSingle */ 318 | .chroma .c1 { 319 | color: #75715e 320 | } 321 | 322 | /* CommentSpecial */ 323 | .chroma .cs { 324 | color: #75715e 325 | } 326 | 327 | /* CommentPreproc */ 328 | .chroma .cp { 329 | color: #75715e 330 | } 331 | 332 | /* CommentPreprocFile */ 333 | .chroma .cpf { 334 | color: #75715e 335 | } 336 | 337 | /* Generic */ 338 | .chroma .g {} 339 | 340 | /* GenericDeleted */ 341 | .chroma .gd { 342 | color: #f92672 343 | } 344 | 345 | /* GenericEmph */ 346 | .chroma .ge { 347 | font-style: italic 348 | } 349 | 350 | /* GenericError */ 351 | .chroma .gr {} 352 | 353 | /* GenericHeading */ 354 | .chroma .gh {} 355 | 356 | /* GenericInserted */ 357 | .chroma .gi { 358 | color: #a6e22e 359 | } 360 | 361 | /* GenericOutput */ 362 | .chroma .go {} 363 | 364 | /* GenericPrompt */ 365 | .chroma .gp {} 366 | 367 | /* GenericStrong */ 368 | .chroma .gs { 369 | font-weight: bold 370 | } 371 | 372 | /* GenericSubheading */ 373 | .chroma .gu { 374 | color: #75715e 375 | } 376 | 377 | /* GenericTraceback */ 378 | .chroma .gt {} 379 | 380 | /* GenericUnderline */ 381 | .chroma .gl {} 382 | 383 | /* TextWhitespace */ 384 | .chroma .w {} -------------------------------------------------------------------------------- /assets/scss/partials/highlight/light.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Style: monokailight 3 | * https://xyproto.github.io/splash/docs/monokailight.html 4 | */ 5 | 6 | /* Background */ 7 | .chroma { 8 | color: #272822; 9 | background-color: #fafafa; 10 | } 11 | 12 | /* Other */ 13 | .chroma .x {} 14 | 15 | /* Error */ 16 | .chroma .err { 17 | color: #960050; 18 | } 19 | 20 | /* LineTableTD */ 21 | .chroma .lntd { 22 | vertical-align: top; 23 | padding: 0; 24 | margin: 0; 25 | border: 0; 26 | } 27 | 28 | /* LineTable */ 29 | .chroma .lntable { 30 | border-spacing: 0; 31 | padding: 0; 32 | margin: 0; 33 | border: 0; 34 | width: auto; 35 | overflow: auto; 36 | display: block; 37 | } 38 | 39 | /* LineHighlight */ 40 | .chroma .hl { 41 | display: block; 42 | width: 100%; 43 | background-color: #ffffcc 44 | } 45 | 46 | /* LineNumbersTable */ 47 | .chroma .lnt { 48 | margin-right: 0.4em; 49 | padding: 0 0.4em 0 0.4em; 50 | color: #7f7f7f 51 | } 52 | 53 | /* LineNumbers */ 54 | .chroma .ln { 55 | margin-right: 0.4em; 56 | padding: 0 0.4em 0 0.4em; 57 | color: #7f7f7f 58 | } 59 | 60 | /* Keyword */ 61 | .chroma .k { 62 | color: #00a8c8 63 | } 64 | 65 | /* KeywordConstant */ 66 | .chroma .kc { 67 | color: #00a8c8 68 | } 69 | 70 | /* KeywordDeclaration */ 71 | .chroma .kd { 72 | color: #00a8c8 73 | } 74 | 75 | /* KeywordNamespace */ 76 | .chroma .kn { 77 | color: #f92672 78 | } 79 | 80 | /* KeywordPseudo */ 81 | .chroma .kp { 82 | color: #00a8c8 83 | } 84 | 85 | /* KeywordReserved */ 86 | .chroma .kr { 87 | color: #00a8c8 88 | } 89 | 90 | /* KeywordType */ 91 | .chroma .kt { 92 | color: #00a8c8 93 | } 94 | 95 | /* Name */ 96 | .chroma .n { 97 | color: #111111 98 | } 99 | 100 | /* NameAttribute */ 101 | .chroma .na { 102 | color: #75af00 103 | } 104 | 105 | /* NameBuiltin */ 106 | .chroma .nb { 107 | color: #111111 108 | } 109 | 110 | /* NameBuiltinPseudo */ 111 | .chroma .bp { 112 | color: #111111 113 | } 114 | 115 | /* NameClass */ 116 | .chroma .nc { 117 | color: #75af00 118 | } 119 | 120 | /* NameConstant */ 121 | .chroma .no { 122 | color: #00a8c8 123 | } 124 | 125 | /* NameDecorator */ 126 | .chroma .nd { 127 | color: #75af00 128 | } 129 | 130 | /* NameEntity */ 131 | .chroma .ni { 132 | color: #111111 133 | } 134 | 135 | /* NameException */ 136 | .chroma .ne { 137 | color: #75af00 138 | } 139 | 140 | /* NameFunction */ 141 | .chroma .nf { 142 | color: #75af00 143 | } 144 | 145 | /* NameFunctionMagic */ 146 | .chroma .fm { 147 | color: #111111 148 | } 149 | 150 | /* NameLabel */ 151 | .chroma .nl { 152 | color: #111111 153 | } 154 | 155 | /* NameNamespace */ 156 | .chroma .nn { 157 | color: #111111 158 | } 159 | 160 | /* NameOther */ 161 | .chroma .nx { 162 | color: #75af00 163 | } 164 | 165 | /* NameProperty */ 166 | .chroma .py { 167 | color: #111111 168 | } 169 | 170 | /* NameTag */ 171 | .chroma .nt { 172 | color: #f92672 173 | } 174 | 175 | /* NameVariable */ 176 | .chroma .nv { 177 | color: #111111 178 | } 179 | 180 | /* NameVariableClass */ 181 | .chroma .vc { 182 | color: #111111 183 | } 184 | 185 | /* NameVariableGlobal */ 186 | .chroma .vg { 187 | color: #111111 188 | } 189 | 190 | /* NameVariableInstance */ 191 | .chroma .vi { 192 | color: #111111 193 | } 194 | 195 | /* NameVariableMagic */ 196 | .chroma .vm { 197 | color: #111111 198 | } 199 | 200 | /* Literal */ 201 | .chroma .l { 202 | color: #ae81ff 203 | } 204 | 205 | /* LiteralDate */ 206 | .chroma .ld { 207 | color: #d88200 208 | } 209 | 210 | /* LiteralString */ 211 | .chroma .s { 212 | color: #d88200 213 | } 214 | 215 | /* LiteralStringAffix */ 216 | .chroma .sa { 217 | color: #d88200 218 | } 219 | 220 | /* LiteralStringBacktick */ 221 | .chroma .sb { 222 | color: #d88200 223 | } 224 | 225 | /* LiteralStringChar */ 226 | .chroma .sc { 227 | color: #d88200 228 | } 229 | 230 | /* LiteralStringDelimiter */ 231 | .chroma .dl { 232 | color: #d88200 233 | } 234 | 235 | /* LiteralStringDoc */ 236 | .chroma .sd { 237 | color: #d88200 238 | } 239 | 240 | /* LiteralStringDouble */ 241 | .chroma .s2 { 242 | color: #d88200 243 | } 244 | 245 | /* LiteralStringEscape */ 246 | .chroma .se { 247 | color: #8045ff 248 | } 249 | 250 | /* LiteralStringHeredoc */ 251 | .chroma .sh { 252 | color: #d88200 253 | } 254 | 255 | /* LiteralStringInterpol */ 256 | .chroma .si { 257 | color: #d88200 258 | } 259 | 260 | /* LiteralStringOther */ 261 | .chroma .sx { 262 | color: #d88200 263 | } 264 | 265 | /* LiteralStringRegex */ 266 | .chroma .sr { 267 | color: #d88200 268 | } 269 | 270 | /* LiteralStringSingle */ 271 | .chroma .s1 { 272 | color: #d88200 273 | } 274 | 275 | /* LiteralStringSymbol */ 276 | .chroma .ss { 277 | color: #d88200 278 | } 279 | 280 | /* LiteralNumber */ 281 | .chroma .m { 282 | color: #ae81ff 283 | } 284 | 285 | /* LiteralNumberBin */ 286 | .chroma .mb { 287 | color: #ae81ff 288 | } 289 | 290 | /* LiteralNumberFloat */ 291 | .chroma .mf { 292 | color: #ae81ff 293 | } 294 | 295 | /* LiteralNumberHex */ 296 | .chroma .mh { 297 | color: #ae81ff 298 | } 299 | 300 | /* LiteralNumberInteger */ 301 | .chroma .mi { 302 | color: #ae81ff 303 | } 304 | 305 | /* LiteralNumberIntegerLong */ 306 | .chroma .il { 307 | color: #ae81ff 308 | } 309 | 310 | /* LiteralNumberOct */ 311 | .chroma .mo { 312 | color: #ae81ff 313 | } 314 | 315 | /* Operator */ 316 | .chroma .o { 317 | color: #f92672 318 | } 319 | 320 | /* OperatorWord */ 321 | .chroma .ow { 322 | color: #f92672 323 | } 324 | 325 | /* Punctuation */ 326 | .chroma .p { 327 | color: #111111 328 | } 329 | 330 | /* Comment */ 331 | .chroma .c { 332 | color: #75715e 333 | } 334 | 335 | /* CommentHashbang */ 336 | .chroma .ch { 337 | color: #75715e 338 | } 339 | 340 | /* CommentMultiline */ 341 | .chroma .cm { 342 | color: #75715e 343 | } 344 | 345 | /* CommentSingle */ 346 | .chroma .c1 { 347 | color: #75715e 348 | } 349 | 350 | /* CommentSpecial */ 351 | .chroma .cs { 352 | color: #75715e 353 | } 354 | 355 | /* CommentPreproc */ 356 | .chroma .cp { 357 | color: #75715e 358 | } 359 | 360 | /* CommentPreprocFile */ 361 | .chroma .cpf { 362 | color: #75715e 363 | } 364 | 365 | /* Generic */ 366 | .chroma .g {} 367 | 368 | /* GenericDeleted */ 369 | .chroma .gd {} 370 | 371 | /* GenericEmph */ 372 | .chroma .ge { 373 | font-style: italic 374 | } 375 | 376 | /* GenericError */ 377 | .chroma .gr {} 378 | 379 | /* GenericHeading */ 380 | .chroma .gh {} 381 | 382 | /* GenericInserted */ 383 | .chroma .gi {} 384 | 385 | /* GenericOutput */ 386 | .chroma .go {} 387 | 388 | /* GenericPrompt */ 389 | .chroma .gp {} 390 | 391 | /* GenericStrong */ 392 | .chroma .gs { 393 | font-weight: bold 394 | } 395 | 396 | /* GenericSubheading */ 397 | .chroma .gu {} 398 | 399 | /* GenericTraceback */ 400 | .chroma .gt {} 401 | 402 | /* GenericUnderline */ 403 | .chroma .gl {} 404 | 405 | /* TextWhitespace */ 406 | .chroma .w {} --------------------------------------------------------------------------------