mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
Merge branch 'CaiJimmy:master' into i18n
This commit is contained in:
commit
5fef372e50
45
.github/ISSUE_TEMPLATE/bug_report.md
vendored
45
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,45 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Before creating this bug report, make sure you have read the theme documentation: https://docs.stack.jimmycai.com/
|
||||
-->
|
||||
|
||||
## Describe the bug
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
## Expected behavior
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
## To Reproduce
|
||||
Indicate the steps to reproduce this bug, if applicable.
|
||||
|
||||
## Screenshots
|
||||
Add screenshots to help explain your problem.
|
||||
|
||||
## Environment
|
||||
|
||||
- **Hugo version** [e.g: 0.80.0]:
|
||||
- **Hugo extended?**: Yes / No
|
||||
|
||||
## Additional context
|
||||
Add any other context about the problem here.
|
||||
|
||||
If it's a UI issue, fill the following information:
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
## Content of config.yaml
|
||||
```yaml
|
||||
### Paste the content of the config file here
|
||||
```
|
||||
|
||||
## Link to the demo site and/or source repository
|
75
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
75
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://docs.stack.jimmycai.com/).
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen? Please be as detailed as possible, include screenshots and any other information that might help us reproduce the problem.
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: hugo-version
|
||||
attributes:
|
||||
label: Hugo version
|
||||
description: "What is the version of Hugo you are using? (Note: this theme does not support non-extended version of Hugo)"
|
||||
placeholder: ex. 0.100.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: theme-version
|
||||
attributes:
|
||||
label: Theme version
|
||||
description: "What is the version of Stack theme you are using?"
|
||||
placeholder: ex. 3.12.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: browsers
|
||||
attributes:
|
||||
label: What browsers are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Firefox
|
||||
- Chrome
|
||||
- Safari
|
||||
- Microsoft Edge
|
||||
- type: input
|
||||
id: browser-info
|
||||
attributes:
|
||||
label: More information about the browser
|
||||
description: "E.g: Browser version, OS version, etc."
|
||||
placeholder: ex. Chrome 104, Windows 11
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
If the issue is not present on the [demo site](https://demo.stack.jimmycai.com), in order to better understand the problem, please provide the link to the source code of your website (not the generated HTML).
|
||||
Or link to a minimal reproduction of the problem if there are sensible data.
|
||||
- type: input
|
||||
id: bug-url
|
||||
attributes:
|
||||
label: Link to the page with bug
|
||||
placeholder: https://demo.stack.jimmycai.com
|
||||
value: https://demo.stack.jimmycai.com
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: source-repo
|
||||
attributes:
|
||||
label: Link to the source repository
|
||||
placeholder: https://github.com/CaiJimmy/hugo-theme-stack
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discussions
|
||||
url: https://github.com/CaiJimmy/hugo-theme-stack/discussions
|
||||
about: Please ask and answer questions here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
33
.github/release-drafter.yml
vendored
33
.github/release-drafter.yml
vendored
@ -1,33 +0,0 @@
|
||||
name-template: "v$RESOLVED_VERSION 🌈"
|
||||
tag-template: "v$RESOLVED_VERSION"
|
||||
categories:
|
||||
- title: "🚀 Features"
|
||||
labels:
|
||||
- "feature"
|
||||
- "enhancement"
|
||||
- title: "🐛 Bug Fixes"
|
||||
labels:
|
||||
- "fix"
|
||||
- "bugfix"
|
||||
- "bug"
|
||||
- title: "🧰 Maintenance"
|
||||
label: "chore"
|
||||
- title: "♻️ Refactor"
|
||||
label: refactor
|
||||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
|
||||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- "major"
|
||||
minor:
|
||||
labels:
|
||||
- "minor"
|
||||
patch:
|
||||
labels:
|
||||
- "patch"
|
||||
default: patch
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
44
.github/workflows/hugo-artifact.yml
vendored
44
.github/workflows/hugo-artifact.yml
vendored
@ -1,44 +0,0 @@
|
||||
name: Build Hugo Artifact
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Hugo setup
|
||||
uses: peaceiris/actions-hugo@v2.4.13
|
||||
with:
|
||||
# The Hugo version to download (if necessary) and use. Example: 0.58.2
|
||||
hugo-version: latest # optional, default is latest
|
||||
# Download (if necessary) and use Hugo extended version. Example: true
|
||||
extended: true # optional, default is false
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Generate Hugo site
|
||||
run: cd exampleSite && hugo --gc --themesDir ../..
|
||||
|
||||
- name: Upload Hugo artifact
|
||||
uses: actions/upload-artifact@v2.2.2
|
||||
with:
|
||||
# Artifact name
|
||||
name: resources
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: |
|
||||
exampleSite/resources
|
||||
!exampleSite/resources/_gen/images
|
16
.github/workflows/release-drafter.yml
vendored
16
.github/workflows/release-drafter.yml
vendored
@ -1,16 +0,0 @@
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -108,7 +108,7 @@
|
||||
list-style-type: none;
|
||||
counter-reset: item;
|
||||
|
||||
li a::before {
|
||||
li a:first-of-type::before {
|
||||
counter-increment: item;
|
||||
content: counters(item, ".") ". ";
|
||||
font-weight: bold;
|
||||
@ -387,6 +387,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.gitlab-embed-snippets {
|
||||
margin: 0 !important;
|
||||
|
||||
.file-holder.snippet-file-content {
|
||||
margin-block-end: 0 !important;
|
||||
margin-block-start: 0 !important;
|
||||
margin-left: calc((var(--card-padding)) * -1) !important;
|
||||
margin-right: calc((var(--card-padding)) * -1) !important;
|
||||
padding: 0 var(--card-padding) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/// Negative margins
|
||||
blockquote,
|
||||
figure,
|
||||
|
@ -21,12 +21,15 @@ function setupSmoothAnchors() {
|
||||
aElement.addEventListener("click", clickEvent => {
|
||||
clickEvent.preventDefault();
|
||||
|
||||
let targetId = aElement.getAttribute("href").substring(1);
|
||||
// The replace done on ':' is here for footnotes, as this character would otherwise interfere when used as a CSS selector.
|
||||
let target = document.querySelector(`#${targetId.replace(":", "\\:")}`) as HTMLElement;
|
||||
const targetId = aElement.getAttribute("href").substring(1),
|
||||
target = document.getElementById(targetId) as HTMLElement,
|
||||
offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
|
||||
|
||||
window.history.pushState({}, "", aElement.getAttribute("href"));
|
||||
scrollTo({ top: target.offsetTop, behavior: "smooth" });
|
||||
scrollTo({
|
||||
top: offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -92,10 +92,12 @@ params:
|
||||
category:
|
||||
categoryID:
|
||||
mapping:
|
||||
strict:
|
||||
lightTheme:
|
||||
darkTheme:
|
||||
reactionsEnabled: 1
|
||||
emitMetadata: 0
|
||||
inputPosition:
|
||||
lang:
|
||||
|
||||
gitalk:
|
||||
|
@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
|
||||
{{< twitter_simple 1085870671291310081 >}}
|
||||
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
|
||||
|
||||
<br>
|
||||
|
||||
@ -41,6 +41,10 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
||||
|
||||
{{< gist spf13 7896402 >}}
|
||||
|
||||
## Gitlab Snippets Shortcode
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
## Quote Shortcode
|
||||
|
||||
Stack adds a `quote` shortcode. For example:
|
||||
|
73
i18n/fa.yaml
Normal file
73
i18n/fa.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
toggleMenu:
|
||||
other: منو
|
||||
|
||||
darkMode:
|
||||
other: حالت شب
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} صفحه"
|
||||
other: "{{ .Count }} صفحه"
|
||||
|
||||
section:
|
||||
other: بخش
|
||||
|
||||
subsection:
|
||||
one: زیربخش
|
||||
other: زیربخش
|
||||
|
||||
article:
|
||||
back:
|
||||
other: قبلی
|
||||
|
||||
tableOfContents:
|
||||
other: فهرست
|
||||
|
||||
relatedContent:
|
||||
other: مطالب مرتبط
|
||||
|
||||
lastUpdatedOn:
|
||||
other: آخرین بروزرسانی در
|
||||
|
||||
readingTime:
|
||||
one: "مطالعه در {{ .Count }} دقیقه"
|
||||
other: "مطالعه در {{ .Count }} دقیقه"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: یافت نشد
|
||||
|
||||
subtitle:
|
||||
other: این صحه وجود ندارد
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: آرشیو
|
||||
|
||||
more:
|
||||
other: بیشتر
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: تگ ها
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: دسته بندی
|
||||
|
||||
search:
|
||||
title:
|
||||
other: جستجو
|
||||
|
||||
placeholder:
|
||||
other: تایپ کنید ...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT صفحه (#TIME_SECONDS ثانیه)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: قدرت گرفته از {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: قالب {{ .Theme }} ساخته شده توسط {{ .DesignedBy }}
|
@ -47,6 +47,10 @@ widget:
|
||||
more:
|
||||
other: 더보기
|
||||
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: 카테고리
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: 태그
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<script>
|
||||
window.addEventListener('onColorSchemeChange', (e) => {
|
||||
if (DISQUS) {
|
||||
if (typeof DISQUS == 'object') {
|
||||
DISQUS.reset({
|
||||
reload: true
|
||||
});
|
||||
|
@ -6,8 +6,10 @@
|
||||
data-category="{{- .category -}}"
|
||||
data-category-id="{{- .categoryID -}}"
|
||||
data-mapping="{{- default `title` .mapping -}}"
|
||||
data-strict="{{- default 0 .strict -}}"
|
||||
data-reactions-enabled="{{- default 1 .reactionsEnabled -}}"
|
||||
data-emit-metadata="{{- default 0 .emitMetadata -}}"
|
||||
data-input-position="{{- default `top` .inputPosition -}}"
|
||||
data-theme="{{- default `light` .lightTheme -}}"
|
||||
data-lang="{{- default `en` .lang -}}"
|
||||
crossorigin="anonymous"
|
||||
|
@ -28,6 +28,10 @@
|
||||
.twikoo .el-button{
|
||||
color: var(--twikoo-body-text-color)!important;
|
||||
}
|
||||
.OwO .OwO-body {
|
||||
background-color: var(--body-background) !important;
|
||||
color: var(--body-text-color) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{- with .Site.Params.comments.twikoo -}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- $ThemeVersion := "3.11.0" -}}
|
||||
{{- $ThemeVersion := "3.13.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
|
4
layouts/shortcodes/gitlab.html
Normal file
4
layouts/shortcodes/gitlab.html
Normal file
@ -0,0 +1,4 @@
|
||||
<script
|
||||
type="application/javascript"
|
||||
src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"
|
||||
></script>
|
@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.87.0"
|
||||
HUGO_VERSION = "0.100.2"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
@ -23,4 +23,4 @@
|
||||
# If it should show more verbose logs (optional, default = true)
|
||||
debug = true
|
||||
# Relative path to source directory in case you use Hugo's "--s" option
|
||||
srcdir = "exampleSite"
|
||||
srcdir = "exampleSite"
|
||||
|
Loading…
Reference in New Issue
Block a user