diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0a986bb..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - - - -## 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 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..d1d9a10 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..f120c04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -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. diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 6e57d9b..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/hugo-artifact.yml b/.github/workflows/hugo-artifact.yml deleted file mode 100644 index 50b728c..0000000 --- a/.github/workflows/hugo-artifact.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 2c30bcd..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -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 }} diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index b834282..6199118 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -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, diff --git a/assets/ts/smoothAnchors.ts b/assets/ts/smoothAnchors.ts index 0718bf5..46a4a03 100644 --- a/assets/ts/smoothAnchors.ts +++ b/assets/ts/smoothAnchors.ts @@ -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" + }); }); }); } diff --git a/config.yaml b/config.yaml index 93367bb..fcb4bcb 100644 --- a/config.yaml +++ b/config.yaml @@ -92,10 +92,12 @@ params: category: categoryID: mapping: + strict: lightTheme: darkTheme: reactionsEnabled: 1 emitMetadata: 0 + inputPosition: lang: gitalk: diff --git a/exampleSite/content/post/rich-content/index.md b/exampleSite/content/post/rich-content/index.md index 1d45fba..1ebb564 100644 --- a/exampleSite/content/post/rich-content/index.md +++ b/exampleSite/content/post/rich-content/index.md @@ -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" >}}
@@ -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: diff --git a/i18n/fa.yaml b/i18n/fa.yaml new file mode 100644 index 0000000..3655757 --- /dev/null +++ b/i18n/fa.yaml @@ -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 }} diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 5ded2b0..11cdc4a 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -47,6 +47,10 @@ widget: more: other: 더보기 + categoriesCloud: + title: + other: 카테고리 + tagCloud: title: other: 태그 diff --git a/layouts/partials/comments/provider/disqus.html b/layouts/partials/comments/provider/disqus.html index 1f283df..fb17b77 100644 --- a/layouts/partials/comments/provider/disqus.html +++ b/layouts/partials/comments/provider/disqus.html @@ -13,7 +13,7 @@ \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 2a5b2a8..90a0360 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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" \ No newline at end of file + srcdir = "exampleSite"