AstraOS commited on
Commit
2b9a67f
·
verified ·
1 Parent(s): 8a290fb

Upload 34 files

Browse files
.devcontainer/Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 18, 16, 14
2
+ ARG NODE_VERSION=16
3
+ FROM mcr.microsoft.com/devcontainers/javascript-node:${NODE_VERSION}
4
+
5
+ # VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
6
+ ARG VARIANT=hugo
7
+ # VERSION can be either 'latest' or a specific version number
8
+ ARG VERSION=latest
9
+
10
+ # Download Hugo
11
+ RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
12
+ rm -rf /var/lib/apt/lists/* && \
13
+ case ${VERSION} in \
14
+ latest) \
15
+ export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
16
+ esac && \
17
+ echo ${VERSION} && \
18
+ case $(uname -m) in \
19
+ aarch64) \
20
+ export ARCH=ARM64 ;; \
21
+ *) \
22
+ export ARCH=64bit ;; \
23
+ esac && \
24
+ echo ${ARCH} && \
25
+ wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-${ARCH}.tar.gz && \
26
+ tar xf ${VERSION}.tar.gz && \
27
+ mv hugo /usr/bin/hugo
28
+
29
+ # Hugo dev server port
30
+ EXPOSE 1313
31
+
32
+ # [Optional] Uncomment this section to install additional OS packages you may want.
33
+ #
34
+ # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
35
+ # && apt-get -y install --no-install-recommends <your-package-list-here>
36
+
37
+ # [Optional] Uncomment if you want to install more global node packages
38
+ # RUN sudo -u node npm install -g <your-package-list-here>
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Hugo (Community)",
3
+ "build": {
4
+ "dockerfile": "Dockerfile",
5
+ "args": {
6
+ // Update VARIANT to pick hugo variant.
7
+ // Example variants: hugo, hugo_extended
8
+ // Rebuild the container if it already exists to update.
9
+ "VARIANT": "hugo_extended",
10
+ // Update VERSION to pick a specific hugo version.
11
+ // Example versions: latest, 0.73.0, 0,71.1
12
+ // Rebuild the container if it already exists to update.
13
+ "VERSION": "latest",
14
+ // Update NODE_VERSION to pick the Node.js version: 12, 14
15
+ "NODE_VERSION": "14"
16
+ }
17
+ },
18
+
19
+ // Configure tool-specific properties.
20
+ "customizations": {
21
+ // Configure properties specific to VS Code.
22
+ "vscode": {
23
+ // Set *default* container specific settings.json values on container create.
24
+ "settings": {
25
+ "html.format.templating": true
26
+ },
27
+
28
+ // Add the IDs of extensions you want installed when the container is created.
29
+ "extensions": [
30
+ "tamasfe.even-better-toml",
31
+ "davidanson.vscode-markdownlint"
32
+ ]
33
+ }
34
+ },
35
+
36
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
37
+ "forwardPorts": [
38
+ 1313
39
+ ],
40
+
41
+ // Use 'postCreateCommand' to run commands after the container is created.
42
+ // "postCreateCommand": "uname -a",
43
+
44
+ // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
45
+ "remoteUser": "node",
46
+ "features": {
47
+ "ghcr.io/devcontainers/features/go:1": {
48
+ "version": "latest"
49
+ }
50
+ }
51
+ }
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Github Pages
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ permissions:
14
+ # Give the default GITHUB_TOKEN write permission to commit and push the
15
+ # added or changed files to the repository.
16
+ contents: write
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Cache Hugo resources
24
+ uses: actions/cache@v4
25
+ env:
26
+ cache-name: cache-hugo-resources
27
+ with:
28
+ path: resources
29
+ key: ${{ env.cache-name }}
30
+
31
+ - uses: actions/setup-go@v5
32
+ with:
33
+ go-version: "^1.17.0"
34
+ - run: go version
35
+
36
+ - name: Setup Hugo
37
+ uses: peaceiris/actions-hugo@v2
38
+ with:
39
+ hugo-version: "latest"
40
+ extended: true
41
+
42
+ - name: Build
43
+ run: hugo --minify --gc
44
+
45
+ - name: Deploy 🚀
46
+ uses: JamesIves/github-pages-deploy-action@v4
47
+ with:
48
+ branch: gh-pages
49
+ folder: public
50
+ clean: true
51
+ single-commit: true
.github/workflows/update-theme.yml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Update theme
2
+
3
+ # Controls when the workflow will run
4
+ on:
5
+ schedule:
6
+ # Update theme automatically everyday at 00:00 UTC
7
+ - cron: "0 0 * * *"
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ update-theme:
13
+ runs-on: ubuntu-latest
14
+
15
+ permissions:
16
+ # Give the default GITHUB_TOKEN write permission to commit and push the
17
+ # added or changed files to the repository.
18
+ contents: write
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Setup Hugo
24
+ uses: peaceiris/actions-hugo@v2
25
+ with:
26
+ hugo-version: 0.123.8
27
+ extended: true
28
+
29
+ - name: Update theme
30
+ run: hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v3
31
+
32
+ - name: Tidy go.mod, go.sum
33
+ run: hugo mod tidy
34
+
35
+ - name: Commit changes
36
+ uses: stefanzweifel/git-auto-commit-action@v5
37
+ with:
38
+ commit_message: "CI: Update theme"
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ public
2
+ resources
3
+ .hugo_build.lock
.vscode/tasks.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version": "2.0.0",
5
+ "tasks": [
6
+ {
7
+ "label": "Serve Drafts",
8
+ "type": "shell",
9
+ "command": "hugo server -D",
10
+ "group": {
11
+ "kind": "test",
12
+ "isDefault": true
13
+ },
14
+ "isBackground": true,
15
+ "problemMatcher": []
16
+ },
17
+ {
18
+ "label": "Build",
19
+ "type": "shell",
20
+ "command": "hugo",
21
+ "group": {
22
+ "kind": "build",
23
+ "isDefault": true
24
+ },
25
+ "problemMatcher": []
26
+ }
27
+ ]
28
+ }
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Jimmy Cai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
assets/img/avatar.png ADDED
assets/scss/custom.scss ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ /*
2
+ You can add your own custom styles here.
3
+ */
config/_default/_languages.toml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Rename this file to languages.toml to enable multilingual support
2
+ [en]
3
+ languageName = "English"
4
+ languagedirection = "ltr"
5
+ title = "Example Site"
6
+ weight = 1
config/_default/config.toml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change baseurl before deploy
2
+ baseurl = "/"
3
+ languageCode = "en-us"
4
+ title = "Hugo Theme Stack Starter"
5
+
6
+ # Theme i18n support
7
+ # Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar
8
+ defaultContentLanguage = "en"
9
+
10
+ # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
11
+ # This will make .Summary and .WordCount behave correctly for CJK languages.
12
+ hasCJKLanguage = false
13
+
14
+ # Change it to your Disqus shortname before using
15
+ disqusShortname = "hugo-theme-stack"
16
+
17
+ [pagination]
18
+ pagerSize = 5
config/_default/markup.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Markdown renderer configuration
2
+ [goldmark.renderer]
3
+ unsafe = true
4
+
5
+ [goldmark.extensions.passthrough]
6
+ enable = true
7
+
8
+ # LaTeX math support
9
+ # https://gohugo.io/content-management/mathematics/
10
+ [goldmark.extensions.passthrough.delimiters]
11
+ block = [['\[', '\]'], ['$$', '$$']]
12
+ inline = [['\(', '\)']]
13
+
14
+ [tableOfContents]
15
+ endLevel = 4
16
+ ordered = true
17
+ startLevel = 2
18
+
19
+ [highlight]
20
+ noClasses = false
21
+ codeFences = true
22
+ guessSyntax = true
23
+ lineNoStart = 1
24
+ lineNos = true
25
+ lineNumbersInTable = true
26
+ tabWidth = 4
config/_default/menu.toml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configure main menu and social menu
2
+ #[[main]]
3
+ #identifier = "home"
4
+ #name = "Home"
5
+ #url = "/"
6
+ #[main.params]
7
+ #icon = "home"
8
+ #newtab = true
9
+
10
+ [[social]]
11
+ identifier = "github"
12
+ name = "GitHub"
13
+ url = "https://github.com/CaiJimmy/hugo-theme-stack"
14
+
15
+ [social.params]
16
+ icon = "brand-github"
17
+
18
+ [[social]]
19
+ identifier = "twitter"
20
+ name = "Twitter"
21
+ url = "https://twitter.com"
22
+
23
+ [social.params]
24
+ icon = "brand-twitter"
config/_default/module.toml ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [[imports]]
2
+ path = "hugo-theme-stack"
config/_default/params.toml ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Pages placed under these sections will be shown on homepage and archive page.
2
+ mainSections = ["post"]
3
+ # Output page's full content in RSS.
4
+ rssFullContent = true
5
+ favicon = "/favicon.png"
6
+
7
+ [footer]
8
+ since = 2020
9
+ customText = ""
10
+
11
+ [dateFormat]
12
+ published = "Jan 02, 2006"
13
+ lastUpdated = "Jan 02, 2006 15:04 MST"
14
+
15
+ [sidebar]
16
+ emoji = "🍥"
17
+ subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
18
+
19
+ [sidebar.avatar]
20
+ enabled = true
21
+ local = true
22
+ src = "img/avatar.png"
23
+
24
+ [article]
25
+ headingAnchor = false
26
+ math = false
27
+ readingTime = true
28
+
29
+ [article.license]
30
+ enabled = true
31
+ default = "Licensed under CC BY-NC-SA 4.0"
32
+
33
+ ## Widgets
34
+ [[widgets.homepage]]
35
+ type = "search"
36
+
37
+ [[widgets.homepage]]
38
+ type = "archives"
39
+
40
+ [widgets.homepage.params]
41
+ limit = 5
42
+
43
+ [[widgets.homepage]]
44
+ type = "categories"
45
+
46
+ [widgets.homepage.params]
47
+ limit = 10
48
+
49
+ [[widgets.homepage]]
50
+ type = "tag-cloud"
51
+
52
+ [widgets.homepage.params]
53
+ limit = 10
54
+
55
+ [[widgets.page]]
56
+ type = "toc"
57
+
58
+ [opengraph.twitter]
59
+ site = ""
60
+ card = "summary_large_image"
61
+
62
+ [defaultImage.opengraph]
63
+ enabled = false
64
+ local = false
65
+ src = ""
66
+
67
+ [colorScheme]
68
+ toggle = true
69
+ default = "auto"
70
+
71
+ [imageProcessing.cover]
72
+ enabled = true
73
+
74
+ [imageProcessing.content]
75
+ enabled = true
76
+
77
+ ## Comments
78
+ [comments]
79
+ enabled = true
80
+ provider = "disqus"
81
+
82
+ [comments.disqusjs]
83
+ shortname = ""
84
+ apiUrl = ""
85
+ apiKey = ""
86
+ admin = ""
87
+ adminLabel = ""
88
+
89
+ [comments.utterances]
90
+ repo = ""
91
+ issueTerm = "pathname"
92
+ label = ""
93
+
94
+ [comments.remark42]
95
+ host = ""
96
+ site = ""
97
+ locale = ""
98
+
99
+ [comments.vssue]
100
+ platform = ""
101
+ owner = ""
102
+ repo = ""
103
+ clientId = ""
104
+ clientSecret = ""
105
+ autoCreateIssue = false
106
+
107
+ [comments.waline]
108
+ serverURL = ""
109
+ lang = ""
110
+ visitor = ""
111
+ avatar = ""
112
+ emoji = ["https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo"]
113
+ requiredMeta = ["name", "email", "url"]
114
+ placeholder = ""
115
+
116
+ [comments.waline.locale]
117
+ admin = "Admin"
118
+
119
+ [comments.twikoo]
120
+ envId = ""
121
+ region = ""
122
+ path = ""
123
+ lang = ""
124
+
125
+ [comments.cactus]
126
+ defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
127
+ serverName = "cactus.chat"
128
+ siteName = ""
129
+
130
+ [comments.giscus]
131
+ repo = ""
132
+ repoID = ""
133
+ category = ""
134
+ categoryID = ""
135
+ mapping = ""
136
+ lightTheme = ""
137
+ darkTheme = ""
138
+ reactionsEnabled = 1
139
+ emitMetadata = 0
140
+
141
+ [comments.gitalk]
142
+ owner = ""
143
+ admin = ""
144
+ repo = ""
145
+ clientID = ""
146
+ clientSecret = ""
147
+
148
+ [comments.cusdis]
149
+ host = ""
150
+ id = ""
config/_default/permalinks.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Permalinks format of each content section
2
+ post = "/p/:slug/"
3
+ page = "/:slug/"
config/_default/related.toml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Related contents configuration
2
+ includeNewer = true
3
+ threshold = 60
4
+ toLower = false
5
+
6
+ [[indices]]
7
+ name = "tags"
8
+ weight = 100
9
+
10
+ [[indices]]
11
+ name = "categories"
12
+ weight = 200
content/_index.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ menu:
3
+ main:
4
+ name: Home
5
+ weight: 1
6
+ params:
7
+ icon: home
8
+ ---
content/categories/example-category/_index.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Example Category
3
+ description: A description of this category
4
+ image:
5
+
6
+ # Badge style
7
+ style:
8
+ background: "#2a9d8f"
9
+ color: "#fff"
10
+ ---
content/page/archives/index.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Archives"
3
+ date: 2022-03-06
4
+ layout: "archives"
5
+ slug: "archives"
6
+ menu:
7
+ main:
8
+ weight: 2
9
+ params:
10
+ icon: archives
11
+ ---
content/page/links/index.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Links
3
+ links:
4
+ - title: GitHub
5
+ description: GitHub is the world's largest software development platform.
6
+ website: https://github.com
7
+ image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
8
+ menu:
9
+ main:
10
+ weight: 4
11
+ params:
12
+ icon: link
13
+
14
+ comments: false
15
+ ---
16
+
17
+ To use this feature, add `links` section to frontmatter.
18
+
19
+ This page's frontmatter:
20
+
21
+ ```yaml
22
+ links:
23
+ - title: GitHub
24
+ description: GitHub is the world's largest software development platform.
25
+ website: https://github.com
26
+ image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
27
+ - title: TypeScript
28
+ description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
29
+ website: https://www.typescriptlang.org
30
+ image: ts-logo-128.jpg
31
+ ```
32
+
33
+ `image` field accepts both local and external images.
content/page/search/index.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Search"
3
+ slug: "search"
4
+ layout: "search"
5
+ outputs:
6
+ - html
7
+ - json
8
+ menu:
9
+ main:
10
+ weight: 3
11
+ params:
12
+ icon: search
13
+ ---
content/post/hello-world/cover.jpg ADDED
content/post/hello-world/index.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Hello World
3
+ description: Welcome to Hugo Theme Stack
4
+ slug: hello-world
5
+ date: 2022-03-06 00:00:00+0000
6
+ image: cover.jpg
7
+ categories:
8
+ - Example Category
9
+ tags:
10
+ - Example Tag
11
+ weight: 1 # You can add weight to some posts to override the default sorting (date descending)
12
+ ---
13
+
14
+ Welcome to Hugo theme Stack. This is your first post. Edit or delete it, then start writing!
15
+
16
+ For more information about this theme, check the documentation: https://stack.jimmycai.com/
17
+
18
+ Want a site like this? Check out [hugo-theme-stack-stater](https://github.com/CaiJimmy/hugo-theme-stack-starter)
19
+
20
+ > Photo by [Pawel Czerwinski](https://unsplash.com/@pawel_czerwinski) on [Unsplash](https://unsplash.com/)
content/post/image-gallery/1.jpg ADDED
content/post/image-gallery/2.jpg ADDED
content/post/image-gallery/index.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Image gallery
3
+ description: Create beautiful interactive image gallery using Markdown
4
+ date: 2023-08-26 00:00:00+0000
5
+ image: 2.jpg
6
+ ---
7
+
8
+ Hugo theme Stack supports the creation of interactive image galleries using Markdown. It's powered by [PhotoSwipe](https://photoswipe.com/) and its syntax was inspired by [Typlog](https://typlog.com/).
9
+
10
+ To use this feature, the image must be in the same directory as the Markdown file, as it uses Hugo's page bundle feature to read the dimensions of the image. **External images are not supported.**
11
+
12
+ ## Syntax
13
+
14
+ ```markdown
15
+ ![Image 1](1.jpg) ![Image 2](2.jpg)
16
+ ```
17
+
18
+ ## Result
19
+
20
+ ![Image 1](1.jpg) ![Image 2](2.jpg)
21
+
22
+ > Photo by [mymind](https://unsplash.com/@mymind) and [Luke Chesser](https://unsplash.com/@lukechesser) on [Unsplash](https://unsplash.com/)
content/post/markdown-syntax/index.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Markdown Syntax Guide
3
+ date: 2023-09-07
4
+ description: Sample article showcasing basic Markdown syntax and formatting for HTML elements.
5
+ tags:
6
+ - markdown
7
+ - css
8
+ - html
9
+ - themes
10
+ categories:
11
+ - themes
12
+ - syntax
13
+ ---
14
+
15
+ 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.
16
+
17
+ <!--more-->
18
+
19
+ ## Headings
20
+
21
+ The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
22
+
23
+ # H1
24
+ ## H2
25
+ ### H3
26
+ #### H4
27
+ ##### H5
28
+ ###### H6
29
+
30
+ ## Paragraph
31
+
32
+ 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.
33
+
34
+ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
35
+
36
+ ## Blockquotes
37
+
38
+ 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.
39
+
40
+ ### Blockquote without attribution
41
+
42
+ > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
43
+ > **Note** that you can use *Markdown syntax* within a blockquote.
44
+
45
+ ### Blockquote with attribution
46
+
47
+ > Don't communicate by sharing memory, share memory by communicating.<br>
48
+ > — <cite>Rob Pike[^1]</cite>
49
+
50
+ [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
51
+
52
+ ## Tables
53
+
54
+ Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
55
+
56
+ Name | Age
57
+ --------|------
58
+ Bob | 27
59
+ Alice | 23
60
+
61
+ ### Inline Markdown within tables
62
+
63
+ | Italics | Bold | Code |
64
+ | -------- | -------- | ------ |
65
+ | *italics* | **bold** | `code` |
66
+
67
+ | A | B | C | D | E | F |
68
+ |----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|------------------------------------------------------------|----------------------------------------------------------------------|
69
+ | Lorem ipsum dolor sit amet, consectetur adipiscing elit. | Phasellus ultricies, sapien non euismod aliquam, dui ligula tincidunt odio, at accumsan nulla sapien eget ex. | Proin eleifend dictum ipsum, non euismod ipsum pulvinar et. Vivamus sollicitudin, quam in pulvinar aliquam, metus elit pretium purus | Proin sit amet velit nec enim imperdiet vehicula. | Ut bibendum vestibulum quam, eu egestas turpis gravida nec | Sed scelerisque nec turpis vel viverra. Vivamus vitae pretium sapien |
70
+
71
+ ## Code Blocks
72
+ ### Code block with backticks
73
+
74
+ ```html
75
+ <!doctype html>
76
+ <html lang="en">
77
+ <head>
78
+ <meta charset="utf-8">
79
+ <title>Example HTML5 Document</title>
80
+ </head>
81
+ <body>
82
+ <p>Test</p>
83
+ </body>
84
+ </html>
85
+ ```
86
+
87
+ ### Code block indented with four spaces
88
+
89
+ <!doctype html>
90
+ <html lang="en">
91
+ <head>
92
+ <meta charset="utf-8">
93
+ <title>Example HTML5 Document</title>
94
+ </head>
95
+ <body>
96
+ <p>Test</p>
97
+ </body>
98
+ </html>
99
+
100
+ ### Diff code block
101
+
102
+ ```diff
103
+ [dependencies.bevy]
104
+ git = "https://github.com/bevyengine/bevy"
105
+ rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13"
106
+ - features = ["dynamic"]
107
+ + features = ["jpeg", "dynamic"]
108
+ ```
109
+
110
+ ### One line code block
111
+
112
+ ```html
113
+ <p>A paragraph</p>
114
+ ```
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
+ <abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
143
+
144
+ H<sub>2</sub>O
145
+
146
+ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
147
+
148
+ Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
149
+
150
+ Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
content/post/math-typesetting/index.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Math Typesetting
3
+ description: Math typesetting using KaTeX
4
+ date: 2023-08-24 00:00:00+0000
5
+ math: true
6
+ ---
7
+
8
+ Stack has built-in support for math typesetting using [KaTeX](https://katex.org/).
9
+
10
+ **It's not enabled by default side-wide,** but you can enable it for individual posts by adding `math: true` to the front matter. Or you can enable it side-wide by adding `math = true` to the `params.article` section in `config.toml`.
11
+
12
+ ## Inline math
13
+
14
+ This is an inline mathematical expression: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$
15
+
16
+ ```markdown
17
+ $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$
18
+ ```
19
+
20
+ ## Block math
21
+
22
+ $$
23
+ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
24
+ $$
25
+
26
+ ```markdown
27
+ $$
28
+ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
29
+ $$
30
+ ```
31
+
32
+ $$
33
+ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
34
+ $$
35
+
36
+ ```markdown
37
+ $$
38
+ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
39
+ $$
40
+ ```
content/post/shortcodes/cover.jpg ADDED
content/post/shortcodes/index.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Shortcodes
3
+ description: Useful shortcodes that can be used in Markdown
4
+ date: 2023-08-25 00:00:00+0000
5
+ image: cover.jpg
6
+ ---
7
+
8
+ For more details, check out the [documentation](https://stack.jimmycai.com/writing/shortcodes).
9
+
10
+ ## Bilibili video
11
+
12
+ {{< bilibili "BV1d4411N7zD" >}}
13
+
14
+ ## Tencent video
15
+
16
+ {{< tencent "g0014r3khdw" >}}
17
+
18
+ ## YouTube video
19
+
20
+ {{< youtube "0qwALOOvUik" >}}
21
+
22
+ ## Generic video file
23
+
24
+ {{< video "https://www.w3schools.com/tags/movie.mp4" >}}
25
+
26
+ ## Gist
27
+
28
+ {{< gist CaiJimmy e2751a943de10b2a5b3a8a6c2120cb86 >}}
29
+
30
+ ## GitLab
31
+
32
+ {{< gitlab 2589724 >}}
33
+
34
+ ## Quote
35
+
36
+ {{< quote author="A famous person" source="The book they wrote" url="https://en.wikipedia.org/wiki/Book">}}
37
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
38
+ {{< /quote >}}
39
+
40
+ -----
41
+
42
+ > Photo by [Codioful](https://unsplash.com/@codioful) on [Unsplash](https://unsplash.com/photos/WDSN62Qdxuk)
go.mod ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ module github.com/CaiJimmy/hugo-theme-stack-starter
2
+
3
+ go 1.17
4
+
5
+ require github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 // indirect
go.sum ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 h1:uITC7EKGyfPjyi3C5At++E0Uu1qQXtqiwMV4pd7LkLs=
2
+ github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0/go.mod h1:IPmCXiIxlFSLFYS0tOmYP6ySLviyeNVSabyvSuaxD+I=
static/favicon.png ADDED