├── .github ├── ISSUE_TEMPLATE │ ├── bug.yaml │ ├── config.yml │ └── enhancement.yaml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── gh-pages.yml ├── LICENSE ├── README.md ├── assets ├── css │ ├── common │ │ ├── 404.css │ │ ├── archive.css │ │ ├── footer.css │ │ ├── header.css │ │ ├── main.css │ │ ├── post-entry.css │ │ ├── post-single.css │ │ ├── profile-mode.css │ │ ├── search.css │ │ └── terms.css │ ├── core │ │ ├── license.css │ │ ├── reset.css │ │ ├── theme-vars.css │ │ └── zmedia.css │ ├── extended │ │ └── blank.css │ └── includes │ │ ├── chroma-mod.css │ │ ├── chroma-styles.css │ │ └── scroll-bar.css └── js │ ├── fastsearch.js │ ├── fuse.basic.min.js │ └── license.js ├── go.mod ├── i18n ├── ar.yaml ├── be.yaml ├── bg.yaml ├── bn.yaml ├── ca.yaml ├── ckb.yaml ├── cs.yaml ├── da.yaml ├── de.yaml ├── el.yaml ├── en.yaml ├── eo.yaml ├── es.yaml ├── fa.yaml ├── fi.yaml ├── fr.yaml ├── he.yaml ├── hi.yaml ├── hr.yaml ├── hu.yaml ├── id.yaml ├── it.yaml ├── ja.yaml ├── ko.yaml ├── ku.yaml ├── mn.yaml ├── ms.yaml ├── nl.yaml ├── no.yaml ├── oc.yaml ├── pa.yaml ├── pl.yaml ├── pnb.yaml ├── pt.yaml ├── ro.yaml ├── ru.yaml ├── sk.yaml ├── sv.yaml ├── sw.yaml ├── th.yaml ├── tr.yaml ├── uk.yaml ├── uz.yaml ├── vi.yaml ├── zh-tw.yaml └── zh.yaml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ └── render-image.html │ ├── archives.html │ ├── baseof.html │ ├── index.json │ ├── list.html │ ├── rss.xml │ ├── search.html │ ├── single.html │ └── terms.html ├── partials │ ├── anchored_headings.html │ ├── author.html │ ├── breadcrumbs.html │ ├── comments.html │ ├── cover.html │ ├── edit_post.html │ ├── extend_footer.html │ ├── extend_head.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── home_info.html │ ├── index_profile.html │ ├── post_canonical.html │ ├── post_meta.html │ ├── post_nav_links.html │ ├── share_icons.html │ ├── social_icons.html │ ├── svg.html │ ├── templates │ │ ├── _funcs │ │ │ └── get-page-images.html │ │ ├── opengraph.html │ │ ├── schema_json.html │ │ └── twitter_cards.html │ ├── toc.html │ └── translation_list.html ├── robots.txt └── shortcodes │ ├── collapse.html │ ├── figure.html │ ├── inTextImg.html │ ├── ltr.html │ ├── rawhtml.html │ └── rtl.html └── theme.toml /.github/ISSUE_TEMPLATE/bug.yaml: -------------------------------------------------------------------------------- 1 | name: Bug Report 🐞 2 | description: Create a report to help us improve 3 | title: "[Bug]: " 4 | labels: ["bug", "triage"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out this bug report :) 10 | - Kindly **DO NOT** ask for instructions. 11 | - Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any other relevant question. 12 | - You may join [Discord community](https://discord.gg/ahpmTvhVmp) to interact with fellow contributors and users 13 | - Read project's [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) for detailed documentation. 14 | - Read project's [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs) section for Frequently asked questions. 15 | - Search for previous [Issues](https://github.com/adityatelange/hugo-PaperMod/issues)/[Pull Requests](https://github.com/adityatelange/hugo-PaperMod/pulls) if this issue is already reported or fix has been created. 16 | - type: textarea 17 | id: what_happened 18 | attributes: 19 | label: What happened? 20 | description: Also tell us, what did you expect to happen? 21 | placeholder: A bug happened! Here are the screenshots.. Tell us what you see! 22 | validations: 23 | required: true 24 | - type: textarea 25 | id: steps_to_reproduce 26 | attributes: 27 | label: Steps to reproduce 28 | description: How to reproduce this issue. Here are the steps... 29 | placeholder: | 30 | 1. Go to '...' 31 | 2. Click on '....' 32 | 3. Scroll down to '....' 33 | 4. See error 34 | validations: 35 | required: true 36 | - type: dropdown 37 | id: hugo_version 38 | attributes: 39 | label: Hugo Version 40 | description: What version of Hugo are you running? 41 | options: 42 | - Hugo >= 0.146.0 (Recommended - Minimum version required for PaperMod) 43 | - Hugo < 0.146.0 (Incompatible - Not recommended to build PaperMod on lower versions) 44 | validations: 45 | required: true 46 | - type: input 47 | id: papermod_version 48 | attributes: 49 | label: PaperMod Version 50 | description: What version of PaperMod are you running? 51 | placeholder: | 52 | PaperMod v7.0 or 53 | Branch master or 54 | Commit-id: 3f50861a0ced88f9b614a43662edeb4c0bc45da8 55 | validations: 56 | required: true 57 | - type: dropdown 58 | id: browser_type 59 | attributes: 60 | label: What kind of devices are you seeing the problem on? 61 | multiple: true 62 | options: 63 | - Mobile 64 | - Desktop 65 | validations: 66 | required: false 67 | - type: dropdown 68 | id: browsers 69 | attributes: 70 | label: What browsers are you seeing the problem on? 71 | multiple: true 72 | options: 73 | - Firefox 74 | - Chrome 75 | - Safari 76 | - Microsoft Edge 77 | validations: 78 | required: false 79 | - type: input 80 | id: browser_version 81 | attributes: 82 | label: Browser Version 83 | description: Please add browser version or enter user agent string (navigator.userAgent) 84 | placeholder: ex. Google Chrome 86.0 85 | validations: 86 | required: false 87 | - type: textarea 88 | id: logs 89 | attributes: 90 | label: Relevant log output 91 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 92 | render: shell 93 | validations: 94 | required: true 95 | - type: input 96 | id: repo_url 97 | attributes: 98 | label: Repository/Source Code link where this issue can be reproduced 99 | description: Please add url of the repository where this issue can be reproduced 100 | placeholder: https://github.com// 101 | validations: 102 | required: false 103 | - type: checkboxes 104 | id: terms 105 | attributes: 106 | label: Code of Conduct 107 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme). 108 | options: 109 | - label: I agree to follow this project's Code of Conduct 110 | required: true 111 | validations: 112 | required: true 113 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: PaperMod Discussions 4 | url: https://github.com/adityatelange/hugo-PaperMod/discussions 5 | about: Please ask and answer questions/doubts here, DO NOT open an issue for questions. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yaml: -------------------------------------------------------------------------------- 1 | name: Enhancement 🚀 2 | description: Propose a new feature or change for enhancing the experience. 3 | title: "[Enhancement]: " 4 | labels: ["enhancement", "triage"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out this enhancement form :) 10 | - Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any other relevant question. 11 | - You may join [Discord community](https://discord.gg/ahpmTvhVmp) to interact with fellow contributors and users 12 | - Read project's [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) for detailed documentation. 13 | - Read project's [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs) section for Frequently asked questions. 14 | - Search for previous [Issues](https://github.com/adityatelange/hugo-PaperMod/issues)/[Pull Requests](https://github.com/adityatelange/hugo-PaperMod/pulls) if this issue is already reported or fix has been created. 15 | - type: textarea 16 | id: what_happened 17 | attributes: 18 | label: What you'd like to propose? 19 | description: 20 | placeholder: 21 | validations: 22 | required: true 23 | - type: checkboxes 24 | id: terms 25 | attributes: 26 | label: Code of Conduct 27 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme). 28 | options: 29 | - label: I agree to follow this project's Code of Conduct 30 | required: true 31 | validations: 32 | required: true -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | **What does this PR change? What problem does it solve?** 18 | 19 | 24 | 25 | 26 | **Was the change discussed in an issue or in the Discussions before?** 27 | 28 | 34 | 35 | 36 | ## PR Checklist 37 | 38 | - [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-). 39 | - [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork). 40 | - [ ] I have verified that the code works as described/as intended. 41 | - [ ] This change adds a Social Icon which has a permissive license to use it. 42 | - [ ] This change **does not** include any CDN resources/links. 43 | - [ ] This change **does not** include any unrelated scripts such as bash and python scripts. 44 | - [ ] This change updates the overridden internal templates from HUGO's repository. 45 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Hugo PaperMod Demo to Pages 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - "images/**" 7 | - "LICENSE" 8 | - "README.md" 9 | branches: 10 | - master 11 | - exampleSite 12 | workflow_dispatch: 13 | # manual run 14 | inputs: 15 | hugoVersion: 16 | description: "Hugo Version" 17 | required: false 18 | default: "0.146.0" 19 | 20 | # Allow one concurrent deployment 21 | concurrency: 22 | group: "pages" 23 | cancel-in-progress: true 24 | 25 | # Default to bash 26 | defaults: 27 | run: 28 | shell: bash 29 | 30 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 31 | permissions: 32 | contents: read 33 | pages: write 34 | id-token: write 35 | 36 | jobs: 37 | # Build job 38 | build: 39 | runs-on: ubuntu-latest 40 | env: 41 | HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }} 42 | steps: 43 | - name: Install Hugo CLI 44 | run: | 45 | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \ 46 | && sudo dpkg -i ${{ runner.temp }}/hugo.deb 47 | - name: Checkout 48 | uses: actions/checkout@v4 49 | with: 50 | ref: exampleSite 51 | - name: Setup Pages 52 | id: pages 53 | uses: actions/configure-pages@v5 54 | - name: Get Theme 55 | run: git submodule update --init --recursive 56 | - name: Update theme to Latest commit 57 | run: git submodule update --remote --merge 58 | - name: Build with Hugo 59 | run: | 60 | hugo \ 61 | --buildDrafts --gc \ 62 | --baseURL ${{ steps.pages.outputs.base_url }} 63 | - name: Upload artifact 64 | uses: actions/upload-pages-artifact@v3 65 | with: 66 | path: ./public 67 | # Deployment job 68 | deploy: 69 | environment: 70 | name: github-pages 71 | url: ${{ steps.deployment.outputs.page_url }} 72 | runs-on: ubuntu-latest 73 | needs: build 74 | steps: 75 | - name: Deploy to GitHub Pages 76 | id: deployment 77 | uses: actions/deploy-pages@v4 78 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nanxiaobei and adityatelange 4 | Copyright (c) 2021-2025 adityatelange 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Hugo PaperMod | Demo

2 | 3 |

☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive

4 |
5 | 6 | > Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
7 | > The goal of this project is to add more features and customization to the og theme. 8 | 9 | **Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki) 10 | 11 | **ExampleSite** can be found here: [**exampleSite**](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source. 12 | 13 | [![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/) 14 | [![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.146.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.146.0) 15 | [![Discord](https://img.shields.io/discord/971046860317921340?label=Discord&logo=discord)](https://discord.gg/ahpmTvhVmp) 16 | [![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE) 17 | ![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) 18 | [![X (formerly Twitter) URL](https://img.shields.io/badge/-Share%20on%20X-gray?style=flat&logo=x)](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod) 19 | 20 | 21 | --- 22 | 23 |

24 | Mockup image 25 |

26 | 27 | --- 28 | 29 | ## Features/Mods 💥 30 | 31 | - Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. 32 | - 3 Modes: 33 | - [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode) 34 | - [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode) 35 | - [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode) 36 | - Table of Content Generation (newer implementation). 37 | - Archive of posts. 38 | - Social Icons (home-info and profile-mode). 39 | - Social-Media Share buttons on posts. 40 | - Menu location indicator. 41 | - Multilingual support. (with language selector). 42 | - Taxonomies. 43 | - Cover image for each post (with Responsive image support). 44 | - Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). 45 | - SEO Friendly. 46 | - Multiple Author support. 47 | - Search Page with Fuse.js 48 | - Other Posts suggestion below a post 49 | - Breadcrumb Navigation. 50 | - Code Block Copy buttons. 51 | - Hugo's Chroma syntax highlighter. 52 | - No webpack, nodejs and other dependencies are required to edit the theme. 53 | 54 | Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** 55 | 56 | --- 57 | 58 | ## Install/Update 📥 59 | 60 | Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** 61 | 62 | --- 63 | 64 | ## FAQs / How To's Guide 🙋 65 | 66 | Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** 67 | 68 | --- 69 | 70 | ## Social-Icons/Share-Icons 🖼️ 71 | 72 | Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** 73 | 74 | --- 75 | 76 | ## Release Changelog 📃 77 | 78 | Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** 79 | 80 | --- 81 | 82 | ## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/) 👀 83 | 84 | --- 85 | 86 | ## Support 🫶 87 | 88 | - Star 🌟 this repository. 89 | - Help spread the word about PaperMod by sharing it on social media and recommending it to your friends. 🗣️ 90 | - You can also sponsor 🏅 on [Github Sponsors](https://github.com/sponsors/adityatelange) / [Ko-Fi](https://ko-fi.com/adityatelange). 91 | 92 | --- 93 | 94 | ## Special Thanks 🌟 95 | 96 | - [**Highlight.js**](https://github.com/highlightjs/highlight.js) 97 | - [**Fuse.js**](https://github.com/krisk/fuse) 98 | - [**Feather Icons**](https://github.com/feathericons/feather) 99 | - [**Simple Icons**](https://github.com/simple-icons/simple-icons) 100 | - **All Contributors and Supporters** 101 | 102 | --- 103 | 104 | ## Stargazers over time 📈 105 | 106 | [![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg?background=%23ffffff00&axis=%23858585&line=%236b63ff)](https://starchart.cc/adityatelange/hugo-PaperMod) 107 | -------------------------------------------------------------------------------- /assets/css/common/404.css: -------------------------------------------------------------------------------- 1 | .not-found { 2 | position: absolute; 3 | left: 0; 4 | right: 0; 5 | display: flex; 6 | align-items: center; 7 | justify-content: center; 8 | height: 80%; 9 | font-size: 160px; 10 | font-weight: 700; 11 | } 12 | -------------------------------------------------------------------------------- /assets/css/common/archive.css: -------------------------------------------------------------------------------- 1 | .archive-posts { 2 | width: 100%; 3 | font-size: 16px; 4 | } 5 | 6 | .archive-year { 7 | margin-top: 40px; 8 | } 9 | 10 | .archive-year:not(:last-of-type) { 11 | border-bottom: 2px solid var(--border); 12 | } 13 | 14 | .archive-month { 15 | display: flex; 16 | align-items: flex-start; 17 | padding: 10px 0; 18 | } 19 | 20 | .archive-month-header { 21 | margin: 25px 0; 22 | width: 200px; 23 | } 24 | 25 | .archive-month:not(:last-of-type) { 26 | border-bottom: 1px solid var(--border); 27 | } 28 | 29 | .archive-entry { 30 | position: relative; 31 | padding: 5px; 32 | margin: 10px 0; 33 | } 34 | 35 | .archive-entry-title { 36 | margin: 5px 0; 37 | font-weight: 400; 38 | } 39 | 40 | .archive-count, 41 | .archive-meta { 42 | color: var(--secondary); 43 | font-size: 14px; 44 | } 45 | -------------------------------------------------------------------------------- /assets/css/common/footer.css: -------------------------------------------------------------------------------- 1 | .footer, 2 | .top-link { 3 | font-size: 12px; 4 | color: var(--secondary); 5 | } 6 | 7 | .footer { 8 | max-width: calc(var(--main-width) + var(--gap) * 2); 9 | margin: auto; 10 | padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap); 11 | text-align: center; 12 | line-height: 24px; 13 | } 14 | 15 | .footer span { 16 | margin-inline-start: 1px; 17 | margin-inline-end: 1px; 18 | } 19 | 20 | .footer span:last-child { 21 | white-space: nowrap; 22 | } 23 | 24 | .footer a { 25 | color: inherit; 26 | border-bottom: 1px solid var(--secondary); 27 | } 28 | 29 | .footer a:hover { 30 | border-bottom: 1px solid var(--primary); 31 | } 32 | 33 | .top-link { 34 | visibility: hidden; 35 | position: fixed; 36 | bottom: 60px; 37 | right: 30px; 38 | z-index: 99; 39 | background: var(--tertiary); 40 | width: 42px; 41 | height: 42px; 42 | padding: 12px; 43 | border-radius: 64px; 44 | transition: visibility 0.5s, opacity 0.8s linear; 45 | } 46 | 47 | .top-link, 48 | .top-link svg { 49 | filter: drop-shadow(0px 0px 0px var(--theme)); 50 | } 51 | 52 | .footer a:hover, 53 | .top-link:hover { 54 | color: var(--primary); 55 | } 56 | 57 | .top-link:focus, 58 | #theme-toggle:focus { 59 | outline: 0; 60 | } 61 | -------------------------------------------------------------------------------- /assets/css/common/header.css: -------------------------------------------------------------------------------- 1 | .nav { 2 | display: flex; 3 | flex-wrap: wrap; 4 | justify-content: space-between; 5 | max-width: calc(var(--nav-width) + var(--gap) * 2); 6 | margin-inline-start: auto; 7 | margin-inline-end: auto; 8 | line-height: var(--header-height); 9 | } 10 | 11 | .nav a { 12 | display: block; 13 | } 14 | 15 | .logo, 16 | #menu { 17 | display: flex; 18 | margin: auto var(--gap); 19 | } 20 | 21 | .logo { 22 | flex-wrap: inherit; 23 | } 24 | 25 | .logo a { 26 | font-size: 24px; 27 | font-weight: 700; 28 | } 29 | 30 | .logo a img, .logo a svg { 31 | display: inline; 32 | vertical-align: middle; 33 | pointer-events: none; 34 | transform: translate(0, -10%); 35 | border-radius: 6px; 36 | margin-inline-end: 8px; 37 | } 38 | 39 | button#theme-toggle { 40 | font-size: 26px; 41 | margin: auto 4px; 42 | } 43 | 44 | body.dark #moon { 45 | vertical-align: middle; 46 | display: none; 47 | } 48 | 49 | body:not(.dark) #sun { 50 | display: none; 51 | } 52 | 53 | #menu { 54 | list-style: none; 55 | word-break: keep-all; 56 | overflow-x: auto; 57 | white-space: nowrap; 58 | } 59 | 60 | #menu li + li { 61 | margin-inline-start: var(--gap); 62 | } 63 | 64 | #menu a { 65 | font-size: 16px; 66 | } 67 | 68 | #menu .active { 69 | font-weight: 500; 70 | border-bottom: 2px solid currentColor; 71 | } 72 | 73 | .lang-switch li, 74 | .lang-switch ul, 75 | .logo-switches { 76 | display: inline-flex; 77 | margin: auto 4px; 78 | } 79 | 80 | .lang-switch { 81 | display: flex; 82 | flex-wrap: inherit; 83 | } 84 | 85 | .lang-switch a { 86 | margin: auto 3px; 87 | font-size: 16px; 88 | font-weight: 500; 89 | } 90 | 91 | .logo-switches { 92 | flex-wrap: inherit; 93 | } 94 | -------------------------------------------------------------------------------- /assets/css/common/main.css: -------------------------------------------------------------------------------- 1 | .main { 2 | position: relative; 3 | min-height: calc(100vh - var(--header-height) - var(--footer-height)); 4 | max-width: calc(var(--main-width) + var(--gap) * 2); 5 | margin: auto; 6 | padding: var(--gap); 7 | } 8 | 9 | .page-header h1 { 10 | font-size: 40px; 11 | } 12 | 13 | .pagination { 14 | display: flex; 15 | } 16 | 17 | .pagination a { 18 | color: var(--theme); 19 | font-size: 13px; 20 | line-height: 36px; 21 | background: var(--primary); 22 | border-radius: calc(36px / 2); 23 | padding: 0 16px; 24 | } 25 | 26 | .pagination .next { 27 | margin-inline-start: auto; 28 | } 29 | 30 | 31 | .social-icons a { 32 | display: inline-flex; 33 | padding: 10px; 34 | } 35 | 36 | .social-icons a svg { 37 | height: 26px; 38 | width: 26px; 39 | } 40 | 41 | code { 42 | direction: ltr; 43 | } 44 | 45 | div.highlight, 46 | pre { 47 | position: relative; 48 | } 49 | 50 | .copy-code { 51 | display: none; 52 | position: absolute; 53 | top: 4px; 54 | right: 4px; 55 | color: rgba(255, 255, 255, 0.8); 56 | background: rgba(78, 78, 78, 0.8); 57 | border-radius: var(--radius); 58 | padding: 0 5px; 59 | font-size: 14px; 60 | user-select: none; 61 | } 62 | 63 | div.highlight:hover .copy-code, 64 | pre:hover .copy-code { 65 | display: block; 66 | } 67 | -------------------------------------------------------------------------------- /assets/css/common/post-entry.css: -------------------------------------------------------------------------------- 1 | .first-entry { 2 | position: relative; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: center; 6 | min-height: 320px; 7 | margin: var(--gap) 0 calc(var(--gap) * 2) 0; 8 | } 9 | 10 | .first-entry .entry-header { 11 | overflow: hidden; 12 | display: -webkit-box; 13 | -webkit-box-orient: vertical; 14 | -webkit-line-clamp: 3; 15 | } 16 | 17 | .first-entry .entry-header h1 { 18 | font-size: 34px; 19 | line-height: 1.3; 20 | } 21 | 22 | .first-entry .entry-content { 23 | margin: 14px 0; 24 | font-size: 16px; 25 | -webkit-line-clamp: 3; 26 | } 27 | 28 | .first-entry .entry-footer { 29 | font-size: 14px; 30 | } 31 | 32 | .home-info .entry-content { 33 | -webkit-line-clamp: unset; 34 | } 35 | 36 | .post-entry { 37 | position: relative; 38 | margin-bottom: var(--gap); 39 | padding: var(--gap); 40 | background: var(--entry); 41 | border-radius: var(--radius); 42 | transition: transform 0.1s; 43 | border: 1px solid var(--border); 44 | } 45 | 46 | .post-entry:active { 47 | transform: scale(0.96); 48 | } 49 | 50 | .tag-entry .entry-cover { 51 | display: none; 52 | } 53 | 54 | .entry-header h2 { 55 | font-size: 24px; 56 | line-height: 1.3; 57 | } 58 | 59 | .entry-content { 60 | margin: 8px 0; 61 | color: var(--secondary); 62 | font-size: 14px; 63 | line-height: 1.6; 64 | overflow: hidden; 65 | display: -webkit-box; 66 | -webkit-box-orient: vertical; 67 | -webkit-line-clamp: 2; 68 | } 69 | 70 | .entry-footer { 71 | color: var(--secondary); 72 | font-size: 13px; 73 | } 74 | 75 | .entry-link { 76 | position: absolute; 77 | left: 0; 78 | right: 0; 79 | top: 0; 80 | bottom: 0; 81 | } 82 | 83 | .entry-hint { 84 | color: var(--secondary); 85 | } 86 | 87 | .entry-hint-parent { 88 | display: flex; 89 | justify-content: space-between; 90 | } 91 | 92 | .entry-cover { 93 | font-size: 14px; 94 | margin-bottom: var(--gap); 95 | text-align: center; 96 | } 97 | 98 | .entry-cover img { 99 | border-radius: var(--radius); 100 | width: 100%; 101 | height: auto; 102 | } 103 | 104 | .entry-cover a { 105 | color: var(--secondary); 106 | box-shadow: 0 1px 0 var(--primary); 107 | } 108 | -------------------------------------------------------------------------------- /assets/css/common/post-single.css: -------------------------------------------------------------------------------- 1 | .page-header, 2 | .post-header { 3 | margin: 24px auto var(--content-gap) auto; 4 | } 5 | 6 | .post-title { 7 | margin-bottom: 2px; 8 | font-size: 40px; 9 | } 10 | 11 | .post-description { 12 | margin-top: 10px; 13 | margin-bottom: 5px; 14 | } 15 | 16 | .post-meta, 17 | .breadcrumbs { 18 | color: var(--secondary); 19 | font-size: 14px; 20 | display: flex; 21 | flex-wrap: wrap; 22 | align-items: center; 23 | } 24 | 25 | .post-meta .i18n_list li { 26 | display: inline-flex; 27 | list-style: none; 28 | margin: auto 3px; 29 | box-shadow: 0 1px 0 var(--secondary); 30 | } 31 | 32 | .breadcrumbs a { 33 | font-size: 16px; 34 | } 35 | 36 | .post-content { 37 | color: var(--content); 38 | } 39 | 40 | .post-content h3, 41 | .post-content h4, 42 | .post-content h5, 43 | .post-content h6 { 44 | margin: 24px 0 16px; 45 | } 46 | 47 | .post-content h1 { 48 | margin: 40px auto 32px; 49 | font-size: 40px; 50 | } 51 | 52 | .post-content h2 { 53 | margin: 32px auto 24px; 54 | font-size: 32px; 55 | } 56 | 57 | .post-content h3 { 58 | font-size: 24px; 59 | } 60 | 61 | .post-content h4 { 62 | font-size: 16px; 63 | } 64 | 65 | .post-content h5 { 66 | font-size: 14px; 67 | } 68 | 69 | .post-content h6 { 70 | font-size: 12px; 71 | } 72 | 73 | .post-content a, 74 | .toc a:hover { 75 | box-shadow: 0 1px 0; 76 | box-decoration-break: clone; 77 | -webkit-box-decoration-break: clone; 78 | } 79 | 80 | .post-content a code { 81 | margin: auto 0; 82 | border-radius: 0; 83 | box-shadow: 0 -1px 0 var(--primary) inset; 84 | } 85 | 86 | .post-content del { 87 | text-decoration: line-through; 88 | } 89 | 90 | .post-content dl, 91 | .post-content ol, 92 | .post-content p, 93 | .post-content figure, 94 | .post-content ul { 95 | margin-bottom: var(--content-gap); 96 | } 97 | 98 | .post-content ol, 99 | .post-content ul { 100 | padding-inline-start: 20px; 101 | } 102 | 103 | .post-content li { 104 | margin-top: 5px; 105 | } 106 | 107 | .post-content li p { 108 | margin-bottom: 0; 109 | } 110 | 111 | .post-content dl { 112 | display: flex; 113 | flex-wrap: wrap; 114 | margin: 0; 115 | } 116 | 117 | .post-content dt { 118 | width: 25%; 119 | font-weight: 700; 120 | } 121 | 122 | .post-content dd { 123 | width: 75%; 124 | margin-inline-start: 0; 125 | padding-inline-start: 10px; 126 | } 127 | 128 | .post-content dd~dd, 129 | .post-content dt~dt { 130 | margin-top: 10px; 131 | } 132 | 133 | .post-content table { 134 | margin-bottom: var(--content-gap); 135 | } 136 | 137 | .post-content table th, 138 | .post-content table:not(.highlighttable, .highlight table, .gist .highlight) td { 139 | min-width: 80px; 140 | padding: 8px 5px; 141 | line-height: 1.5; 142 | border-bottom: 1px solid var(--border); 143 | } 144 | 145 | .post-content table th { 146 | text-align: start; 147 | } 148 | 149 | .post-content table:not(.highlighttable) td code:only-child { 150 | margin: auto 0; 151 | } 152 | 153 | .post-content .highlight table { 154 | border-radius: var(--radius); 155 | } 156 | 157 | .post-content .highlight:not(table) { 158 | margin: 10px auto; 159 | background: var(--code-block-bg) !important; 160 | border-radius: var(--radius); 161 | direction: ltr; 162 | } 163 | 164 | .post-content li>.highlight { 165 | margin-inline-end: 0; 166 | } 167 | 168 | .post-content ul pre { 169 | margin-inline-start: calc(var(--gap) * -2); 170 | } 171 | 172 | .post-content .highlight pre { 173 | margin: 0; 174 | } 175 | 176 | .post-content .highlighttable { 177 | table-layout: fixed; 178 | } 179 | 180 | .post-content .highlighttable td:first-child { 181 | width: 40px; 182 | } 183 | 184 | .post-content .highlighttable td .linenodiv { 185 | padding-inline-end: 0 !important; 186 | } 187 | 188 | .post-content .highlighttable td .highlight, 189 | .post-content .highlighttable td .linenodiv pre { 190 | margin-bottom: 0; 191 | } 192 | 193 | .post-content code { 194 | margin: auto 4px; 195 | padding: 4px 6px; 196 | font-size: 0.78em; 197 | line-height: 1.5; 198 | background: var(--code-bg); 199 | border-radius: 2px; 200 | } 201 | 202 | .post-content pre code { 203 | display: grid; 204 | margin: auto 0; 205 | padding: 10px; 206 | color: rgb(213, 213, 214); 207 | background: var(--code-block-bg) !important; 208 | border-radius: var(--radius); 209 | overflow-x: auto; 210 | word-break: break-all; 211 | } 212 | 213 | .post-content blockquote { 214 | margin: 20px 0; 215 | padding: 0 14px; 216 | border-inline-start: 3px solid var(--primary); 217 | } 218 | 219 | .post-content hr { 220 | margin: 30px 0; 221 | height: 2px; 222 | background: var(--tertiary); 223 | border: 0; 224 | } 225 | 226 | .post-content iframe { 227 | max-width: 100%; 228 | } 229 | 230 | .post-content img { 231 | border-radius: 4px; 232 | margin: 1rem 0; 233 | } 234 | 235 | .post-content img[src*="#center"] { 236 | margin: 1rem auto; 237 | } 238 | 239 | .post-content figure.align-center { 240 | text-align: center; 241 | } 242 | 243 | .post-content figure>figcaption { 244 | color: var(--primary); 245 | font-size: 16px; 246 | font-weight: bold; 247 | margin: 8px 0 16px; 248 | } 249 | 250 | .post-content figure>figcaption>p { 251 | color: var(--secondary); 252 | font-size: 14px; 253 | font-weight: normal; 254 | } 255 | 256 | .toc { 257 | margin: 0 2px 40px 2px; 258 | border: 1px solid var(--border); 259 | background: var(--code-bg); 260 | border-radius: var(--radius); 261 | padding: 0.4em; 262 | } 263 | 264 | .dark .toc { 265 | background: var(--entry); 266 | } 267 | 268 | .toc details summary { 269 | cursor: zoom-in; 270 | margin-inline-start: 10px; 271 | user-select: none; 272 | } 273 | 274 | .toc details[open] summary { 275 | cursor: zoom-out; 276 | } 277 | 278 | .toc .details { 279 | display: inline; 280 | font-weight: 500; 281 | } 282 | 283 | .toc .inner { 284 | margin: 5px 20px 0; 285 | padding: 0 10px; 286 | opacity: 0.9; 287 | } 288 | 289 | .toc li ul { 290 | margin-inline-start: var(--gap); 291 | } 292 | 293 | .toc summary:focus { 294 | outline: 0; 295 | } 296 | 297 | .post-footer { 298 | margin-top: 56px; 299 | } 300 | 301 | .post-footer>* { 302 | margin-bottom: 10px; 303 | } 304 | 305 | .post-tags { 306 | display: flex; 307 | flex-wrap: wrap; 308 | gap: 10px; 309 | } 310 | 311 | .post-tags li { 312 | display: inline-block; 313 | } 314 | 315 | .post-tags a, 316 | .share-buttons, 317 | .paginav { 318 | border-radius: var(--radius); 319 | background: var(--code-bg); 320 | border: 1px solid var(--border); 321 | } 322 | 323 | .post-tags a { 324 | display: block; 325 | padding: 0 14px; 326 | color: var(--secondary); 327 | font-size: 14px; 328 | line-height: 34px; 329 | background: var(--code-bg); 330 | } 331 | 332 | .post-tags a:hover, 333 | .paginav a:hover { 334 | background: var(--border); 335 | } 336 | 337 | .share-buttons { 338 | padding: 10px; 339 | display: flex; 340 | justify-content: center; 341 | overflow-x: auto; 342 | gap: 10px; 343 | } 344 | 345 | .share-buttons li, 346 | .share-buttons a { 347 | display: inline-flex; 348 | } 349 | 350 | .share-buttons a:not(:last-of-type) { 351 | margin-inline-end: 12px; 352 | } 353 | 354 | h1:hover .anchor, 355 | h2:hover .anchor, 356 | h3:hover .anchor, 357 | h4:hover .anchor, 358 | h5:hover .anchor, 359 | h6:hover .anchor { 360 | display: inline-flex; 361 | color: var(--secondary); 362 | margin-inline-start: 8px; 363 | font-weight: 500; 364 | user-select: none; 365 | } 366 | 367 | .paginav { 368 | display: flex; 369 | line-height: 30px; 370 | } 371 | 372 | .paginav a { 373 | padding-inline-start: 14px; 374 | padding-inline-end: 14px; 375 | border-radius: var(--radius); 376 | } 377 | 378 | .paginav .title { 379 | letter-spacing: 1px; 380 | text-transform: uppercase; 381 | font-size: small; 382 | color: var(--secondary); 383 | } 384 | 385 | .paginav .prev, 386 | .paginav .next { 387 | width: 50%; 388 | } 389 | 390 | .paginav span:hover:not(.title) { 391 | box-shadow: 0 1px 0; 392 | } 393 | 394 | .paginav .next { 395 | margin-inline-start: auto; 396 | text-align: right; 397 | } 398 | 399 | [dir="rtl"] .paginav .next { 400 | text-align: left; 401 | } 402 | 403 | h1>a>svg { 404 | display: inline; 405 | } 406 | 407 | img.in-text { 408 | display: inline; 409 | margin: auto; 410 | } 411 | -------------------------------------------------------------------------------- /assets/css/common/profile-mode.css: -------------------------------------------------------------------------------- 1 | .buttons, 2 | .main .profile { 3 | display: flex; 4 | justify-content: center; 5 | } 6 | 7 | .main .profile { 8 | align-items: center; 9 | min-height: calc(100vh - var(--header-height) - var(--footer-height) - (var(--gap) * 2)); 10 | text-align: center; 11 | } 12 | 13 | .profile .profile_inner { 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | gap: 10px; 18 | } 19 | 20 | .profile img { 21 | border-radius: 50%; 22 | } 23 | 24 | .buttons { 25 | flex-wrap: wrap; 26 | max-width: 400px; 27 | } 28 | 29 | .button { 30 | background: var(--tertiary); 31 | border-radius: var(--radius); 32 | margin: 8px; 33 | padding: 6px; 34 | transition: transform 0.1s; 35 | } 36 | 37 | .button-inner { 38 | padding: 0 8px; 39 | } 40 | 41 | .button:active { 42 | transform: scale(0.96); 43 | } 44 | -------------------------------------------------------------------------------- /assets/css/common/search.css: -------------------------------------------------------------------------------- 1 | #searchbox input { 2 | padding: 4px 10px; 3 | width: 100%; 4 | color: var(--primary); 5 | font-weight: bold; 6 | border: 2px solid var(--tertiary); 7 | border-radius: var(--radius); 8 | } 9 | 10 | #searchbox input:focus { 11 | border-color: var(--secondary); 12 | } 13 | 14 | #searchResults li { 15 | list-style: none; 16 | border-radius: var(--radius); 17 | padding: 10px; 18 | margin: 10px 0; 19 | position: relative; 20 | font-weight: 500; 21 | } 22 | 23 | #searchResults { 24 | margin: 10px 0; 25 | width: 100%; 26 | } 27 | 28 | #searchResults li:active { 29 | transition: transform 0.1s; 30 | transform: scale(0.98); 31 | } 32 | 33 | #searchResults a { 34 | position: absolute; 35 | width: 100%; 36 | height: 100%; 37 | top: 0px; 38 | left: 0px; 39 | outline: none; 40 | } 41 | 42 | #searchResults .focus { 43 | transform: scale(0.98); 44 | border: 2px solid var(--tertiary); 45 | } 46 | -------------------------------------------------------------------------------- /assets/css/common/terms.css: -------------------------------------------------------------------------------- 1 | .terms-tags li { 2 | display: inline-block; 3 | margin: 10px; 4 | font-weight: 500; 5 | } 6 | 7 | .terms-tags a { 8 | display: block; 9 | padding: 3px 10px; 10 | background: var(--tertiary); 11 | border-radius: 6px; 12 | transition: transform 0.1s; 13 | } 14 | 15 | .terms-tags a:active { 16 | background: var(--tertiary); 17 | transform: scale(0.96); 18 | } 19 | -------------------------------------------------------------------------------- /assets/css/core/license.css: -------------------------------------------------------------------------------- 1 | /* 2 | PaperMod v8+ 3 | License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE 4 | Copyright (c) 2020 nanxiaobei and adityatelange 5 | Copyright (c) 2021-2025 adityatelange 6 | */ 7 | -------------------------------------------------------------------------------- /assets/css/core/reset.css: -------------------------------------------------------------------------------- 1 | *, 2 | ::after, 3 | ::before { 4 | box-sizing: border-box; 5 | } 6 | 7 | html { 8 | -webkit-tap-highlight-color: transparent; 9 | overflow-y: scroll; 10 | -webkit-text-size-adjust: 100%; 11 | text-size-adjust: 100%; 12 | } 13 | 14 | a, 15 | button, 16 | body, 17 | h1, 18 | h2, 19 | h3, 20 | h4, 21 | h5, 22 | h6 { 23 | color: var(--primary); 24 | } 25 | 26 | body { 27 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 28 | font-size: 18px; 29 | line-height: 1.6; 30 | word-break: break-word; 31 | background: var(--theme); 32 | } 33 | 34 | article, 35 | aside, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | nav, 43 | section, 44 | table { 45 | display: block; 46 | } 47 | 48 | h1, 49 | h2, 50 | h3, 51 | h4, 52 | h5, 53 | h6 { 54 | line-height: 1.2; 55 | } 56 | 57 | h1, 58 | h2, 59 | h3, 60 | h4, 61 | h5, 62 | h6, 63 | p { 64 | margin-top: 0; 65 | margin-bottom: 0; 66 | } 67 | 68 | ul { 69 | padding: 0; 70 | } 71 | 72 | a { 73 | text-decoration: none; 74 | } 75 | 76 | body, 77 | figure, 78 | ul { 79 | margin: 0; 80 | } 81 | 82 | table { 83 | width: 100%; 84 | border-collapse: collapse; 85 | border-spacing: 0; 86 | overflow-x: auto; 87 | word-break: keep-all; 88 | } 89 | 90 | button, 91 | input, 92 | textarea { 93 | padding: 0; 94 | font: inherit; 95 | background: 0 0; 96 | border: 0; 97 | } 98 | 99 | input, 100 | textarea { 101 | outline: 0; 102 | } 103 | 104 | button, 105 | input[type=button], 106 | input[type=submit] { 107 | cursor: pointer; 108 | } 109 | 110 | input:-webkit-autofill, 111 | textarea:-webkit-autofill { 112 | box-shadow: 0 0 0 50px var(--theme) inset; 113 | } 114 | 115 | img { 116 | display: block; 117 | max-width: 100%; 118 | } 119 | -------------------------------------------------------------------------------- /assets/css/core/theme-vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --gap: 24px; 3 | --content-gap: 20px; 4 | --nav-width: 1024px; 5 | --main-width: 720px; 6 | --header-height: 60px; 7 | --footer-height: 60px; 8 | --radius: 8px; 9 | --theme: rgb(255, 255, 255); 10 | --entry: rgb(255, 255, 255); 11 | --primary: rgb(30, 30, 30); 12 | --secondary: rgb(108, 108, 108); 13 | --tertiary: rgb(214, 214, 214); 14 | --content: rgb(31, 31, 31); 15 | --code-block-bg: rgb(28, 29, 33); 16 | --code-bg: rgb(245, 245, 245); 17 | --border: rgb(238, 238, 238); 18 | } 19 | 20 | .dark { 21 | --theme: rgb(29, 30, 32); 22 | --entry: rgb(46, 46, 51); 23 | --primary: rgb(218, 218, 219); 24 | --secondary: rgb(155, 156, 157); 25 | --tertiary: rgb(65, 66, 68); 26 | --content: rgb(196, 196, 197); 27 | --code-block-bg: rgb(46, 46, 51); 28 | --code-bg: rgb(55, 56, 62); 29 | --border: rgb(51, 51, 51); 30 | } 31 | 32 | .list { 33 | background: var(--code-bg); 34 | } 35 | 36 | .dark.list { 37 | background: var(--theme); 38 | } 39 | -------------------------------------------------------------------------------- /assets/css/core/zmedia.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 768px) { 2 | /* theme-vars */ 3 | :root { 4 | --gap: 14px; 5 | } 6 | 7 | /* profile-mode */ 8 | .profile img { 9 | transform: scale(0.85); 10 | } 11 | 12 | /* post-entry */ 13 | .first-entry { 14 | min-height: 260px; 15 | } 16 | 17 | /* archive */ 18 | .archive-month { 19 | flex-direction: column; 20 | } 21 | 22 | .archive-year { 23 | margin-top: 20px; 24 | } 25 | 26 | /* footer */ 27 | .footer { 28 | padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap); 29 | } 30 | } 31 | 32 | /* footer */ 33 | @media screen and (max-width: 900px) { 34 | .list .top-link { 35 | transform: translateY(-5rem); 36 | } 37 | } 38 | 39 | @media screen and (max-width: 340px) { 40 | .share-buttons { 41 | justify-content: unset; 42 | } 43 | } 44 | 45 | @media (prefers-reduced-motion) { 46 | /* terms; profile-mode; post-single; post-entry; post-entry; search; search */ 47 | .terms-tags a:active, 48 | .button:active, 49 | .post-entry:active, 50 | .top-link, 51 | #searchResults .focus, 52 | #searchResults li:active { 53 | transform: none; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /assets/css/extended/blank.css: -------------------------------------------------------------------------------- 1 | /* 2 | This is just a placeholder blank stylesheet so as to support adding custom styles budled with theme's default styles 3 | 4 | Read https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets for more info 5 | */ 6 | -------------------------------------------------------------------------------- /assets/css/includes/chroma-mod.css: -------------------------------------------------------------------------------- 1 | .chroma { 2 | background-color: unset !important; 3 | } 4 | 5 | .chroma .hl { 6 | display: flex; 7 | } 8 | 9 | .chroma .lnt { 10 | padding: 0 0 0 12px; 11 | } 12 | 13 | .highlight pre.chroma code { 14 | padding: 8px 0; 15 | } 16 | 17 | .highlight pre.chroma .line .cl, 18 | .chroma .ln { 19 | padding: 0 10px; 20 | } 21 | 22 | .chroma .lntd:last-of-type { 23 | width: 100%; 24 | } 25 | -------------------------------------------------------------------------------- /assets/css/includes/chroma-styles.css: -------------------------------------------------------------------------------- 1 | /* Background */ .bg { color: #cad3f5; background-color: #24273a; } 2 | /* PreWrapper */ .chroma { color: #cad3f5; background-color: #24273a; } 3 | /* Other */ .chroma .x { } 4 | /* Error */ .chroma .err { color: #ed8796 } 5 | /* CodeLine */ .chroma .cl { } 6 | /* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } 7 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 8 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } 9 | /* LineHighlight */ .chroma .hl { background-color: #474733 } 10 | /* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8087a2 } 11 | /* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8087a2 } 12 | /* Line */ .chroma .line { display: flex; } 13 | /* Keyword */ .chroma .k { color: #c6a0f6 } 14 | /* KeywordConstant */ .chroma .kc { color: #f5a97f } 15 | /* KeywordDeclaration */ .chroma .kd { color: #ed8796 } 16 | /* KeywordNamespace */ .chroma .kn { color: #8bd5ca } 17 | /* KeywordPseudo */ .chroma .kp { color: #c6a0f6 } 18 | /* KeywordReserved */ .chroma .kr { color: #c6a0f6 } 19 | /* KeywordType */ .chroma .kt { color: #ed8796 } 20 | /* Name */ .chroma .n { } 21 | /* NameAttribute */ .chroma .na { color: #8aadf4 } 22 | /* NameBuiltin */ .chroma .nb { color: #91d7e3 } 23 | /* NameBuiltinPseudo */ .chroma .bp { color: #91d7e3 } 24 | /* NameClass */ .chroma .nc { color: #eed49f } 25 | /* NameConstant */ .chroma .no { color: #eed49f } 26 | /* NameDecorator */ .chroma .nd { color: #8aadf4; font-weight: bold } 27 | /* NameEntity */ .chroma .ni { color: #8bd5ca } 28 | /* NameException */ .chroma .ne { color: #f5a97f } 29 | /* NameFunction */ .chroma .nf { color: #8aadf4 } 30 | /* NameFunctionMagic */ .chroma .fm { color: #8aadf4 } 31 | /* NameLabel */ .chroma .nl { color: #91d7e3 } 32 | /* NameNamespace */ .chroma .nn { color: #f5a97f } 33 | /* NameOther */ .chroma .nx { } 34 | /* NameProperty */ .chroma .py { color: #f5a97f } 35 | /* NameTag */ .chroma .nt { color: #c6a0f6 } 36 | /* NameVariable */ .chroma .nv { color: #f4dbd6 } 37 | /* NameVariableClass */ .chroma .vc { color: #f4dbd6 } 38 | /* NameVariableGlobal */ .chroma .vg { color: #f4dbd6 } 39 | /* NameVariableInstance */ .chroma .vi { color: #f4dbd6 } 40 | /* NameVariableMagic */ .chroma .vm { color: #f4dbd6 } 41 | /* Literal */ .chroma .l { } 42 | /* LiteralDate */ .chroma .ld { } 43 | /* LiteralString */ .chroma .s { color: #a6da95 } 44 | /* LiteralStringAffix */ .chroma .sa { color: #ed8796 } 45 | /* LiteralStringBacktick */ .chroma .sb { color: #a6da95 } 46 | /* LiteralStringChar */ .chroma .sc { color: #a6da95 } 47 | /* LiteralStringDelimiter */ .chroma .dl { color: #8aadf4 } 48 | /* LiteralStringDoc */ .chroma .sd { color: #6e738d } 49 | /* LiteralStringDouble */ .chroma .s2 { color: #a6da95 } 50 | /* LiteralStringEscape */ .chroma .se { color: #8aadf4 } 51 | /* LiteralStringHeredoc */ .chroma .sh { color: #6e738d } 52 | /* LiteralStringInterpol */ .chroma .si { color: #a6da95 } 53 | /* LiteralStringOther */ .chroma .sx { color: #a6da95 } 54 | /* LiteralStringRegex */ .chroma .sr { color: #8bd5ca } 55 | /* LiteralStringSingle */ .chroma .s1 { color: #a6da95 } 56 | /* LiteralStringSymbol */ .chroma .ss { color: #a6da95 } 57 | /* LiteralNumber */ .chroma .m { color: #f5a97f } 58 | /* LiteralNumberBin */ .chroma .mb { color: #f5a97f } 59 | /* LiteralNumberFloat */ .chroma .mf { color: #f5a97f } 60 | /* LiteralNumberHex */ .chroma .mh { color: #f5a97f } 61 | /* LiteralNumberInteger */ .chroma .mi { color: #f5a97f } 62 | /* LiteralNumberIntegerLong */ .chroma .il { color: #f5a97f } 63 | /* LiteralNumberOct */ .chroma .mo { color: #f5a97f } 64 | /* Operator */ .chroma .o { color: #91d7e3; font-weight: bold } 65 | /* OperatorWord */ .chroma .ow { color: #91d7e3; font-weight: bold } 66 | /* Punctuation */ .chroma .p { } 67 | /* Comment */ .chroma .c { color: #6e738d; font-style: italic } 68 | /* CommentHashbang */ .chroma .ch { color: #6e738d; font-style: italic } 69 | /* CommentMultiline */ .chroma .cm { color: #6e738d; font-style: italic } 70 | /* CommentSingle */ .chroma .c1 { color: #6e738d; font-style: italic } 71 | /* CommentSpecial */ .chroma .cs { color: #6e738d; font-style: italic } 72 | /* CommentPreproc */ .chroma .cp { color: #6e738d; font-style: italic } 73 | /* CommentPreprocFile */ .chroma .cpf { color: #6e738d; font-weight: bold; font-style: italic } 74 | /* Generic */ .chroma .g { } 75 | /* GenericDeleted */ .chroma .gd { color: #ed8796; background-color: #363a4f } 76 | /* GenericEmph */ .chroma .ge { font-style: italic } 77 | /* GenericError */ .chroma .gr { color: #ed8796 } 78 | /* GenericHeading */ .chroma .gh { color: #f5a97f; font-weight: bold } 79 | /* GenericInserted */ .chroma .gi { color: #a6da95; background-color: #363a4f } 80 | /* GenericOutput */ .chroma .go { } 81 | /* GenericPrompt */ .chroma .gp { } 82 | /* GenericStrong */ .chroma .gs { font-weight: bold } 83 | /* GenericSubheading */ .chroma .gu { color: #f5a97f; font-weight: bold } 84 | /* GenericTraceback */ .chroma .gt { color: #ed8796 } 85 | /* GenericUnderline */ .chroma .gl { text-decoration: underline } 86 | /* TextWhitespace */ .chroma .w { } 87 | -------------------------------------------------------------------------------- /assets/css/includes/scroll-bar.css: -------------------------------------------------------------------------------- 1 | /* from reset */ 2 | ::-webkit-scrollbar-track { 3 | background: 0 0; 4 | } 5 | 6 | .list:not(.dark)::-webkit-scrollbar-track { 7 | background: var(--code-bg); 8 | } 9 | 10 | ::-webkit-scrollbar-thumb { 11 | background: var(--tertiary); 12 | border: 5px solid var(--theme); 13 | border-radius: var(--radius); 14 | } 15 | 16 | .list:not(.dark)::-webkit-scrollbar-thumb { 17 | border: 5px solid var(--code-bg); 18 | } 19 | 20 | ::-webkit-scrollbar-thumb:hover { 21 | background: var(--secondary); 22 | } 23 | 24 | ::-webkit-scrollbar:not(.highlighttable, .highlight table, .gist .highlight) { 25 | background: var(--theme); 26 | } 27 | 28 | /* from post-single */ 29 | .post-content .highlighttable td .highlight pre code::-webkit-scrollbar { 30 | display: none; 31 | } 32 | 33 | .post-content :not(table) ::-webkit-scrollbar-thumb { 34 | border: 2px solid var(--code-block-bg); 35 | background: rgb(113, 113, 117); 36 | } 37 | 38 | .post-content :not(table) ::-webkit-scrollbar-thumb:hover { 39 | background: rgb(163, 163, 165); 40 | } 41 | 42 | .gist table::-webkit-scrollbar-thumb { 43 | border: 2px solid rgb(255, 255, 255); 44 | background: rgb(173, 173, 173); 45 | } 46 | 47 | .gist table::-webkit-scrollbar-thumb:hover { 48 | background: rgb(112, 112, 112); 49 | } 50 | 51 | .post-content table::-webkit-scrollbar-thumb { 52 | border-width: 2px; 53 | } 54 | 55 | /* from zmedia */ 56 | @media screen and (min-width: 768px) { 57 | 58 | /* reset */ 59 | ::-webkit-scrollbar { 60 | width: 19px; 61 | height: 11px; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /assets/js/fastsearch.js: -------------------------------------------------------------------------------- 1 | import * as params from '@params'; 2 | 3 | let fuse; // holds our search engine 4 | let resList = document.getElementById('searchResults'); 5 | let sInput = document.getElementById('searchInput'); 6 | let first, last, current_elem = null 7 | let resultsAvailable = false; 8 | 9 | // load our search index 10 | window.onload = function () { 11 | let xhr = new XMLHttpRequest(); 12 | xhr.onreadystatechange = function () { 13 | if (xhr.readyState === 4) { 14 | if (xhr.status === 200) { 15 | let data = JSON.parse(xhr.responseText); 16 | if (data) { 17 | // fuse.js options; check fuse.js website for details 18 | let options = { 19 | distance: 100, 20 | threshold: 0.4, 21 | ignoreLocation: true, 22 | keys: [ 23 | 'title', 24 | 'permalink', 25 | 'summary', 26 | 'content' 27 | ] 28 | }; 29 | if (params.fuseOpts) { 30 | options = { 31 | isCaseSensitive: params.fuseOpts.iscasesensitive ?? false, 32 | includeScore: params.fuseOpts.includescore ?? false, 33 | includeMatches: params.fuseOpts.includematches ?? false, 34 | minMatchCharLength: params.fuseOpts.minmatchcharlength ?? 1, 35 | shouldSort: params.fuseOpts.shouldsort ?? true, 36 | findAllMatches: params.fuseOpts.findallmatches ?? false, 37 | keys: params.fuseOpts.keys ?? ['title', 'permalink', 'summary', 'content'], 38 | location: params.fuseOpts.location ?? 0, 39 | threshold: params.fuseOpts.threshold ?? 0.4, 40 | distance: params.fuseOpts.distance ?? 100, 41 | ignoreLocation: params.fuseOpts.ignorelocation ?? true 42 | } 43 | } 44 | fuse = new Fuse(data, options); // build the index from the json file 45 | } 46 | } else { 47 | console.log(xhr.responseText); 48 | } 49 | } 50 | }; 51 | xhr.open('GET', "../index.json"); 52 | xhr.send(); 53 | } 54 | 55 | function activeToggle(ae) { 56 | document.querySelectorAll('.focus').forEach(function (element) { 57 | // rm focus class 58 | element.classList.remove("focus") 59 | }); 60 | if (ae) { 61 | ae.focus() 62 | document.activeElement = current_elem = ae; 63 | ae.parentElement.classList.add("focus") 64 | } else { 65 | document.activeElement.parentElement.classList.add("focus") 66 | } 67 | } 68 | 69 | function reset() { 70 | resultsAvailable = false; 71 | resList.innerHTML = sInput.value = ''; // clear inputbox and searchResults 72 | sInput.focus(); // shift focus to input box 73 | } 74 | 75 | // execute search as each character is typed 76 | sInput.onkeyup = function (e) { 77 | // run a search query (for "term") every time a letter is typed 78 | // in the search box 79 | if (fuse) { 80 | let results; 81 | if (params.fuseOpts) { 82 | results = fuse.search(this.value.trim(), {limit: params.fuseOpts.limit}); // the actual query being run using fuse.js along with options 83 | } else { 84 | results = fuse.search(this.value.trim()); // the actual query being run using fuse.js 85 | } 86 | if (results.length !== 0) { 87 | // build our html if result exists 88 | let resultSet = ''; // our results bucket 89 | 90 | for (let item in results) { 91 | resultSet += `
  • ${results[item].item.title} »
    ` + 92 | `
  • ` 93 | } 94 | 95 | resList.innerHTML = resultSet; 96 | resultsAvailable = true; 97 | first = resList.firstChild; 98 | last = resList.lastChild; 99 | } else { 100 | resultsAvailable = false; 101 | resList.innerHTML = ''; 102 | } 103 | } 104 | } 105 | 106 | sInput.addEventListener('search', function (e) { 107 | // clicked on x 108 | if (!this.value) reset() 109 | }) 110 | 111 | // kb bindings 112 | document.onkeydown = function (e) { 113 | let key = e.key; 114 | let ae = document.activeElement; 115 | 116 | let inbox = document.getElementById("searchbox").contains(ae) 117 | 118 | if (ae === sInput) { 119 | let elements = document.getElementsByClassName('focus'); 120 | while (elements.length > 0) { 121 | elements[0].classList.remove('focus'); 122 | } 123 | } else if (current_elem) ae = current_elem; 124 | 125 | if (key === "Escape") { 126 | reset() 127 | } else if (!resultsAvailable || !inbox) { 128 | return 129 | } else if (key === "ArrowDown") { 130 | e.preventDefault(); 131 | if (ae == sInput) { 132 | // if the currently focused element is the search input, focus the of first
  • 133 | activeToggle(resList.firstChild.lastChild); 134 | } else if (ae.parentElement != last) { 135 | // if the currently focused element's parent is last, do nothing 136 | // otherwise select the next search result 137 | activeToggle(ae.parentElement.nextSibling.lastChild); 138 | } 139 | } else if (key === "ArrowUp") { 140 | e.preventDefault(); 141 | if (ae.parentElement == first) { 142 | // if the currently focused element is first item, go to input box 143 | activeToggle(sInput); 144 | } else if (ae != sInput) { 145 | // if the currently focused element is input box, do nothing 146 | // otherwise select the previous search result 147 | activeToggle(ae.parentElement.previousSibling.lastChild); 148 | } 149 | } else if (key === "ArrowRight") { 150 | ae.click(); // click on active link 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /assets/js/fuse.basic.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io) 3 | * 4 | * Copyright (c) 2023 Kiro Risk (http://kiro.me) 5 | * All Rights Reserved. Apache Software License 2.0 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | */ 9 | var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?O.getFn:n,o=t.fieldNormWeight,a=void 0===o?O.fieldNormWeight:o;r(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(j).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),a=parseFloat(Math.round(o*r)/r);return n.set(i,a),a},clear:function(){n.clear()}}}(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return o(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,f(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();f(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?O.getFn:r,o=n.fieldNormWeight,a=void 0===o?O.fieldNormWeight:o,c=new A({getFn:i,fieldNormWeight:a});return c.setKeys(e.map(x)),c.setSources(t),c.create(),c}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?O.distance:s,u=t.ignoreLocation,l=void 0===u?O.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}var F=32;function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?O.location:i,a=r.distance,c=void 0===a?O.distance:a,s=r.threshold,h=void 0===s?O.threshold:s,u=r.findAllMatches,l=void 0===u?O.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?O.minMatchCharLength:d,v=r.includeMatches,g=void 0===v?O.includeMatches:v,y=r.ignoreLocation,p=void 0===y?O.ignoreLocation:y;if(t.length>F)throw new Error("Pattern length exceeds max of ".concat(F,"."));for(var m,b=t.length,k=e.length,M=Math.max(0,Math.min(o,k)),w=h,x=M,L=f>1||g,S=L?Array(k):[];(m=e.indexOf(t,x))>-1;){var _=I(t,{currentLocation:m,expectedLocation:M,distance:c,ignoreLocation:p});if(w=Math.min(_,w),x=m+b,L)for(var j=0;j=$;z-=1){var J=z-1,R=n[e.charAt(J)];if(L&&(S[J]=+!!R),K[z]=(K[z+1]<<1|1)&R,P&&(K[z]|=(A[z+1]|A[z])<<1|1|A[z+1]),K[z]&N&&(E=I(t,{errors:P,currentLocation:J,expectedLocation:M,distance:c,ignoreLocation:p}))<=w){if(w=E,(x=J)<=M)break;$=Math.max(1,2*M-x)}}if(I(t,{errors:P+1,currentLocation:M,expectedLocation:M,distance:c,ignoreLocation:p})>w)break;A=K}var U={isMatch:x>=0,score:Math.max(.001,E)};if(L){var B=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(S,f);B.length?g&&(U.indices=B):U.isMatch=!1}return U}function N(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?O.location:o,c=i.threshold,s=void 0===c?O.threshold:c,h=i.distance,u=void 0===h?O.distance:h,l=i.includeMatches,d=void 0===l?O.includeMatches:l,f=i.findAllMatches,v=void 0===f?O.findAllMatches:f,g=i.minMatchCharLength,y=void 0===g?O.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?O.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?O.ignoreLocation:b;if(r(this,e),this.options={location:a,threshold:s,distance:u,includeMatches:d,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:k},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var M=function(e,t){n.chunks.push({pattern:e,alphabet:N(e),startIndex:t})},w=this.pattern.length;if(w>F){for(var x=0,L=w%F,S=w-L;x-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function D(e,t){t.score=e.score}var K=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(r(this,e),this.options=t(t({},O),i),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new w(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof A))throw new Error("Incorrect 'index' type");this._myIndex=t||E(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){y(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,o=r.includeScore,a=r.shouldSort,c=r.sortFn,s=r.ignoreFieldNorm,h=f(e)?f(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?O.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,a=n?n.weight:null;t*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*(r?1:i))})),e.score=t}))}(h,{ignoreFieldNorm:s}),a&&h.sort(c),v(n)&&n>-1&&(h=h.slice(0,n)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?O.includeMatches:r,o=n.includeScore,a=void 0===o?O.includeScore:o,c=[];return i&&c.push($),a&&c.push(D),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}(h,this._docs,{includeMatches:i,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=T(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(y(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var t=this,n=T(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(y(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!y(n))return[];var i=[];if(u(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(y(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,h=c.score,l=c.indices;s&&i.push({score:h,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return K.version="7.0.0",K.createIndex=E,K.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?O.getFn:n,i=t.fieldNormWeight,o=void 0===i?O.fieldNormWeight:i,a=e.keys,c=e.records,s=new A({getFn:r,fieldNormWeight:o});return s.setKeys(a),s.setIndexRecords(c),s},K.config=O,K},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(); -------------------------------------------------------------------------------- /assets/js/license.js: -------------------------------------------------------------------------------- 1 | /* 2 | PaperMod v8+ 3 | License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE 4 | Copyright (c) 2020 nanxiaobei and adityatelange 5 | Copyright (c) 2021-2025 adityatelange 6 | */ 7 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/adityatelange/hugo-PaperMod 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /i18n/ar.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "السابق" 3 | 4 | - id: next_page 5 | translation: "التالي" 6 | 7 | - id: read_time 8 | translation: 9 | one: "دقيقة واحدة" 10 | two: "دقيقتان" 11 | few: "بضع ثوان" 12 | zero: "الآن" 13 | other: "دقائق {{ .Count }}" 14 | 15 | - id: toc 16 | translation: "فهرس المحتوى" 17 | 18 | - id: translations 19 | translation: "ترجمات أخرى" 20 | 21 | - id: home 22 | translation: "الصفحة الرئيسية" 23 | 24 | - id: code_copied 25 | translation: "تم النسخ!" 26 | 27 | - id: code_copy 28 | translation: "نسخ الكود" 29 | -------------------------------------------------------------------------------- /i18n/be.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Папярэдняя" 3 | 4 | - id: next_page 5 | translation: "Наступная" 6 | 7 | - id: read_time 8 | translation: 9 | zero: "0 хвілін" 10 | one: "1 хвіліна" 11 | few: "{{ .Count }} хвіліны" 12 | many: "{{ .Count }} хвілін" 13 | other: "{{ .Count }} хвілін" 14 | 15 | - id: words 16 | translation: 17 | zero: "няма слоў" 18 | one: "1 слова" 19 | few: "{{ .Count }} слова" 20 | many: "{{ .Count }} слоў" 21 | other: "{{ .Count }} слова" 22 | 23 | - id: toc 24 | translation: "Змест" 25 | 26 | - id: translations 27 | translation: "Пераклады" 28 | 29 | - id: home 30 | translation: "Галоўная" 31 | 32 | - id: edit_post 33 | translation: "Рэдагаваць" 34 | 35 | - id: code_copy 36 | translation: "капіяваць" 37 | 38 | - id: code_copied 39 | translation: "скапіявана!" 40 | -------------------------------------------------------------------------------- /i18n/bg.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Предишна страница" 3 | 4 | - id: next_page 5 | translation: "Следваща страница" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 мин" 10 | other: "{{ .Count }} мин" 11 | 12 | - id: toc 13 | translation: "Съдържание" 14 | 15 | - id: translations 16 | translation: "Преводи" 17 | -------------------------------------------------------------------------------- /i18n/bn.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "পূর্ববর্তী" 3 | 4 | - id: next_page 5 | translation: "পরবর্তী" 6 | 7 | - id: read_time 8 | translation: 9 | one : "১ মিনিট" 10 | other: "{{ .Count }} মিনিট" 11 | 12 | - id: words 13 | translation: 14 | one : "১ টি শব্দ" 15 | other: "{{ .Count }} টি শব্দ" 16 | 17 | - id: toc 18 | translation: "সূচিপত্র" 19 | 20 | - id: translations 21 | translation: "অনুবাদসমূহ" 22 | 23 | - id: home 24 | translation: "হোম" 25 | 26 | - id: edit_post 27 | translation: "সম্পাদনা করুন" 28 | 29 | - id: code_copy 30 | translation: "কপি করুন" 31 | 32 | - id: code_copied 33 | translation: "কপি হয়েছে!" 34 | -------------------------------------------------------------------------------- /i18n/ca.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Pàgina anterior" 3 | 4 | - id: next_page 5 | translation: "Pàgina següent" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Taula de Continguts" 14 | 15 | - id: translations 16 | translation: "Traduccions" 17 | 18 | - id: home 19 | translation: "Inici" 20 | -------------------------------------------------------------------------------- /i18n/ckb.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "پەڕەی پێشتر" 3 | 4 | - id: next_page 5 | translation: "پەڕەی دواتر" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 خولەک" 10 | other: "{{ .Count }} خولەک" 11 | 12 | - id: toc 13 | translation: "پێڕست" 14 | 15 | - id: translations 16 | translation: "وەرگێڕانەکان" 17 | 18 | - id: home 19 | translation: "ماڵەوە" 20 | 21 | - id: code_copy 22 | translation: "لەبەری بگرەوە" 23 | 24 | - id: code_copied 25 | translation: "لەبەر گیرایەوە!" 26 | -------------------------------------------------------------------------------- /i18n/cs.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Předchozí" 3 | 4 | - id: next_page 5 | translation: "Další" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "slovo" 15 | other: "{{ .Count }} slov" 16 | 17 | - id: toc 18 | translation: "Obsah" 19 | 20 | - id: translations 21 | translation: "Překlady" 22 | 23 | - id: home 24 | translation: "Domů" 25 | 26 | - id: edit_post 27 | translation: "Upravit" 28 | 29 | - id: code_copy 30 | translation: "kopírovat" 31 | 32 | - id: code_copied 33 | translation: "zkopírováno!" 34 | -------------------------------------------------------------------------------- /i18n/da.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Forrige Side" 3 | 4 | - id: next_page 5 | translation: "Næste Side" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Indholdsfortegnelse" 14 | 15 | - id: translations 16 | translation: "Oversættelser" 17 | 18 | - id: home 19 | translation: "Start" 20 | 21 | - id: edit_post 22 | translation: "Rediger" 23 | 24 | - id: code_copy 25 | translation: "kopier" 26 | 27 | - id: code_copied 28 | translation: "kopieret!" 29 | -------------------------------------------------------------------------------- /i18n/de.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Vorherige" 3 | 4 | - id: next_page 5 | translation: "Nächste" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 Minute" 10 | other: "{{ .Count }} Minuten" 11 | 12 | - id: words 13 | translation: 14 | one : "Wort" 15 | other: "{{ .Count }} Wörter" 16 | 17 | - id: toc 18 | translation: "Inhaltsverzeichnis" 19 | 20 | - id: translations 21 | translation: "Übersetzungen" 22 | 23 | - id: home 24 | translation: "Home" 25 | 26 | - id: edit_post 27 | translation: "Bearbeiten" 28 | 29 | - id: code_copy 30 | translation: "Kopieren" 31 | 32 | - id: code_copied 33 | translation: "Kopiert!" 34 | -------------------------------------------------------------------------------- /i18n/el.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Προηγούμενο" 3 | 4 | - id: next_page 5 | translation: "Επόμενο" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 λεπτό" 10 | other: "{{ .Count }} λεπτά" 11 | 12 | - id: words 13 | translation: 14 | one: "λέξη" 15 | other: "{{ .Count }} λέξεις" 16 | 17 | - id: toc 18 | translation: "Πίνακας Περιεχομένων" 19 | 20 | - id: translations 21 | translation: "Μεταφράσεις" 22 | 23 | - id: home 24 | translation: "Αρχική" 25 | 26 | - id: edit_post 27 | translation: "Επεξεργασία" 28 | 29 | - id: code_copy 30 | translation: "αντιγραφή" 31 | 32 | - id: code_copied 33 | translation: "αντιγράφηκε!" -------------------------------------------------------------------------------- /i18n/en.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Prev" 3 | 4 | - id: next_page 5 | translation: "Next" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "word" 15 | other: "{{ .Count }} words" 16 | 17 | - id: toc 18 | translation: "Table of Contents" 19 | 20 | - id: translations 21 | translation: "Translations" 22 | 23 | - id: home 24 | translation: "Home" 25 | 26 | - id: edit_post 27 | translation: "Edit" 28 | 29 | - id: code_copy 30 | translation: "copy" 31 | 32 | - id: code_copied 33 | translation: "copied!" 34 | -------------------------------------------------------------------------------- /i18n/eo.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "antaŭa paĝo" 3 | 4 | - id: next_page 5 | translation: "sekva paĝo" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Enhavo" 14 | 15 | - id: translations 16 | translation: "tradukoj" 17 | 18 | - id: home 19 | translation: "ĉefpaĝo" 20 | 21 | - id: code_copy 22 | translation: "kopii" 23 | 24 | - id: code_copied 25 | translation: "kopiite!" 26 | -------------------------------------------------------------------------------- /i18n/es.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Anterior" 3 | 4 | - id: next_page 5 | translation: "Siguiente" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "palabra" 15 | other: "{{ .Count }} palabras" 16 | 17 | - id: toc 18 | translation: "Tabla de Contenidos" 19 | 20 | - id: translations 21 | translation: "Traducciones" 22 | 23 | - id: home 24 | translation: "Inicio" 25 | 26 | - id: edit_post 27 | translation: "Editar" 28 | 29 | - id: code_copy 30 | translation: "copiar" 31 | 32 | - id: code_copied 33 | translation: "¡copiado!" 34 | -------------------------------------------------------------------------------- /i18n/fa.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "صفحه قبلی" 3 | 4 | - id: next_page 5 | translation: "صفحه بعدی" 6 | 7 | - id: read_time 8 | translation: 9 | one: "۱ دقیقه" 10 | other: "{{ .Count }} دقیقه" 11 | 12 | - id: toc 13 | translation: "فهرست مطالب" 14 | 15 | - id: translations 16 | translation: "ترجمه ها" 17 | 18 | - id: home 19 | translation: "خانه" 20 | 21 | - id: edit_post 22 | translation: "ویرایش" 23 | 24 | - id: code_copy 25 | translation: "کپی" 26 | 27 | - id: code_copied 28 | translation: "کپی شد!" -------------------------------------------------------------------------------- /i18n/fi.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Edellinen" 3 | 4 | - id: next_page 5 | translation: "Seuraava" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} minuuttia" 11 | 12 | - id: words 13 | translation: 14 | one : "sana" 15 | other: "{{ .Count }} sanaa" 16 | 17 | - id: toc 18 | translation: "Sisällysluettelo" 19 | 20 | - id: translations 21 | translation: "Käännökset" 22 | 23 | - id: home 24 | translation: "Etusivu" 25 | 26 | - id: edit_post 27 | translation: "Muokkaa" 28 | 29 | - id: code_copy 30 | translation: "Kopioi" 31 | 32 | - id: code_copied 33 | translation: "Kopioitu!" 34 | -------------------------------------------------------------------------------- /i18n/fr.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Précédent" 3 | 4 | - id: next_page 5 | translation: "Suivant" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "mot" 15 | other: "{{ .Count }} mots" 16 | 17 | - id: toc 18 | translation: "Table des matières" 19 | 20 | - id: translations 21 | translation: "Traductions" 22 | 23 | - id: home 24 | translation: "Accueil" 25 | 26 | - id: edit_post 27 | translation: "Modifier" 28 | 29 | - id: code_copy 30 | translation: "Copier" 31 | 32 | - id: code_copied 33 | translation: "Copié !" 34 | -------------------------------------------------------------------------------- /i18n/he.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "הקודם" 3 | 4 | - id: next_page 5 | translation: "הבא" 6 | 7 | - id: read_time 8 | translation: 9 | one: "דקה אחת" 10 | other: "{{ .Count }} דקות" 11 | 12 | - id: words 13 | translation: 14 | one: "מילה אחת" 15 | other: "{{ .Count }} מילים" 16 | 17 | - id: toc 18 | translation: "תוכן עניינים" 19 | 20 | - id: translations 21 | translation: "תרגומים" 22 | 23 | - id: home 24 | translation: "בית" 25 | 26 | - id: edit_post 27 | translation: "ערוך" 28 | 29 | - id: code_copy 30 | translation: "העתק" 31 | 32 | - id: code_copied 33 | translation: "הועתק!" 34 | -------------------------------------------------------------------------------- /i18n/hi.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "पिछला" 3 | 4 | - id: next_page 5 | translation: "अगला" 6 | 7 | - id: read_time 8 | translation: 9 | one : "एक मिनट" 10 | other: "{{ .Count }} मिनट" 11 | 12 | - id: edit_post 13 | translation: "सुधारें" 14 | 15 | - id: toc 16 | translation: "विषय - सूची" 17 | 18 | - id: translations 19 | translation: "अनुवाद" 20 | -------------------------------------------------------------------------------- /i18n/hr.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Prethodna stranica" 3 | 4 | - id: next_page 5 | translation: "Sljedeća stranica" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 minuta" 10 | other: "{{ .Count }} minute" 11 | 12 | - id: words 13 | translation: 14 | one : "riječ" 15 | other: "{{ .Count }} riječi" 16 | 17 | - id: toc 18 | translation: "Tablica Sadržaja" 19 | 20 | - id: translations 21 | translation: "Prijevodi" 22 | 23 | - id: home 24 | translation: "Početna stranica" 25 | 26 | - id: edit_post 27 | translation: "Promjeni" 28 | 29 | - id: code_copy 30 | translation: "kopiraj" 31 | 32 | - id: code_copied 33 | translation: "kopirano!" 34 | -------------------------------------------------------------------------------- /i18n/hu.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Előző oldal" 3 | 4 | - id: next_page 5 | translation: "Következő oldal" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 perc" 10 | other: "{{ .Count }} perc" 11 | 12 | - id: toc 13 | translation: "Tartalomjegyzék" 14 | 15 | - id: translations 16 | translation: "Fordítások" 17 | -------------------------------------------------------------------------------- /i18n/id.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Sebelumnya" 3 | 4 | - id: next_page 5 | translation: "Selanjutnya" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 menit" 10 | other: "{{ .Count }} menit" 11 | 12 | - id: words 13 | translation: 14 | one : "kata" 15 | other: "{{ .Count }} kata" 16 | 17 | - id: toc 18 | translation: "Daftar isi" 19 | 20 | - id: translations 21 | translation: "Terjemahan" 22 | 23 | - id: home 24 | translation: "Beranda" 25 | 26 | - id: edit_post 27 | translation: "Sunting" 28 | 29 | - id: code_copy 30 | translation: "salin" 31 | 32 | - id: code_copied 33 | translation: "disalin!" -------------------------------------------------------------------------------- /i18n/it.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Precedente" 3 | 4 | - id: next_page 5 | translation: "Successivo" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 minuto" 10 | other: "{{ .Count }} minuti" 11 | 12 | - id: words 13 | translation: 14 | one : "parola" 15 | other: "{{ .Count }} parole" 16 | 17 | - id: toc 18 | translation: "Indice contenuti" 19 | 20 | - id: translations 21 | translation: "Traduzioni" 22 | 23 | - id: home 24 | translation: "Home" 25 | 26 | - id: edit_post 27 | translation: "Modifica" 28 | 29 | - id: code_copy 30 | translation: "copia" 31 | 32 | - id: code_copied 33 | translation: "copiato!" 34 | -------------------------------------------------------------------------------- /i18n/ja.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "前へ" 3 | 4 | - id: next_page 5 | translation: "次へ" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 分" 10 | other: "{{ .Count }} 分" 11 | 12 | - id: words 13 | translation: 14 | one: "文字" 15 | other: "{{ .Count }} 文字" 16 | 17 | - id: toc 18 | translation: "目次" 19 | 20 | - id: translations 21 | translation: "言語" 22 | 23 | - id: home 24 | translation: "ホーム" 25 | 26 | - id: edit_post 27 | translation: "編集" 28 | 29 | - id: code_copy 30 | translation: "コピー" 31 | 32 | - id: code_copied 33 | translation: "コピーされました!" 34 | -------------------------------------------------------------------------------- /i18n/ko.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "이전 페이지" 3 | 4 | - id: next_page 5 | translation: "다음 페이지" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 분" 10 | other: "{{ .Count }} 분" 11 | 12 | - id: words 13 | translation: 14 | one : "단어" 15 | other: "{{ .Count }} 단어" 16 | 17 | - id: toc 18 | translation: "목차" 19 | 20 | - id: translations 21 | translation: "번역" 22 | 23 | - id: home 24 | translation: "홈" 25 | 26 | - id: edit_post 27 | translation: "편집" 28 | 29 | - id: code_copy 30 | translation: "복사" 31 | 32 | - id: code_copied 33 | translation: "복사 완료!" 34 | -------------------------------------------------------------------------------- /i18n/ku.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Rûpela Paş" 3 | 4 | - id: next_page 5 | translation: "Rûpela Pêş" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 xulek" 10 | other: "{{ .Count }} xulek" 11 | 12 | - id: toc 13 | translation: "Pêrist" 14 | 15 | - id: translations 16 | translation: "Wergeran" 17 | 18 | - id: home 19 | translation: "Xanî" 20 | 21 | - id: code_copy 22 | translation: "Jê bigire" 23 | 24 | - id: code_copied 25 | translation: "Hat jêgirtin!" 26 | -------------------------------------------------------------------------------- /i18n/mn.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Ѳмнѳх" 3 | 4 | - id: next_page 5 | translation: "Дараах" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 МИН" 10 | other: "{{ .Count }} МИН" 11 | 12 | - id: toc 13 | translation: "Агуулга" 14 | 15 | - id: translations 16 | translation: "Орчуулга" 17 | 18 | - id: home 19 | translation: "Нүүр" 20 | 21 | - id: code_copy 22 | translation: "хуулах" 23 | 24 | - id: code_copied 25 | translation: "хуулсан!" 26 | -------------------------------------------------------------------------------- /i18n/ms.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Halaman Sebelumnya" 3 | 4 | - id: next_page 5 | translation: "Halaman Seterusnya" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 minit" 10 | other: "{{ .Count }} minit" 11 | 12 | - id: toc 13 | translation: "Isi Kandungan" 14 | 15 | - id: translations 16 | translation: "Terjemahan" 17 | 18 | - id: home 19 | translation: "Home" 20 | 21 | - id: edit_post 22 | translation: "Sunting" 23 | 24 | - id: code_copy 25 | translation: "Salin" 26 | 27 | - id: code_copied 28 | translation: "Disalin!" 29 | -------------------------------------------------------------------------------- /i18n/nl.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Vorige" 3 | 4 | - id: next_page 5 | translation: "Volgende" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "woord" 15 | other: "{{ .Count }} woorden" 16 | 17 | - id: toc 18 | translation: "Inhoudsopgave" 19 | 20 | - id: translations 21 | translation: "Vertalingen" 22 | 23 | - id: home 24 | translation: "Startpagina" 25 | 26 | - id: edit_post 27 | translation: "Bewerk" 28 | 29 | - id: code_copy 30 | translation: "kopieer" 31 | 32 | - id: code_copied 33 | translation: "gekopieerd!" 34 | -------------------------------------------------------------------------------- /i18n/no.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Forrige Side" 3 | 4 | - id: next_page 5 | translation: "Neste Side" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one: "ord" 15 | other: "{{ .Count }} ord" 16 | 17 | - id: toc 18 | translation: "Innholdsfortegnelse" 19 | 20 | - id: translations 21 | translation: "Oversettelser" 22 | 23 | - id: home 24 | translation: "Hjem" 25 | 26 | - id: edit_post 27 | translation: "Rediger" 28 | 29 | - id: code_copy 30 | translation: "Kopier" 31 | 32 | - id: code_copied 33 | translation: "Kopiert!" 34 | -------------------------------------------------------------------------------- /i18n/oc.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Prec." 3 | 4 | - id: next_page 5 | translation: "Seg." 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "mot" 15 | other: "{{ .Count }} motss" 16 | 17 | - id: toc 18 | translation: "Taula de contengut" 19 | 20 | - id: translations 21 | translation: "Traduccions" 22 | 23 | - id: home 24 | translation: "Acuèlh" 25 | 26 | - id: edit_post 27 | translation: "Modificar" 28 | 29 | - id: code_copy 30 | translation: "copiar" 31 | 32 | - id: code_copied 33 | translation: "copiat !" 34 | -------------------------------------------------------------------------------- /i18n/pa.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "ਪਿਛਲਾ" 3 | 4 | - id: next_page 5 | translation: "ਅਗਲਾ" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 ਮਿੰਟ" 10 | other: "{{ .Count }} ਮਿੰਟ" 11 | 12 | - id: words 13 | translation: 14 | one: "ਸ਼ਬਦ" 15 | other: "{{ .Count }} ਸ਼ਬਦ" 16 | 17 | - id: toc 18 | translation: "ਤਤਕਰਾ" 19 | 20 | - id: translations 21 | translation: "ਅਨੁਵਾਦ" 22 | 23 | - id: home 24 | translation: "ਘਰ" 25 | 26 | - id: edit_post 27 | translation: "ਸੋਧ" 28 | 29 | - id: code_copy 30 | translation: "ਕਾਪੀ" 31 | 32 | - id: code_copied 33 | translation: "ਕਾਪੀ ਕੀਤੀ ਗਈ!!" 34 | -------------------------------------------------------------------------------- /i18n/pl.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Poprzednia" 3 | 4 | - id: next_page 5 | translation: "Następna" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "słowo" 15 | other: "{{ .Count }} słów" 16 | 17 | - id: toc 18 | translation: "Spis treści" 19 | 20 | - id: translations 21 | translation: "Tłumaczenia" 22 | 23 | - id: home 24 | translation: "Strona Główna" 25 | 26 | - id: edit_post 27 | translation: "Edytuj" 28 | 29 | - id: code_copy 30 | translation: "Kopiuj" 31 | 32 | - id: code_copied 33 | translation: "Skopiowano!" 34 | -------------------------------------------------------------------------------- /i18n/pnb.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "پِچھلا" 3 | 4 | - id: next_page 5 | translation: "اگلا" 6 | 7 | - id: read_time 8 | translation: 9 | one: "ایک منٹ" 10 | other: "مِنٹ {{ .Count }}" 11 | 12 | - id: words 13 | translation: 14 | one: "لفظ" 15 | other: "لفظ {{ .Count }}" 16 | 17 | - id: toc 18 | translation: "تتکرا" 19 | 20 | - id: translations 21 | translation: "انوواد" 22 | 23 | - id: home 24 | translation: "گھر" 25 | 26 | - id: edit_post 27 | translation: "سودھ" 28 | 29 | - id: code_copy 30 | translation: "کاپی" 31 | 32 | - id: code_copied 33 | translation: "کاپی کیتی گئی!" 34 | -------------------------------------------------------------------------------- /i18n/pt.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Página Anterior" 3 | 4 | - id: next_page 5 | translation: "Próxima Página" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 minuto" 10 | other: "{{ .Count }} minutos" 11 | 12 | - id: words 13 | translation: 14 | one : "palavra" 15 | other: "{{ .Count }} palavras" 16 | 17 | - id: toc 18 | translation: "Conteúdo" 19 | 20 | - id: translations 21 | translation: "Traduções" 22 | 23 | - id: home 24 | translation: "Início" 25 | 26 | - id: edit_post 27 | translation: "Editar" 28 | 29 | - id: code_copy 30 | translation: "copiar" 31 | 32 | - id: code_copied 33 | translation: "copiado!" 34 | -------------------------------------------------------------------------------- /i18n/ro.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Înapoi" 3 | 4 | - id: next_page 5 | translation: "Înainte" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 minut" 10 | other: "{{ .Count }} minute" 11 | 12 | - id: words 13 | translation: 14 | one : "cuvânt" 15 | other: "{{ .Count }} cuvinte" 16 | 17 | - id: toc 18 | translation: "Sumar" 19 | 20 | - id: translations 21 | translation: "Traduceri" 22 | 23 | - id: home 24 | translation: "Acasă" 25 | 26 | - id: edit_post 27 | translation: "Editează" 28 | 29 | - id: code_copy 30 | translation: "copiază" 31 | 32 | - id: code_copied 33 | translation: "copiat!" 34 | -------------------------------------------------------------------------------- /i18n/ru.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Предыдущая" 3 | 4 | - id: next_page 5 | translation: "Следующая" 6 | 7 | - id: read_time 8 | translation: 9 | zero: "0 минут" 10 | one: "1 минута" 11 | few: "{{ .Count }} минуты" 12 | many: "{{ .Count }} минут" 13 | other: "{{ .Count }} минута" 14 | 15 | - id: words 16 | translation: 17 | zero: "0 слов" 18 | one: "1 слово" 19 | few: "{{ .Count }} слова" 20 | many: "{{ .Count }} слов" 21 | other: "{{ .Count }} слово" 22 | 23 | - id: toc 24 | translation: "Оглавление" 25 | 26 | - id: translations 27 | translation: "Переводы" 28 | 29 | - id: home 30 | translation: "Главная" 31 | 32 | - id: edit_post 33 | translation: "Редактировать" 34 | 35 | - id: code_copy 36 | translation: "копировать" 37 | 38 | - id: code_copied 39 | translation: "скопировано!" -------------------------------------------------------------------------------- /i18n/sk.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Predch" 3 | 4 | - id: next_page 5 | translation: "Ďaľší" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: words 13 | translation: 14 | one : "slovo" 15 | other: "{{ .Count }} slov" 16 | 17 | - id: toc 18 | translation: "Obsah" 19 | 20 | - id: translations 21 | translation: "Preklady" 22 | 23 | - id: home 24 | translation: "Domov" 25 | 26 | - id: edit_post 27 | translation: "Upraviť" 28 | 29 | - id: code_copy 30 | translation: "kopírovať" 31 | 32 | - id: code_copied 33 | translation: "skopírované!" 34 | -------------------------------------------------------------------------------- /i18n/sv.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Förra Sidan" 3 | 4 | - id: next_page 5 | translation: "Nästa Sida" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Innehållsförteckning" 14 | 15 | - id: translations 16 | translation: "Översättningar" 17 | 18 | - id: home 19 | translation: "Hem" 20 | 21 | - id: edit_post 22 | translation: "Redigera" 23 | 24 | - id: code_copy 25 | translation: "kopiera" 26 | 27 | - id: code_copied 28 | translation: "kopierad!" 29 | -------------------------------------------------------------------------------- /i18n/sw.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Uliopita" 3 | 4 | - id: next_page 5 | translation: "Ujao" 6 | 7 | - id: read_time 8 | translation: 9 | one : "dakika 1" 10 | other: "dakika {{ .Count }}" 11 | 12 | - id: words 13 | translation: 14 | one : "neno" 15 | other: "maneno {{ .Count }}" 16 | 17 | - id: toc 18 | translation: "Jedwali la Yaliyomo" 19 | 20 | - id: translations 21 | translation: "Tafsiri" 22 | 23 | - id: home 24 | translation: "Mwanzo" 25 | 26 | - id: edit_post 27 | translation: "Hariri" 28 | 29 | - id: code_copy 30 | translation: "nakili" 31 | 32 | - id: code_copied 33 | translation: "nakiliwa!" 34 | -------------------------------------------------------------------------------- /i18n/th.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "ก่อนหน้า" 3 | 4 | - id: next_page 5 | translation: "ถัดไป" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 นาที" 10 | other: "{{ .Count }} นาที" 11 | 12 | - id: words 13 | translation: 14 | one : "คำ" 15 | other: "{{ .Count }} คำ" 16 | 17 | - id: toc 18 | translation: "สารบัญ" 19 | 20 | - id: translations 21 | translation: "การแปล" 22 | 23 | - id: home 24 | translation: "หน้าหลัก" 25 | 26 | - id: edit_post 27 | translation: "แก้ไข" 28 | 29 | - id: code_copy 30 | translation: "คัดลอก" 31 | 32 | - id: code_copied 33 | translation: "คัดลอกแล้ว!" 34 | -------------------------------------------------------------------------------- /i18n/tr.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Önceki" 3 | 4 | - id: next_page 5 | translation: "Sonraki" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 dk" 10 | other: "{{ .Count }} dk" 11 | 12 | - id: words 13 | translation: 14 | one : "sözcük" 15 | other: "{{ .Count }} sözcük" 16 | 17 | - id: toc 18 | translation: "İçindekiler" 19 | 20 | - id: translations 21 | translation: "Çeviriler" 22 | 23 | - id: home 24 | translation: "Ana Sayfa" 25 | 26 | - id: edit_post 27 | translation: "Düzenle" 28 | 29 | - id: code_copy 30 | translation: "Kopyala" 31 | 32 | - id: code_copied 33 | translation: "Kopyalandı!" 34 | -------------------------------------------------------------------------------- /i18n/uk.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Попередня" 3 | 4 | - id: next_page 5 | translation: "Наступна" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 хвилина" 10 | other: "{{ .Count }} хвилин" 11 | 12 | - id: toc 13 | translation: "Зміст" 14 | 15 | - id: translations 16 | translation: "Переклади" 17 | 18 | - id: home 19 | translation: "Головна" 20 | 21 | - id: code_copy 22 | translation: "копіювати" 23 | 24 | - id: code_copied 25 | translation: "скопійовано!" -------------------------------------------------------------------------------- /i18n/uz.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Oldingi sahifa" 3 | 4 | - id: next_page 5 | translation: "Keyingi sahifa" 6 | 7 | - id: read_time 8 | translation: 9 | one : "Bir daqiqa" 10 | other: "{{ .Count }} daqiqa" 11 | 12 | - id: toc 13 | translation: "Mundarija" 14 | 15 | - id: translations 16 | translation: "Tarjimalar" 17 | 18 | - id: home 19 | translation: "Bosh sahifa" 20 | 21 | -------------------------------------------------------------------------------- /i18n/vi.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Trang trước" 3 | 4 | - id: next_page 5 | translation: "Trang tiếp theo" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 phút" 10 | other: "{{ .Count }} phút" 11 | 12 | - id: words 13 | translation: 14 | one: "từ" 15 | other: "{{ .Count }} từ" 16 | 17 | - id: toc 18 | translation: "Mục lục" 19 | 20 | - id: translations 21 | translation: "Bản dịch" 22 | 23 | - id: home 24 | translation: "Trang chủ" 25 | 26 | - id: edit_post 27 | translation: "Chỉnh sửa" 28 | 29 | - id: code_copy 30 | translation: "Sao chép" 31 | 32 | - id: code_copied 33 | translation: "Đã sao chép!" 34 | -------------------------------------------------------------------------------- /i18n/zh-tw.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "上一頁" 3 | 4 | - id: next_page 5 | translation: "下一頁" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 分鐘" 10 | other: "{{ .Count }} 分鐘" 11 | 12 | - id: words 13 | translation: 14 | one: "字" 15 | other: "{{ .Count }} 字" 16 | 17 | - id: toc 18 | translation: "目錄" 19 | 20 | - id: translations 21 | translation: "語言" 22 | 23 | - id: home 24 | translation: "首頁" 25 | 26 | - id: edit_post 27 | translation: "編輯" 28 | 29 | - id: code_copy 30 | translation: "複製" 31 | 32 | - id: code_copied 33 | translation: "已複製!" 34 | -------------------------------------------------------------------------------- /i18n/zh.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "上一页" 3 | 4 | - id: next_page 5 | translation: "下一页" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 分钟" 10 | other: "{{ .Count }} 分钟" 11 | 12 | - id: words 13 | translation: 14 | one: "字" 15 | other: "{{ .Count }} 字" 16 | 17 | - id: toc 18 | translation: "目录" 19 | 20 | - id: translations 21 | translation: "语言" 22 | 23 | - id: home 24 | translation: "主页" 25 | 26 | - id: edit_post 27 | translation: "编辑" 28 | 29 | - id: code_copy 30 | translation: "复制" 31 | 32 | - id: code_copied 33 | translation: "已复制!" 34 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/5a4651783fa9159123d947bd3511b355146d4797/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/5a4651783fa9159123d947bd3511b355146d4797/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 |
    404
    3 | {{- end }}{{/* end main */ -}} 4 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{- $u := urls.Parse .Destination -}} 2 | {{- $src := $u.String -}} 3 | {{- if not $u.IsAbs -}} 4 | {{- $path := strings.TrimPrefix "./" $u.Path }} 5 | {{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}} 6 | {{- $src = .RelPermalink -}} 7 | {{- with $u.RawQuery -}} 8 | {{- $src = printf "%s?%s" $src . -}} 9 | {{- end -}} 10 | {{- with $u.Fragment -}} 11 | {{- $src = printf "%s#%s" $src . -}} 12 | {{- end -}} 13 | {{- end -}} 14 | {{- end -}} 15 | {{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape) "loading" "lazy") -}} 16 | 22 | {{- /**/ -}} 23 | -------------------------------------------------------------------------------- /layouts/_default/archives.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 |
    29 | 30 | {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} 31 | 32 | {{- if site.Params.ShowAllPagesInArchive }} 33 | {{- $pages = site.RegularPages }} 34 | {{- end }} 35 | 36 | {{- range $pages.GroupByPublishDate "2006" }} 37 | {{- if ne .Key "0001" }} 38 |
    39 | {{- $year := replace .Key "0001" "" }} 40 |

    41 | 42 | {{- $year -}} 43 | 44 |  {{ len .Pages }} 45 |

    46 | {{- range .Pages.GroupByDate "January" }} 47 |
    48 |

    49 | 50 | {{- .Key -}} 51 | 52 |  {{ len .Pages }} 53 |

    54 |
    55 | {{- range .Pages }} 56 | {{- if eq .Kind "page" }} 57 |
    58 |

    59 | {{- .Title | markdownify }} 60 | {{- if .Draft }} 61 | 62 | 63 | 65 | 66 | 67 | {{- end }} 68 |

    69 |
    70 | {{- partial "post_meta.html" . -}} 71 |
    72 | 73 |
    74 | {{- end }} 75 | {{- end }} 76 |
    77 |
    78 | {{- end }} 79 |
    80 | {{- end }} 81 | {{- end }} 82 | 83 | {{- end }}{{/* end main */}} 84 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | {{- if lt hugo.Version "0.146.0" }} 2 | {{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }} 3 | {{- end -}} 4 | 5 | 6 | 7 | 8 | 9 | {{- partial "head.html" . }} 10 | 11 | 12 | 20 | {{- partialCached "header.html" . .Page -}} 21 |
    22 | {{- block "main" . }}{{ end }} 23 |
    24 | {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /layouts/_default/index.json: -------------------------------------------------------------------------------- 1 | {{- $.Scratch.Add "index" slice -}} 2 | {{- range site.RegularPages -}} 3 | {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} 4 | {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} 5 | {{- end }} 6 | {{- end -}} 7 | {{- $.Scratch.Get "index" | jsonify -}} 8 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | {{- if (and site.Params.profileMode.enabled .IsHome) }} 4 | {{- partial "index_profile.html" . }} 5 | {{- else }} {{/* if not profileMode */}} 6 | 7 | {{- if not .IsHome | and .Title }} 8 | 31 | {{- end }} 32 | 33 | {{- if .Content }} 34 |
    35 | {{- if not (.Param "disableAnchoredHeadings") }} 36 | {{- partial "anchored_headings.html" .Content -}} 37 | {{- else }}{{ .Content }}{{ end }} 38 |
    39 | {{- end }} 40 | 41 | {{- $pages := union .RegularPages .Sections }} 42 | 43 | {{- if .IsHome }} 44 | {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} 45 | {{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} 46 | {{- end }} 47 | 48 | {{- $paginator := .Paginate $pages }} 49 | 50 | {{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} 51 | {{- partial "home_info.html" . }} 52 | {{- end }} 53 | 54 | {{- $term := .Data.Term }} 55 | {{- range $index, $page := $paginator.Pages }} 56 | 57 | {{- $class := "post-entry" }} 58 | 59 | {{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} 60 | {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} 61 | {{- $class = "first-entry" }} 62 | {{- else if $term }} 63 | {{- $class = "post-entry tag-entry" }} 64 | {{- end }} 65 | 66 |
    67 | {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} 68 | {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }} 69 |
    70 |

    71 | {{- .Title }} 72 | {{- if .Draft }} 73 | 74 | 75 | 77 | 78 | 79 | {{- end }} 80 |

    81 |
    82 | {{- if (ne (.Param "hideSummary") true) }} 83 |
    84 |

    {{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

    85 |
    86 | {{- end }} 87 | {{- if not (.Param "hideMeta") }} 88 |
    89 | {{- partial "post_meta.html" . -}} 90 |
    91 | {{- end }} 92 | 93 |
    94 | {{- end }} 95 | 96 | {{- if gt $paginator.TotalPages 1 }} 97 | 117 | {{- end }} 118 | 119 | {{- end }}{{/* end profileMode */}} 120 | 121 | {{- end }}{{- /* end main */ -}} 122 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | {{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} 2 | {{- $authorEmail := "" }} 3 | {{- with site.Params.author }} 4 | {{- if reflect.IsMap . }} 5 | {{- with .email }} 6 | {{- $authorEmail = . }} 7 | {{- end }} 8 | {{- end }} 9 | {{- else }} 10 | {{- with site.Author.email }} 11 | {{- $authorEmail = . }} 12 | {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} 13 | {{- end }} 14 | {{- end }} 15 | 16 | {{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} 17 | {{- $authorName := "" }} 18 | {{- with site.Params.author }} 19 | {{- if reflect.IsMap . }} 20 | {{- with .name }} 21 | {{- $authorName = . }} 22 | {{- end }} 23 | {{- else }} 24 | {{- $authorName = . }} 25 | {{- end }} 26 | {{- else }} 27 | {{- with site.Author.name }} 28 | {{- $authorName = . }} 29 | {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} 30 | {{- end }} 31 | {{- end }} 32 | 33 | {{- $pctx := . }} 34 | {{- if .IsHome }}{{ $pctx = site }}{{ end }} 35 | {{- $pages := slice }} 36 | {{- if or $.IsHome $.IsSection }} 37 | {{- $pages = $pctx.RegularPages }} 38 | {{- else }} 39 | {{- $pages = $pctx.Pages }} 40 | {{- end }} 41 | {{- $limit := site.Config.Services.RSS.Limit }} 42 | {{- if ge $limit 1 }} 43 | {{- $pages = $pages | first $limit }} 44 | {{- end }} 45 | {{- printf "" | safeHTML }} 46 | 47 | 48 | {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} 49 | {{ .Permalink }} 50 | Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} 51 | {{- with site.Params.images }} 52 | 53 | {{ site.Title }} 54 | {{ index . 0 | absURL }} 55 | {{ index . 0 | absURL }} 56 | 57 | {{- end }} 58 | Hugo -- {{ hugo.Version }} 59 | {{ site.Language.LanguageCode }}{{ with $authorEmail }} 60 | {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} 61 | {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} 62 | {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ end }}{{ if not .Date.IsZero }} 63 | {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 64 | {{- with .OutputFormats.Get "RSS" }} 65 | {{ printf "" .Permalink .MediaType | safeHTML }} 66 | {{- end }} 67 | {{- range $pages }} 68 | {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} 69 | 70 | {{ .Title }} 71 | {{ .Permalink }} 72 | {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 73 | {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} 74 | {{ .Permalink }} 75 | {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} 76 | {{- if and site.Params.ShowFullTextinRSS .Content }} 77 | {{ (printf "" .Content) | safeHTML }} 78 | {{- end }} 79 | 80 | {{- end }} 81 | {{- end }} 82 | 83 | 84 | -------------------------------------------------------------------------------- /layouts/_default/search.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | 22 | 23 | 28 | 29 | {{- end }}{{/* end main */}} 30 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 |
    4 |
    5 | {{ partial "breadcrumbs.html" . }} 6 |

    7 | {{ .Title }} 8 | {{- if .Draft }} 9 | 10 | 11 | 13 | 14 | 15 | {{- end }} 16 |

    17 | {{- if .Description }} 18 |
    19 | {{ .Description }} 20 |
    21 | {{- end }} 22 | {{- if not (.Param "hideMeta") }} 23 | 29 | {{- end }} 30 |
    31 | {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} 32 | {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }} 33 | {{- if (.Param "ShowToc") }} 34 | {{- partial "toc.html" . }} 35 | {{- end }} 36 | 37 | {{- if .Content }} 38 |
    39 | {{- if not (.Param "disableAnchoredHeadings") }} 40 | {{- partial "anchored_headings.html" .Content -}} 41 | {{- else }}{{ .Content }}{{ end }} 42 |
    43 | {{- end }} 44 | 45 |
    46 | {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} 47 | 52 | {{- if (.Param "ShowPostNavLinks") }} 53 | {{- partial "post_nav_links.html" . }} 54 | {{- end }} 55 | {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} 56 | {{- partial "share_icons.html" . -}} 57 | {{- end }} 58 |
    59 | 60 | {{- if (.Param "comments") }} 61 | {{- partial "comments.html" . }} 62 | {{- end }} 63 |
    64 | 65 | {{- end }}{{/* end main */}} 66 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | {{- if .Title }} 4 | 12 | {{- end }} 13 | 14 |
      15 | {{- $type := .Type }} 16 | {{- range $key, $value := .Data.Terms.Alphabetical }} 17 | {{- $name := .Name }} 18 | {{- $count := .Count }} 19 | {{- with site.GetPage (printf "/%s/%s" $type $name) }} 20 |
    • 21 | {{ .Name }} {{ $count }} 22 |
    • 23 | {{- end }} 24 | {{- end }} 25 |
    26 | 27 | {{- end }}{{/* end main */ -}} 28 | -------------------------------------------------------------------------------- /layouts/partials/anchored_headings.html: -------------------------------------------------------------------------------- 1 | {{- /* formats .Content headings by adding an anchor */ -}} 2 | {{ . | replaceRE "()" "${1}${3}" | safeHTML }} 3 | -------------------------------------------------------------------------------- /layouts/partials/author.html: -------------------------------------------------------------------------------- 1 | {{- if or .Params.author site.Params.author }} 2 | {{- $author := (.Params.author | default site.Params.author) }} 3 | {{- $author_type := (printf "%T" $author) }} 4 | {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} 5 | {{- (delimit $author ", " ) }} 6 | {{- else }} 7 | {{- $author }} 8 | {{- end }} 9 | {{- end -}} 10 | -------------------------------------------------------------------------------- /layouts/partials/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {{- if (.Param "ShowBreadCrumbs") -}} 2 | 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /layouts/partials/comments.html: -------------------------------------------------------------------------------- 1 | {{- /* Comments area start */ -}} 2 | {{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} 3 | {{- /* Comments area end */ -}} 4 | -------------------------------------------------------------------------------- /layouts/partials/cover.html: -------------------------------------------------------------------------------- 1 | {{- with .cxt}} {{/* Apply proper context from dict */}} 2 | {{- if (and .Params.cover.image (not $.isHidden)) }} 3 |
    4 | {{- $loading := cond $.IsSingle "eager" "lazy" }} 5 | {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} 6 | {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} 7 | {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} 8 | {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} 9 | 10 | {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} 11 | {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} 12 | {{- $cover := (or $pageBundleCover $globalResourcesCover)}} 13 | {{- /* We are not using the .Param.cover.relative to decide the location of image */}} 14 | {{- /* If we have the image in pageBundle or globalResources we can process the image */}} 15 | 16 | {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} 17 | {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} 18 | {{- if hugo.IsExtended -}} 19 | {{- $processableFormats = $processableFormats | append "webp" -}} 20 | {{- end -}} 21 | 22 | {{- $imgdl := (.Params.cover.image) | absURL }} 23 | {{- if $cover -}} 24 | {{- $imgdl = $cover.Permalink }} 25 | {{- end -}} 26 | 27 | {{- if $addLink }} 28 | 29 | {{- end }} 30 | 31 | {{- if $cover -}} 32 | {{/* i.e it is present in page bundle */}} 33 | {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} 34 | {{ $alt }} 45 | {{- else }}{{/* Unprocessable image or responsive images disabled */}} 46 | {{ $alt }} 47 | {{- end }} 48 | {{- else }} 49 | {{- /* For absolute urls and external links, no img processing here */}} 50 | {{ $alt }} 51 | {{- end }} 52 | 53 | {{- if $addLink }} 54 | 55 | {{- end -}} 56 | 57 | {{- /* Display Caption */}} 58 | {{- if $.IsSingle }} 59 | {{ with .Params.cover.caption -}} 60 |
    {{ . | markdownify }}
    61 | {{- end }} 62 | {{- end }} 63 |
    64 | {{- end }}{{/* End image */}} 65 | {{- end -}}{{/* End context */ -}} 66 | -------------------------------------------------------------------------------- /layouts/partials/edit_post.html: -------------------------------------------------------------------------------- 1 | {{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}} 2 | {{- $fileUrlPath := path.Join .File.Path }} 3 | 4 | {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} 5 | 6 | {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} 7 | 8 | {{- end }} 9 | -------------------------------------------------------------------------------- /layouts/partials/extend_footer.html: -------------------------------------------------------------------------------- 1 | {{- /* Footer custom content area start */ -}} 2 | {{- /* Insert any custom code web-analytics, resources, etc. here */ -}} 3 | {{- /* Footer custom content area end */ -}} 4 | -------------------------------------------------------------------------------- /layouts/partials/extend_head.html: -------------------------------------------------------------------------------- 1 | {{- /* Head custom content area start */ -}} 2 | {{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}} 3 | {{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} 4 | {{- /* Head custom content area end */ -}} 5 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{- if not (.Param "hideFooter") }} 2 |
    3 | {{- if not site.Params.footer.hideCopyright }} 4 | {{- if site.Copyright }} 5 | {{ site.Copyright | markdownify }} 6 | {{- else }} 7 | © {{ now.Year }} {{ site.Title }} 8 | {{- end }} 9 | {{- print " · "}} 10 | {{- end }} 11 | 12 | {{- with site.Params.footer.text }} 13 | {{ . | markdownify }} 14 | {{- print " · "}} 15 | {{- end }} 16 | 17 | 18 | Powered by 19 | Hugo & 20 | PaperMod 21 | 22 |
    23 | {{- end }} 24 | 25 | {{- if (not site.Params.disableScrollToTop) }} 26 | 27 | 28 | 29 | 30 | 31 | {{- end }} 32 | 33 | {{- partial "extend_footer.html" . }} 34 | 35 | 64 | 65 | {{- if (not site.Params.disableScrollToTop) }} 66 | 79 | {{- end }} 80 | 81 | {{- if (not site.Params.disableThemeToggle) }} 82 | 94 | {{- end }} 95 | 96 | {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} 97 | 144 | {{- end }} 145 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} 5 | 6 | {{- else }} 7 | 8 | {{- end }} 9 | 10 | {{- /* Title */}} 11 | {{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} 12 | 13 | {{- /* Meta */}} 14 | {{- if .IsHome }} 15 | {{ with site.Params.keywords -}}{{ end }} 16 | {{- else }} 17 | 20 | {{- end }} 21 | 24 | 25 | 26 | {{- if site.Params.analytics.google.SiteVerificationTag }} 27 | 28 | {{- end }} 29 | {{- if site.Params.analytics.yandex.SiteVerificationTag }} 30 | 31 | {{- end }} 32 | {{- if site.Params.analytics.bing.SiteVerificationTag }} 33 | 34 | {{- end }} 35 | {{- if site.Params.analytics.naver.SiteVerificationTag }} 36 | 37 | {{- end }} 38 | 39 | {{- /* Styles */}} 40 | 41 | {{- /* includes */}} 42 | {{- $includes := slice }} 43 | {{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}} 44 | 45 | {{- if not (eq site.Params.assets.disableScrollBarStyle true) }} 46 | {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }} 47 | {{- $includes = (append $ScrollStyle $includes) }} 48 | {{- end }} 49 | 50 | {{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }} 51 | 52 | {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} 53 | {{- $reset := (resources.Get "css/core/reset.css") }} 54 | {{- $media := (resources.Get "css/core/zmedia.css") }} 55 | {{- $license_css := (resources.Get "css/core/license.css") }} 56 | {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} 57 | 58 | {{- /* markup.highlight.noClasses should be set to `false` */}} 59 | {{- $chroma_styles := (resources.Get "css/includes/chroma-styles.css") }} 60 | {{- $chroma_mod := (resources.Get "css/includes/chroma-mod.css") }} 61 | 62 | {{- /* order is important */}} 63 | {{- $core := (slice $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} 64 | {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} 65 | 66 | {{- /* bundle all required css */}} 67 | {{- /* Add extended css after theme style */ -}} 68 | {{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} 69 | 70 | {{- if not site.Params.assets.disableFingerprinting }} 71 | {{- $stylesheet := $stylesheet | fingerprint }} 72 | 73 | {{- else }} 74 | 75 | {{- end }} 76 | 77 | {{- /* Search */}} 78 | {{- if (eq .Layout `search`) -}} 79 | 80 | {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} 81 | {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} 82 | {{- $license_js := resources.Get "js/license.js" }} 83 | {{- if not site.Params.assets.disableFingerprinting }} 84 | {{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} 85 | 86 | {{- else }} 87 | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} 88 | 89 | {{- end }} 90 | {{- end -}} 91 | 92 | {{- /* Favicons */}} 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | {{- /* RSS */}} 102 | {{ range .AlternativeOutputFormats -}} 103 | 104 | {{ end -}} 105 | {{- range .AllTranslations -}} 106 | 107 | {{ end -}} 108 | 109 | 148 | 149 | {{- partial "extend_head.html" . -}} 150 | 151 | {{- /* Misc */}} 152 | {{- if hugo.IsProduction | or (eq site.Params.env "production") }} 153 | {{- partial "google_analytics.html" . }} 154 | {{- partial "templates/opengraph.html" . }} 155 | {{- partial "templates/twitter_cards.html" . }} 156 | {{- partial "templates/schema_json.html" . }} 157 | {{- end -}} 158 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | {{- /* theme-toggle is enabled */}} 2 | {{- if (not site.Params.disableThemeToggle) }} 3 | {{- /* theme is light */}} 4 | {{- if (eq site.Params.defaultTheme "light") }} 5 | 11 | {{- /* theme is dark */}} 12 | {{- else if (eq site.Params.defaultTheme "dark") }} 13 | 19 | {{- else }} 20 | {{- /* theme is auto */}} 21 | 31 | {{- end }} 32 | {{- /* theme-toggle is disabled and theme is auto */}} 33 | {{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} 34 | 40 | {{- end }} 41 | 42 |
    43 | 149 |
    150 | -------------------------------------------------------------------------------- /layouts/partials/home_info.html: -------------------------------------------------------------------------------- 1 | {{- with site.Params.homeInfoParams }} 2 |
    3 |
    4 |

    {{ .Title | markdownify }}

    5 |
    6 |
    7 | {{ .Content | markdownify }} 8 |
    9 |
    10 | {{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} 11 |
    12 |
    13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /layouts/partials/index_profile.html: -------------------------------------------------------------------------------- 1 |
    2 | {{- with site.Params.profileMode }} 3 |
    4 | {{- if .imageUrl -}} 5 | {{- $img := "" }} 6 | {{- if not (urls.Parse .imageUrl).IsAbs }} 7 | {{- $img = resources.Get .imageUrl }} 8 | {{- end }} 9 | {{- if $img }} 10 | {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} 11 | {{- if hugo.IsExtended -}} 12 | {{- $processableFormats = $processableFormats | append "webp" -}} 13 | {{- end -}} 14 | {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} 15 | {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} 16 | {{- if (not (and (not .imageHeight) (not .imageWidth))) }} 17 | {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} 18 | {{- else if .imageHeight }} 19 | {{- $img = $img.Resize (printf "x%d" .imageHeight) }} 20 | {{ else if .imageWidth }} 21 | {{- $img = $img.Resize (printf "%dx" .imageWidth) }} 22 | {{ else }} 23 | {{- $img = $img.Resize "150x150" }} 24 | {{- end }} 25 | {{- end }} 26 | {{ .imageTitle | default 28 | {{- else }} 29 | {{ .imageTitle | default 31 | {{- end }} 32 | {{- end }} 33 |

    {{ .title | default site.Title | markdownify }}

    34 | {{ .subtitle | markdownify }} 35 | {{- partial "social_icons.html" -}} 36 | 37 | {{- with .buttons }} 38 | 55 | {{- end }} 56 |
    57 | {{- end}} 58 |
    59 | -------------------------------------------------------------------------------- /layouts/partials/post_canonical.html: -------------------------------------------------------------------------------- 1 | {{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}} 2 | {{ $url := urls.Parse .Params.canonicalURL }} 3 | 4 | {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}} 5 | 6 | {{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}} 7 |  {{ $url.Host }} 8 | 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /layouts/partials/post_meta.html: -------------------------------------------------------------------------------- 1 | {{- $scratch := newScratch }} 2 | 3 | {{- if not .Date.IsZero -}} 4 | {{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} 5 | {{- end }} 6 | 7 | {{- if (.Param "ShowReadingTime") -}} 8 | {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} 9 | {{- end }} 10 | 11 | {{- if (.Param "ShowWordCount") -}} 12 | {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} 13 | {{- end }} 14 | 15 | {{- if not (.Param "hideAuthor") -}} 16 | {{- with (partial "author.html" .) }} 17 | {{- $scratch.Add "meta" (slice .) }} 18 | {{- end }} 19 | {{- end }} 20 | 21 | {{- with ($scratch.Get "meta") }} 22 | {{- delimit . " · " | safeHTML -}} 23 | {{- end -}} 24 | -------------------------------------------------------------------------------- /layouts/partials/post_nav_links.html: -------------------------------------------------------------------------------- 1 | {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} 2 | {{- if and (gt (len $pages) 1) (in $pages . ) }} 3 | 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /layouts/partials/share_icons.html: -------------------------------------------------------------------------------- 1 | {{- $pageurl := .Permalink }} 2 | {{- $title := .Title }} 3 | 4 | {{- $.Scratch.Set "tags" ""}} 5 | 6 | {{- with .Params.Tags }} 7 | {{- $hashtags := newScratch}} 8 | {{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} 9 | {{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} 10 | {{- end -}} 11 | 12 | {{- $custom := false }} 13 | {{- $ShareButtons := (.Param "ShareButtons")}} 14 | {{- with $ShareButtons }}{{ $custom = true }}{{ end }} 15 | 16 | 96 | -------------------------------------------------------------------------------- /layouts/partials/social_icons.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /layouts/partials/templates/_funcs/get-page-images.html: -------------------------------------------------------------------------------- 1 | {{- $imgs := slice }} 2 | {{- $imgParams := .Params.images }} 3 | {{- $resources := .Resources.ByType "image" -}} 4 | {{/* Find featured image resources if the images parameter is empty. */}} 5 | {{- if not $imgParams }} 6 | {{- $featured := $resources.GetMatch "*feature*" -}} 7 | {{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} 8 | {{- with $featured }} 9 | {{- $imgs = $imgs | append (dict 10 | "Image" . 11 | "RelPermalink" .RelPermalink 12 | "Permalink" .Permalink) }} 13 | {{- end }} 14 | {{- end }} 15 | {{/* Use the first one of site images as the fallback. */}} 16 | {{- if and (not $imgParams) (not $imgs) }} 17 | {{- with site.Params.images }} 18 | {{- $imgParams = first 1 . }} 19 | {{- end }} 20 | {{- end }} 21 | {{/* Parse page's images parameter. */}} 22 | {{- range $imgParams }} 23 | {{- $img := . }} 24 | {{- $url := urls.Parse $img }} 25 | {{- if eq $url.Scheme "" }} 26 | {{/* Internal image. */}} 27 | {{- with $resources.GetMatch $img -}} 28 | {{/* Image resource. */}} 29 | {{- $imgs = $imgs | append (dict 30 | "Image" . 31 | "RelPermalink" .RelPermalink 32 | "Permalink" .Permalink) }} 33 | {{- else }} 34 | {{- $imgs = $imgs | append (dict 35 | "RelPermalink" (relURL $img) 36 | "Permalink" (absURL $img) 37 | ) }} 38 | {{- end }} 39 | {{- else }} 40 | {{/* External image */}} 41 | {{- $imgs = $imgs | append (dict 42 | "RelPermalink" $img 43 | "Permalink" $img 44 | ) }} 45 | {{- end }} 46 | {{- end }} 47 | {{- return $imgs }} 48 | -------------------------------------------------------------------------------- /layouts/partials/templates/opengraph.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- with or site.Title site.Params.title | plainify }} 4 | 5 | {{- end }} 6 | 7 | {{- with or .Title site.Title site.Params.title | plainify }} 8 | 9 | {{- end }} 10 | 11 | {{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} 12 | 13 | {{- end }} 14 | 15 | {{- with or .Params.locale site.Language.LanguageCode site.Language.Lang }} 16 | 17 | {{- end }} 18 | 19 | {{- if .IsPage }} 20 | 21 | {{- with .Section }} 22 | 23 | {{- end }} 24 | {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} 25 | {{- with .PublishDate }} 26 | 27 | {{- end }} 28 | {{- with .Lastmod }} 29 | 30 | {{- end }} 31 | {{- range .GetTerms "tags" | first 6 }} 32 | 33 | {{- end }} 34 | {{- else }} 35 | 36 | {{- end }} 37 | 38 | {{- if .Params.cover.image -}} 39 | {{- if (ne .Params.cover.relative true) }} 40 | 41 | {{- else}} 42 | 43 | {{- end}} 44 | {{- else }} 45 | {{- with partial "_funcs/get-page-images" . }} 46 | {{- range . | first 6 }} 47 | 48 | {{- end }} 49 | {{- end }} 50 | {{- end }} 51 | 52 | {{- with .Params.audio }} 53 | {{- range . | first 6 }} 54 | 55 | {{- end }} 56 | {{- end }} 57 | 58 | {{- with .Params.videos }} 59 | {{- range . | first 6 }} 60 | 61 | {{- end }} 62 | {{- end }} 63 | 64 | {{- range .GetTerms "series" }} 65 | {{- range .Pages | first 7 }} 66 | {{- if ne $ . }} 67 | 68 | {{- end }} 69 | {{- end }} 70 | {{- end }} 71 | 72 | {{- with site.Params.social }} 73 | {{- if reflect.IsMap . }} 74 | {{- with .facebook_app_id }} 75 | 76 | {{- else }} 77 | {{- with .facebook_admin }} 78 | 79 | {{- end }} 80 | {{- end }} 81 | {{- end }} 82 | {{- end }} 83 | 84 | {{- with (.Param "social.fediverse_creator") }} 85 | 86 | {{- end }} 87 | -------------------------------------------------------------------------------- /layouts/partials/templates/schema_json.html: -------------------------------------------------------------------------------- 1 | {{ if .IsHome }} 2 | 23 | {{- else if (or .IsPage .IsSection) }} 24 | {{/* BreadcrumbList */}} 25 | {{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }} 26 | {{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} 27 | {{- $bc_list := (split $lang_url "/")}} 28 | 29 | {{- $scratch := newScratch }} 30 | 62 | {{- if .IsPage }} 63 | 126 | {{- end }}{{/* .IsPage end */}} 127 | 128 | {{- end -}} 129 | -------------------------------------------------------------------------------- /layouts/partials/templates/twitter_cards.html: -------------------------------------------------------------------------------- 1 | {{- if .Params.cover.image -}} 2 | 3 | {{- if (ne $.Params.cover.relative true) }} 4 | 5 | {{- else }} 6 | 7 | {{- end}} 8 | {{- else }} 9 | {{- $images := partial "templates/_funcs/get-page-images" . -}} 10 | {{- with index $images 0 -}} 11 | 12 | 13 | {{- else -}} 14 | 15 | {{- end -}} 16 | {{- end }} 17 | 18 | 19 | 20 | {{- $twitterSite := "" }} 21 | {{- with site.Params.social }} 22 | {{- if reflect.IsMap . }} 23 | {{- with .twitter }} 24 | {{- $content := . }} 25 | {{- if not (strings.HasPrefix . "@") }} 26 | {{- $content = printf "@%v" . }} 27 | {{- end }} 28 | 29 | {{- end }} 30 | {{- end }} 31 | {{- end }} 32 | -------------------------------------------------------------------------------- /layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 | {{- $headers := findRE "(.|\n])+?
    " .Content -}} 2 | {{- $has_headers := ge (len $headers) 1 -}} 3 | {{- if $has_headers -}} 4 |
    5 |
    6 | 7 | {{- i18n "toc" | default "Table of Contents" }} 8 | 9 | 10 |
    11 | {{- if (.Param "UseHugoToc") }} 12 | {{- .TableOfContents -}} 13 | {{- else }} 14 | {{- $largest := 6 -}} 15 | {{- range $headers -}} 16 | {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} 17 | {{- $headerLevel := len (seq $headerLevel) -}} 18 | {{- if lt $headerLevel $largest -}} 19 | {{- $largest = $headerLevel -}} 20 | {{- end -}} 21 | {{- end -}} 22 | 23 | {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} 24 | 25 | {{- $.Scratch.Set "bareul" slice -}} 26 |
      27 | {{- range seq (sub $firstHeaderLevel $largest) -}} 28 |
        29 | {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}} 30 | {{- end -}} 31 | {{- range $i, $header := $headers -}} 32 | {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} 33 | {{- $headerLevel := len (seq $headerLevel) -}} 34 | 35 | {{/* get id="xyz" */}} 36 | {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }} 37 | 38 | {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}} 39 | {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }} 40 | {{- $header := replaceRE "((.|\n])+?)" "$1" $header -}} 41 | 42 | {{- if ne $i 0 -}} 43 | {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}} 44 | {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}} 45 | {{- if gt $headerLevel $prevHeaderLevel -}} 46 | {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}} 47 |
          48 | {{/* the first should not be recorded */}} 49 | {{- if ne $prevHeaderLevel . -}} 50 | {{- $.Scratch.Add "bareul" . -}} 51 | {{- end -}} 52 | {{- end -}} 53 | {{- else -}} 54 | 55 | {{- if lt $headerLevel $prevHeaderLevel -}} 56 | {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}} 57 | {{- if in ($.Scratch.Get "bareul") . -}} 58 |
        59 | {{/* manually do pop item */}} 60 | {{- $tmp := $.Scratch.Get "bareul" -}} 61 | {{- $.Scratch.Delete "bareul" -}} 62 | {{- $.Scratch.Set "bareul" slice}} 63 | {{- range seq (sub (len $tmp) 1) -}} 64 | {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}} 65 | {{- end -}} 66 | {{- else -}} 67 |
      68 | 69 | {{- end -}} 70 | {{- end -}} 71 | {{- end -}} 72 | {{- end }} 73 |
    • 74 | {{- $header | plainify | safeHTML -}} 75 | {{- else }} 76 |
    • 77 | {{- $header | plainify | safeHTML -}} 78 | {{- end -}} 79 | {{- end -}} 80 | 81 | {{- $firstHeaderLevel := $largest }} 82 | {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} 83 |
    • 84 | {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} 85 | {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} 86 |
    87 | {{- else }} 88 | 89 |
  • 90 | {{- end -}} 91 | {{- end }} 92 | 93 | {{- end }} 94 | 95 | 96 | 97 | {{- end }} 98 | -------------------------------------------------------------------------------- /layouts/partials/translation_list.html: -------------------------------------------------------------------------------- 1 | {{- if .IsTranslated -}} 2 | {{- if (ne .Layout "search") }} 3 | {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} 4 | {{- end }} 5 | {{- i18n "translations" | default "Translations" }}: 6 | 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | {{- if hugo.IsProduction | or (eq site.Params.env "production") }} 3 | Disallow: 4 | {{- else }} 5 | Disallow: / 6 | {{- end }} 7 | Sitemap: {{ "sitemap.xml" | absURL }} 8 | -------------------------------------------------------------------------------- /layouts/shortcodes/collapse.html: -------------------------------------------------------------------------------- 1 | {{ if .Get "summary" }} 2 | {{ else }} 3 | {{ warnf "missing value for param 'summary': %s" .Position }} 4 | {{ end }} 5 |

    6 | {{ .Get "summary" | markdownify }} 7 | {{ .Inner | markdownify }} 8 |

    9 | -------------------------------------------------------------------------------- /layouts/shortcodes/figure.html: -------------------------------------------------------------------------------- 1 | 5 | {{- if .Get "link" -}} 6 | 7 | {{- end }} 8 | {{ with .Get 15 | {{- if .Get "link" }}{{ end -}} 16 | {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} 17 |
    18 | {{ with (.Get "title") -}} 19 | {{ . }} 20 | {{- end -}} 21 | {{- if or (.Get "caption") (.Get "attr") -}}

    22 | {{- .Get "caption" | markdownify -}} 23 | {{- with .Get "attrlink" }} 24 | 25 | {{- end -}} 26 | {{- .Get "attr" | markdownify -}} 27 | {{- if .Get "attrlink" }}{{ end }}

    28 | {{- end }} 29 |
    30 | {{- end }} 31 | 32 | -------------------------------------------------------------------------------- /layouts/shortcodes/inTextImg.html: -------------------------------------------------------------------------------- 1 | {{- $Img := (.Get "url") }} 2 | {{- $height := (.Get "height") }} 3 | {{- $alt := (.Get "alt") }} 4 | 5 | {{$alt}} 6 | -------------------------------------------------------------------------------- /layouts/shortcodes/ltr.html: -------------------------------------------------------------------------------- 1 | {{ $.Scratch.Set "md" false }} 2 | 3 | {{ if .IsNamedParams }} 4 | {{ $.Scratch.Set "md" (.Get "md") }} 5 | {{ else }} 6 | {{ $.Scratch.Set "md" (.Get 0) }} 7 | {{ end }} 8 | 9 |
    10 | {{ if eq ($.Scratch.Get "md") false }} 11 | {{ .Inner }} 12 | {{ else }} 13 | {{ .Inner | markdownify }} 14 | {{ end }} 15 |
    16 | -------------------------------------------------------------------------------- /layouts/shortcodes/rawhtml.html: -------------------------------------------------------------------------------- 1 | 2 | {{- .Inner -}} -------------------------------------------------------------------------------- /layouts/shortcodes/rtl.html: -------------------------------------------------------------------------------- 1 | {{ $.Scratch.Set "md" false }} 2 | 3 | {{ if .IsNamedParams }} 4 | {{ $.Scratch.Set "md" (.Get "md") }} 5 | {{ else }} 6 | {{ $.Scratch.Set "md" (.Get 0) }} 7 | {{ end }} 8 | 9 |
    10 | {{ if eq ($.Scratch.Get "md") false }} 11 | {{ .Inner }} 12 | {{ else }} 13 | {{ .Inner | markdownify }} 14 | {{ end }} 15 |
    16 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "PaperMod" 5 | license = "MIT" 6 | licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE" 7 | description = "A fast, clean, responsive Hugo theme" 8 | homepage = "https://adityatelange.github.io/hugo-PaperMod/" 9 | demosite = "https://adityatelange.github.io/hugo-PaperMod/" 10 | tags = [ 11 | "responsive", 12 | "simple", 13 | "clean", 14 | "light", 15 | "dark", 16 | "blog", 17 | "minimalist", 18 | "highlight.js", 19 | "search" 20 | ] 21 | features = [ 22 | "responsive", 23 | "single-column", 24 | "blog", 25 | "cover-image", 26 | "table-of-contents", 27 | "opengraph", 28 | "highlight.js", 29 | "favicon", 30 | "archive", 31 | "share-icons", 32 | "cover", 33 | "multilingual", 34 | "social-icons", 35 | "minified-assets", 36 | "theme-toggle", 37 | "menu-location-indicator", 38 | "scroll-to-top", 39 | "search" 40 | ] 41 | min_version = "0.146.0" 42 | 43 | [author] 44 | name = "Aditya Telange" 45 | homepage = "https://github.com/adityatelange/" 46 | 47 | # If porting an existing theme 48 | [original] 49 | name = "Paper" 50 | author = "nanxiaobei" 51 | homepage = "https://github.com/nanxiaobei" 52 | repo = "https://github.com/nanxiaobei/hugo-paper/" 53 | --------------------------------------------------------------------------------