Compare commits

..
11 Commits
Author SHA1 Message Date
Jimmy Cai 5869a7ab83 release: 3.13.0 2022-07-31 10:55:27 +00:00
d00dbc17bc feat(comment): add strict and input-position to Giscus config (#648)
* 添加giscus设置选项

根据giscus官方文档,添加了data-strict和data-input-position设置选项

* feat: add strict and inputPosition to giscus config section

Co-authored-by: Jimmy Cai <[email protected]>
2022-07-31 12:39:20 +02:00
Jimmy Cai 655b5102c4 fix(article): footnote reference does not work
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/632
2022-07-28 16:48:37 +00:00
Jimmy CaiandGitHub b02569add9 chore(github): delete unused Github actions 2022-06-11 12:45:39 +00:00
Jimmy CaiandGitHub 4546d74af3 chore(github): add browser info field to issue form 2022-06-11 14:37:39 +02:00
Jimmy CaiandGitHub c6ccfc8f26 fix(github): try to fix errors with the issue form 2022-06-11 14:32:34 +02:00
Jimmy CaiandGitHub 5fe1b35ba5 chore(github): change issue report template to a form 2022-06-11 14:29:02 +02:00
Jimmy CaiandGitHub d53ba6ea20 docs(github): create issue config.yml
Disable blank issue
2022-06-11 14:00:36 +02:00
Jimmy CaiandGitHub 722950c167 docs(github): remove feature request template
see https://github.com/CaiJimmy/hugo-theme-stack/discussions/630
2022-06-11 11:56:38 +00:00
rmdhnrezaandGitHub 3d09c23284 feat(article): GitLab Snippets Shortcode (#627) 2022-06-11 11:04:20 +02:00
Jimmy CaiandGitHub 7a38f3ad50 chore: update Hugo version in Netlify CI 2022-06-11 10:59:20 +02:00
15 changed files with 115 additions and 166 deletions
-45
View File
@@ -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
View 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
View 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
View File
@@ -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
View File
@@ -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
View File
@@ -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/[email protected]
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/[email protected]
with:
# Artifact name
name: resources
# A file, directory or wildcard pattern that describes what to upload
path: |
exampleSite/resources
!exampleSite/resources/_gen/images
-16
View File
@@ -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 }}
+12
View File
@@ -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 /// Negative margins
blockquote, blockquote,
figure, figure,
+7 -4
View File
@@ -21,12 +21,15 @@ function setupSmoothAnchors() {
aElement.addEventListener("click", clickEvent => { aElement.addEventListener("click", clickEvent => {
clickEvent.preventDefault(); clickEvent.preventDefault();
let targetId = aElement.getAttribute("href").substring(1); const 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. target = document.getElementById(targetId) as HTMLElement,
let target = document.getElementById(targetId.replace(":", "\\:")) as HTMLElement; offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
window.history.pushState({}, "", aElement.getAttribute("href")); window.history.pushState({}, "", aElement.getAttribute("href"));
scrollTo({ top: target.offsetTop, behavior: "smooth" }); scrollTo({
top: offset,
behavior: "smooth"
});
}); });
}); });
} }
+2
View File
@@ -92,10 +92,12 @@ params:
category: category:
categoryID: categoryID:
mapping: mapping:
strict:
lightTheme: lightTheme:
darkTheme: darkTheme:
reactionsEnabled: 1 reactionsEnabled: 1
emitMetadata: 0 emitMetadata: 0
inputPosition:
lang: lang:
gitalk: gitalk:
@@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Twitter Simple Shortcode ## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}} {{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
<br> <br>
@@ -41,6 +41,10 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
{{< gist spf13 7896402 >}} {{< gist spf13 7896402 >}}
## Gitlab Snippets Shortcode
{{< gitlab 2349278 >}}
## Quote Shortcode ## Quote Shortcode
Stack adds a `quote` shortcode. For example: Stack adds a `quote` shortcode. For example:
@@ -6,8 +6,10 @@
data-category="{{- .category -}}" data-category="{{- .category -}}"
data-category-id="{{- .categoryID -}}" data-category-id="{{- .categoryID -}}"
data-mapping="{{- default `title` .mapping -}}" data-mapping="{{- default `title` .mapping -}}"
data-strict="{{- default 0 .strict -}}"
data-reactions-enabled="{{- default 1 .reactionsEnabled -}}" data-reactions-enabled="{{- default 1 .reactionsEnabled -}}"
data-emit-metadata="{{- default 0 .emitMetadata -}}" data-emit-metadata="{{- default 0 .emitMetadata -}}"
data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}" data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default `en` .lang -}}" data-lang="{{- default `en` .lang -}}"
crossorigin="anonymous" crossorigin="anonymous"
+1 -1
View File
@@ -1,4 +1,4 @@
{{- $ThemeVersion := "3.12.0" -}} {{- $ThemeVersion := "3.13.0" -}}
<footer class="site-footer"> <footer class="site-footer">
<section class="copyright"> <section class="copyright">
&copy; &copy;
+4
View File
@@ -0,0 +1,4 @@
<script
type="application/javascript"
src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"
></script>
+1 -1
View File
@@ -2,7 +2,7 @@
publish = "exampleSite/public" publish = "exampleSite/public"
[build.environment] [build.environment]
HUGO_VERSION = "0.87.0" HUGO_VERSION = "0.100.2"
HUGO_THEME = "repo" HUGO_THEME = "repo"
[context.production] [context.production]