├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── new-blank-issue.md ├── stale.yml └── workflows │ └── gh-pages.yml ├── .vscode └── settings.json ├── LICENSE ├── Makefile ├── README.md ├── assets ├── css │ ├── common │ │ ├── 404.css │ │ ├── archive.css │ │ ├── blogroll.css │ │ ├── footer.css │ │ ├── header.css │ │ ├── highlight.scss │ │ ├── main.css │ │ ├── post-entry.css │ │ ├── post-single.css │ │ ├── profile-mode.css │ │ ├── search.css │ │ └── terms.css │ ├── core │ │ ├── reset.css │ │ ├── theme-vars.css │ │ └── zmedia.css │ ├── extended │ │ ├── blank.css │ │ ├── essays.scss │ │ └── newsletter.scss │ └── lib │ │ ├── chroma-dark.css │ │ └── chroma-light.css └── js │ ├── fastsearch.js │ ├── fuse.basic.min.js │ ├── instantclick.js │ ├── instantclick.min.js │ └── medium-zoom.min.js ├── data └── svg.toml ├── exampleSite ├── .gitignore ├── README.md ├── assets │ └── images │ │ └── regular.jpg ├── config.default.yml ├── config.profileMode.yml ├── config.yml ├── configTaxo.yml ├── content │ ├── archives.md │ ├── archives.zh.md │ ├── docs │ │ ├── _index.md │ │ ├── _index.zh.md │ │ ├── archives.md │ │ ├── emoji-support.md │ │ ├── faq.md │ │ ├── features │ │ │ ├── images │ │ │ │ ├── homeinfo.jpg │ │ │ │ ├── profile.jpg │ │ │ │ └── regular.jpg │ │ │ └── index.md │ │ ├── icons.md │ │ ├── icons_preview.md │ │ ├── installation.md │ │ ├── math-typesetting.md │ │ ├── papermodx-new-features.md │ │ ├── papermodx-new-features.zh.md │ │ └── variables.md │ ├── newsletter │ │ ├── 001-hello-world │ │ │ └── index.md │ │ ├── _index.md │ │ └── archives.md │ ├── posts │ │ ├── _index.md │ │ ├── _index.zh.md │ │ ├── markdown-syntax.md │ │ ├── markdown-syntax.zh.md │ │ ├── placeholder-text.md │ │ └── rich-content.md │ ├── search.md │ └── search.zh.md ├── layouts │ ├── _default │ │ └── icons.html │ └── partials │ │ ├── custom_analytics.html │ │ └── extend_head.html └── static │ └── cover.png ├── go.mod ├── i18n ├── ar.yaml ├── bg.yaml ├── bn.yaml ├── ca.yaml ├── ckb.yaml ├── da.yaml ├── de.yaml ├── en.yaml ├── eo.yaml ├── es.yaml ├── fa.yaml ├── fr.yaml ├── he.yaml ├── hi.yaml ├── hu.yaml ├── id.yaml ├── it.yaml ├── ja.yaml ├── ko.yaml ├── ku.yaml ├── mn.yaml ├── nl.yaml ├── pl.yaml ├── pt.yaml ├── ru.yaml ├── sv.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 │ ├── sitemap.xml │ └── terms.html ├── blogroll │ └── section.html ├── essays │ └── section.html ├── newsletter │ ├── archives.html │ └── section.html ├── partials │ ├── anchored_headings.html │ ├── author.html │ ├── breadcrumbs.html │ ├── comments.html │ ├── cover.html │ ├── disqus.html │ ├── edit_post.html │ ├── extend_footer.html │ ├── extend_head.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── home_info.html │ ├── index_profile.html │ ├── inline_links.html │ ├── newsletter_brand.html │ ├── newsletter_sub_form.html │ ├── page_footer.html │ ├── post_canonical.html │ ├── post_meta.html │ ├── post_nav_links.html │ ├── remark42.html │ ├── share_icons.html │ ├── social_icons.html │ ├── social_links.html │ ├── social_quote_tweet.html │ ├── static_comments.html │ ├── telegram_widget.html │ ├── templates │ │ ├── opengraph.html │ │ └── schema_json.html │ ├── toc.html │ └── translation_list.html ├── robots.txt └── shortcodes │ ├── blockquote.html │ ├── collapse.html │ ├── figure-img-size.html │ ├── figure-img.html │ ├── figure.html │ ├── image-size-control.html │ ├── link.html │ ├── ltr.html │ ├── rawhtml.html │ ├── rtl.html │ ├── social-quote-tweet.html │ ├── standout.html │ ├── tweet-ref.html │ └── video.html └── theme.toml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | 19 | 20 | **Describe the bug** 21 | 22 | 23 | - Device/Os: [e.g. Android 10] 24 | - Type: [e.g. Desktop/Mobile] 25 | - Browser and version [e.g. Chrome 86.0]: 26 | - Hugo Version [ >=0.83.0 expected]: 27 | - Theme Version [e.g. v4.0, master, or commit-id ]: 28 | 29 | **Steps to reproduce the behavior:** 30 | 36 | 37 | **Expected behavior**: 38 | 39 | 40 | **Screenshots** 41 | 42 | 43 | **Additional context** 44 | 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-blank-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Blank Issue 3 | about: Anything other than bug report 4 | title: "" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 7 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 3 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - keep 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | # https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml 2 | name: Deploy Hugo site to Pages 3 | 4 | on: 5 | push: 6 | paths-ignore: 7 | - "README.md" 8 | branches: 9 | - master 10 | 11 | # Allows you to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 15 | permissions: 16 | contents: read 17 | pages: write 18 | id-token: write 19 | 20 | # Allow one concurrent deployment 21 | concurrency: 22 | group: "pages" 23 | cancel-in-progress: true 24 | 25 | 26 | jobs: 27 | build: 28 | runs-on: ubuntu-latest 29 | steps: 30 | - uses: actions/checkout@v3 31 | with: 32 | fetch-depth: 1 33 | 34 | - name: Configure Pages 35 | id: pages 36 | uses: actions/configure-pages@v3 37 | 38 | - name: Setup Hugo 39 | uses: peaceiris/actions-hugo@v2 40 | with: 41 | hugo-version: 'latest' 42 | extended: true 43 | 44 | - name: Build 45 | run: | 46 | hugo \ 47 | --minify --verbose -D \ 48 | --buildFuture \ 49 | --environment production \ 50 | --themesDir ../.. --theme hugo-PaperModX \ 51 | --baseURL "${{ steps.pages.outputs.base_url }}/" 52 | working-directory: exampleSite 53 | - name: Upload artifact 54 | uses: actions/upload-pages-artifact@v1 55 | with: 56 | path: ./exampleSite/public 57 | 58 | # Deployment job 59 | deploy: 60 | environment: 61 | name: github-pages 62 | url: ${{ steps.deployment.outputs.page_url }} 63 | runs-on: ubuntu-latest 64 | needs: build 65 | steps: 66 | - name: Deploy to GitHub Pages 67 | id: deployment 68 | uses: actions/deploy-pages@v1 69 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "**/public": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nanxiaobei and adityatelange 4 | Copyright (c) 2021 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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | run-default: 2 | cd exampleSite && hugo server -D --gc -p 13131 --config config.default.yml 3 | 4 | run-profile-mode: 5 | cd exampleSite && hugo server -D --gc -p 13131 --config config.profileMode.yml 6 | 7 | chroma-css: 8 | hugo gen chromastyles --style=dracula > assets/css/lib/chroma-dark.css 9 | hugo gen chromastyles --style=github > assets/css/lib/chroma-light.css 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PaperModX 2 | 3 | PaperModX is a forked version of [PaperMod](https://github.com/adityatelange/hugo-PaperMod), 4 | it aims at adding new features and improving code quality, 5 | makes it easier to read and modify by anyone with basic knowledge of Hugo and HTML. 6 | 7 | Features and changes: 8 | - Table of Contents (ToC) floating on the side 9 | - InstantClick integration 10 | - Social icons from [Simple Icons](https://simpleicons.org/) 11 | - Opinionated UI enhancements 12 | 13 | ## Getting started 14 | 15 | You can use [reorx/papermodx-example](https://github.com/reorx/papermodx-example) as a boilerplate to create a new Hugo site with PaperModX theme. For detailed instructions please see the README of papermodx-example repo. 16 | 17 | ## Table of Contents (ToC) floating on the side 18 | 19 | By adding config: 20 | 21 | ```yaml 22 | params: 23 | TocSide: 'left' # or 'right' 24 | ``` 25 | 26 | ToC will float on the left/right side of the page. 27 | You can take a look at how `'right'` feels like in [Installation | Update](https://reorx.github.io/hugo-PaperModX/docs/installation/). 28 | 29 | The ToC box is responsive, it only shows on the side when minimum screen size is 1440px. 30 | 31 | This feature is enabled on this site. 32 | 33 | 34 | ## InstantClick integration 35 | 36 | By adding config: 37 | 38 | ```yaml 39 | params: 40 | EnableInstantClick: true 41 | ``` 42 | 43 | [InstantClick](http://instantclick.io/) will be enabled, 44 | making navigation behaves like Single Page Application. 45 | 46 | Note that `/search` pages are omitted from InstantClick 47 | to prevent conflicts from search's JavaScript, 48 | this may be changed in the future after refactoring those scripts. 49 | 50 | Another thing to notice is smooth scrolling will be disabled 51 | if InstantClick is enabled, because they both listen click 52 | event on every `` tags. IMO smooth scrolling is not very useful 53 | so it has to give way to InstantCllick. 54 | 55 | This feature is enabled on this site. 56 | 57 | 58 | ## Give links an accent color. 59 | 60 | Though PaperModX is designed to be minimal, accent color is still essential. 61 | It's a good way to show personality and make your site feels more delightful. 62 | 63 | The default color is a purple vibe, 64 | you can customize the colors of link, link underline and their hover variants 65 | by override the following css variables in `assets/css/extended/custom.css` of your site. 66 | 67 | ```css 68 | :root { 69 | --link-color: var(--primary); 70 | --link-hover-color: #573eaa; 71 | --link-underline-shadow: 0 1px 0 var(--link-color); 72 | --link-hover-underline-color: #573eaa; 73 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 74 | } 75 | ``` 76 | 77 | 78 | ## Customize pagniator size 79 | 80 | In section pages, if you want the paginator size be different from the 81 | [global config](https://gohugo.io/templates/pagination/#configure-pagination), 82 | you can add `paginate` in the frontmatter to customize. 83 | 84 | ```yaml 85 | --- 86 | paginate: 10 87 | --- 88 | ``` 89 | 90 | 91 | ## Menus external link 92 | 93 | You can add `external: true` to a menu item's params to mark it as an external link, 94 | this will add a small icon to the end, and make the link open in new tab when clicked. 95 | 96 | ```yaml 97 | menu: 98 | main: 99 | - name: "@Author" 100 | url: "https://reorx.com" 101 | params: 102 | external: true 103 | ``` 104 | 105 | 106 | ## Highlight code with Chroma, no bullshit 107 | 108 | PaperMod uses highlight.js to highlight code blocks. 109 | In PaperModX, we use Chroma which is the recommended way in Hugo's 110 | [official docs](https://gohugo.io/content-management/syntax-highlighting/#:~:text=Hugo%20uses%20Chroma%20as%20its%20code%20highlighter%3B%20it%20is%20built%20in%20Go%20and%20is%20really%2C%20really%20fast), 111 | thus changing theme is easily supported. 112 | 113 | By default the themes are `github` for light and `dracula` for dark, 114 | you can change it by adding `chroma-light.css` and `chroma-dark.css` 115 | in site's `assets/css/lib` directory. 116 | 117 | 118 | ## Social icons from Simple Icons 119 | 120 | Add social icons with `-simple` suffix from [Simple Icons](https://simpleicons.org/). 121 | 122 | Available icons: 123 | - github-simple 124 | - rss-simple 125 | - telegram-simple 126 | - twitter-simple 127 | - pinboard-simple 128 | 129 | The icons are moved from `layouts/partials/svg.html` to `data/svg.toml`, 130 | makes it easier to maintain, it's now possible to have an index page 131 | to show all the icons, check it out at: [Icons Preview](https://reorx.github.io/hugo-PaperModX/docs/icons_preview/) 132 | 133 | 134 | ## Opinionated UI enhancements 135 | 136 | - Distinguish home page width and post page width, post page is wider 137 | (800px) for better readability, you can change it by `--post-width` in `theme-vars.css`. 138 | - Menu links are always bold, this feels more consistent when clicking around. Active links have deeper color. 139 | -------------------------------------------------------------------------------- /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: 22px 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/blogroll.css: -------------------------------------------------------------------------------- 1 | .links-container { 2 | font-size: 16px; 3 | } 4 | .links-container blockquote { 5 | margin: var(--gap) 0; 6 | padding: 0 14px; 7 | border-inline-start: 3px solid var(--primary); 8 | } 9 | .links .item { 10 | padding: 12px; 11 | background: var(--entry); 12 | border-radius: var(--radius); 13 | margin-bottom: var(--gap); 14 | border: 1px solid var(--border); 15 | } 16 | 17 | .links .favicon { 18 | display: inline-block; 19 | background-size: 16px 16px; 20 | width: 16px; 21 | height: 16px; 22 | image-rendering: -webkit-optimize-contrast; 23 | } 24 | .links .item .title .favicon { 25 | margin-right: calc(var(--gap) / 2); 26 | vertical-align: middle; 27 | } 28 | 29 | .links .item .title a:hover { 30 | text-decoration: underline; 31 | } 32 | 33 | .links .item .description { 34 | margin-left: calc(16px + var(--gap) / 2); 35 | color: var(--secondary); 36 | } 37 | 38 | .links .item .description .delimiter::after { 39 | content: "·"; 40 | margin-inline-start: .5em; 41 | margin-inline-end: .5em; 42 | } 43 | -------------------------------------------------------------------------------- /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 | font-weight: 500; 26 | color: inherit; 27 | box-shadow: var(--link-underline-shadow); 28 | } 29 | 30 | .footer a:hover { 31 | color: var(--link-hover-color); 32 | box-shadow: var(--link-hover-underline-shadow); 33 | } 34 | 35 | .top-link:hover { 36 | color: var(--link-hover-color); 37 | } 38 | 39 | .top-link { 40 | visibility: hidden; 41 | position: fixed; 42 | bottom: 60px; 43 | right: 30px; 44 | z-index: 99; 45 | background: var(--tertiary-bg); 46 | width: 42px; 47 | height: 42px; 48 | padding: 12px; 49 | border-radius: 64px; 50 | transition: visibility 0.5s, opacity 0.8s linear; 51 | line-height: 1.5; 52 | } 53 | 54 | .top-link, 55 | .top-link svg { 56 | filter: drop-shadow(0px 0px 0px var(--theme)); 57 | } 58 | 59 | 60 | .top-link:focus, 61 | #theme-toggle:focus { 62 | outline: 0; 63 | } 64 | 65 | /* InstantClick css */ 66 | #instantclick-bar { 67 | background: var(--tertiary-bg); 68 | } 69 | 70 | /* make zoom overlay and image higher than toc */ 71 | .medium-zoom-overlay { 72 | z-index: 2; 73 | } 74 | .medium-zoom-image--opened { 75 | z-index: 3; 76 | } 77 | -------------------------------------------------------------------------------- /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 | .nav ul { 11 | margin: 0; 12 | padding: 0; 13 | } 14 | 15 | .logo a { 16 | display: block; 17 | } 18 | 19 | .logo, 20 | #menu { 21 | display: flex; 22 | margin: auto var(--gap); 23 | } 24 | 25 | .logo { 26 | flex-wrap: inherit; 27 | } 28 | 29 | .logo a { 30 | font-size: 24px; 31 | font-weight: 700; 32 | } 33 | 34 | .logo a img, 35 | .logo a svg { 36 | display: inline; 37 | vertical-align: middle; 38 | pointer-events: none; 39 | transform: translate(0, -10%); 40 | border-radius: 6px; 41 | margin-inline-end: 8px; 42 | image-rendering: -webkit-optimize-contrast; 43 | } 44 | 45 | #theme-toggle svg { 46 | height: 18px; 47 | } 48 | 49 | button#theme-toggle { 50 | font-size: 26px; 51 | margin: auto 4px; 52 | } 53 | 54 | body.dark #moon { 55 | vertical-align: middle; 56 | display: none; 57 | } 58 | 59 | body:not(.dark) #sun { 60 | display: none; 61 | } 62 | 63 | #menu { 64 | list-style: none; 65 | word-break: keep-all; 66 | overflow-x: auto; 67 | white-space: nowrap; 68 | } 69 | 70 | #menu li + li { 71 | margin-inline-start: var(--gap); 72 | } 73 | 74 | #menu a { 75 | font-size: 16px; 76 | font-weight: 500; 77 | color: var(--secondary); 78 | display: inline-block; 79 | line-height: 1.5em; 80 | } 81 | #menu a:hover { 82 | color: var(--primary); 83 | } 84 | 85 | #menu a.active:hover { 86 | color: var(--signature); 87 | } 88 | #menu .active { 89 | color: var(--signature); 90 | box-shadow: 0 2px 0 var(--signature); 91 | } 92 | 93 | #menu .external-link { 94 | position: relative; 95 | } 96 | #menu .external-link svg { 97 | width: 13px; 98 | height: auto; 99 | position: relative; 100 | top: 1px; 101 | margin-left: 3px; 102 | } 103 | 104 | .lang-switch li, 105 | .lang-switch ul, 106 | .logo-switches { 107 | display: inline-flex; 108 | margin: auto 4px; 109 | } 110 | 111 | .lang-switch { 112 | display: flex; 113 | flex-wrap: inherit; 114 | } 115 | 116 | .lang-switch a { 117 | margin: auto 3px; 118 | font-size: 16px; 119 | font-weight: 500; 120 | } 121 | 122 | .logo-switches { 123 | flex-wrap: inherit; 124 | } 125 | -------------------------------------------------------------------------------- /assets/css/common/highlight.scss: -------------------------------------------------------------------------------- 1 | @import '../lib/chroma-light'; 2 | 3 | // for github theme, add a background color 4 | .chroma { 5 | background-color: #f6f8fa; 6 | } 7 | 8 | .dark { 9 | @import '../lib/chroma-dark'; 10 | } 11 | -------------------------------------------------------------------------------- /assets/css/common/main.css: -------------------------------------------------------------------------------- 1 | /* for home and other pages */ 2 | .main { 3 | position: relative; 4 | min-height: calc(100vh - var(--header-height) - var(--footer-height)); 5 | max-width: calc(var(--main-width) + var(--gap) * 2); 6 | margin: auto; 7 | padding: var(--content-gap) var(--gap) 0; 8 | } 9 | 10 | @media screen and (max-width: 500px) { 11 | .main { 12 | padding-top: 0; 13 | } 14 | } 15 | 16 | /* same as .post-header */ 17 | .page-header { 18 | margin: var(--content-gap) 0 calc(var(--content-gap) * 1.5); 19 | } 20 | 21 | .mark-line { 22 | display: inline-block; 23 | background: var(--line-yellow) bottom left/100% 0.3em no-repeat; 24 | } 25 | mark { 26 | margin: 0 -0.4em; 27 | padding: 0em 0.4em; 28 | border-radius: 0.8em 0.3em; 29 | background: transparent; 30 | background-image: linear-gradient( 31 | to right, 32 | rgba(255, 225, 0, 0.1), 33 | rgba(255, 225, 0, 0.7) 4%, 34 | rgba(255, 225, 0, 0.3) 35 | ); 36 | -webkit-box-decoration-break: clone; 37 | box-decoration-break: clone; 38 | } 39 | 40 | /* for home and section page */ 41 | .first-entry { 42 | position: relative; 43 | min-height: 320px; 44 | margin: var(--gap) 0 calc(var(--gap) * 2) 0; 45 | } 46 | 47 | .first-entry .entry-header { 48 | overflow: hidden; 49 | display: -webkit-box; 50 | -webkit-box-orient: vertical; 51 | margin: var(--gap) 0 calc(var(--gap) * 2); 52 | } 53 | 54 | .first-entry .entry-header h1 { 55 | font-size: 34px; 56 | line-height: 1.3; 57 | } 58 | 59 | .first-entry .entry-content { 60 | margin: 14px 0; 61 | font-size: 17px; 62 | color: var(--primary); 63 | line-height: 1.6em; 64 | display: block; 65 | overflow: initial; /* fix edge get cut */ 66 | } 67 | 68 | @media screen and (max-width: 500px) { 69 | .first-entry .entry-header h1 { 70 | font-size: 30px; 71 | } 72 | .first-entry .entry-content { 73 | font-size: 16px; 74 | } 75 | } 76 | 77 | .first-entry .entry-content p { 78 | margin-bottom: .8em; 79 | } 80 | .first-entry .entry-content ul, 81 | .first-entry .entry-content ol { 82 | margin: .8em 0; 83 | } 84 | .first-entry .entry-content li p { 85 | margin-bottom: .5em; 86 | } 87 | 88 | .first-entry .entry-footer { 89 | font-size: 14px; 90 | } 91 | 92 | .inline-links a { 93 | font-weight: 500; 94 | color: var(--primary); 95 | box-shadow: var(--link-underline-shadow); 96 | transition: var(--link-transition); 97 | } 98 | .inline-links a:hover { 99 | color: var(--link-hover-color); 100 | box-shadow: var(--link-hover-underline-shadow); 101 | } 102 | 103 | .inline-links span:not(:last-of-type):after { 104 | content: "·"; 105 | margin-inline-start: .5em; 106 | margin-inline-end: .5em; 107 | } 108 | 109 | 110 | /* for post page */ 111 | .main.post { 112 | max-width: calc(var(--post-width) + var(--gap) * 2); 113 | } 114 | 115 | .page-header h1 { 116 | font-size: 40px; 117 | margin-bottom: var(--content-gap); 118 | text-transform: capitalize; 119 | } 120 | 121 | .pagination { 122 | display: flex; 123 | } 124 | 125 | .pagination a { 126 | color: var(--theme); 127 | font-size: 13px; 128 | line-height: 36px; 129 | background: var(--primary); 130 | border-radius: calc(36px / 2); 131 | padding: 0 16px; 132 | } 133 | 134 | .pagination .next { 135 | margin-inline-start: auto; 136 | } 137 | 138 | .social-icons { 139 | padding: 12px 0; 140 | } 141 | 142 | .social-icons a { 143 | display: inline-block; 144 | line-height: 20px; 145 | transition: var(--link-transition); 146 | } 147 | 148 | .social-icons a:not(:last-of-type) { 149 | margin-right: 12px; 150 | } 151 | 152 | .social-icons a svg { 153 | height: 26px; 154 | width: 26px; 155 | } 156 | .social-icons a:hover { 157 | color: var(--link-hover-color); 158 | box-shadow: var(--link-hover-underline-shadow); 159 | } 160 | 161 | code { 162 | direction: ltr; 163 | } 164 | 165 | div.highlight, 166 | pre { 167 | position: relative; 168 | } 169 | 170 | .copy-code { 171 | display: none; 172 | position: absolute; 173 | top: 4px; 174 | right: 4px; 175 | color: rgba(255, 255, 255, 0.8); 176 | background: rgba(78, 78, 78, 0.8); 177 | border-radius: var(--radius); 178 | padding: 0 5px; 179 | font-size: 14px; 180 | user-select: none; 181 | } 182 | 183 | div.highlight:hover .copy-code, 184 | pre:hover .copy-code { 185 | display: block; 186 | } 187 | 188 | .meta-item { 189 | display: inline-block; 190 | } 191 | .meta-item * { 192 | color: var(--secondary); 193 | } 194 | 195 | .meta-item:not(:last-of-type):after { 196 | content: "·"; 197 | margin-inline-start: .5em; 198 | margin-inline-end: .5em; 199 | } 200 | 201 | .meta-item svg { 202 | width: 1em; 203 | height: 1em; 204 | display: inline-block; 205 | vertical-align: -0.15em; 206 | } 207 | 208 | .meta-item a { 209 | transition: var(--link-transition); 210 | } 211 | .meta-item a:hover { 212 | color: var(--primary); 213 | box-shadow: 0 1px 0 var(--secondary); 214 | } 215 | .meta-item .post-tags a:not(:last-of-type) { 216 | margin-inline-end: .3em; 217 | } 218 | .meta-item .post-tags a:not(:last-of-type):after { 219 | content: ","; 220 | } 221 | .meta-item .post-tags a:before { 222 | content: "#"; 223 | } 224 | 225 | 226 | /* images */ 227 | 228 | figure > img { 229 | image-rendering: -webkit-optimize-contrast; 230 | } 231 | 232 | .post-content img { 233 | image-rendering: -webkit-optimize-contrast; 234 | } 235 | 236 | 237 | /* effects */ 238 | :root { 239 | --shadow-color: 0deg 0% 0%; 240 | --shadow-elevation-low: 241 | 0.6px 0.6px 1px hsl(var(--shadow-color) / 0.1), 242 | 0.9px 0.9px 1.4px -1.2px hsl(var(--shadow-color) / 0.1), 243 | 2.2px 2.2px 3.5px -2.5px hsl(var(--shadow-color) / 0.1); 244 | --shadow-elevation-medium: 245 | 0.6px 0.6px 1px hsl(var(--shadow-color) / 0.11), 246 | 1.8px 1.8px 2.9px -0.8px hsl(var(--shadow-color) / 0.11), 247 | 4.6px 4.6px 7.3px -1.7px hsl(var(--shadow-color) / 0.11), 248 | 11.1px 11.1px 17.7px -2.5px hsl(var(--shadow-color) / 0.11); 249 | 250 | --twitter-color: #4a99e9; 251 | } 252 | 253 | 254 | /* shortcodes */ 255 | 256 | .standout { 257 | font-size: 24px; 258 | padding: .5em; 259 | text-align: center; 260 | } 261 | 262 | .image-size-control { 263 | margin-left: auto; 264 | margin-right: auto; 265 | } 266 | .image-size-control > img { 267 | width: inherit; 268 | height: inherit; 269 | } 270 | -------------------------------------------------------------------------------- /assets/css/common/post-entry.css: -------------------------------------------------------------------------------- 1 | .home-info .entry-content { 2 | -webkit-line-clamp: unset; 3 | } 4 | 5 | .post-entry { 6 | position: relative; 7 | margin-bottom: var(--gap); 8 | padding: var(--gap); 9 | background: var(--entry); 10 | border-radius: var(--radius); 11 | border: 1px solid var(--border); 12 | } 13 | .post-entry:hover .entry-header h2 { 14 | color: var(--link-hover-color); 15 | box-shadow: var(--link-hover-underline-shadow); 16 | } 17 | 18 | /* .post-entry:active { 19 | transform: scale(0.97); 20 | } */ 21 | 22 | .tag-entry .entry-cover { 23 | display: none; 24 | } 25 | 26 | .entry-header h2 { 27 | font-size: 24px; 28 | line-height: 1.3; 29 | transition: var(--link-transition); 30 | display: inline-block; 31 | } 32 | 33 | .entry-content { 34 | margin: 8px 0; 35 | color: var(--secondary); 36 | font-size: 14px; 37 | line-height: 1.6; 38 | overflow: hidden; 39 | display: -webkit-box; 40 | -webkit-box-orient: vertical; 41 | -webkit-line-clamp: 2; 42 | } 43 | 44 | .entry-footer, 45 | .entry-footer span > a { 46 | color: var(--secondary); 47 | font-size: 13px; 48 | } 49 | 50 | .entry-link { 51 | position: absolute; 52 | left: 0; 53 | right: 0; 54 | top: 0; 55 | bottom: 0; 56 | } 57 | 58 | .entry-cover, 59 | .entry-isdraft { 60 | font-size: 14px; 61 | color: var(--secondary); 62 | } 63 | 64 | .entry-cover { 65 | margin-bottom: var(--gap); 66 | text-align: center; 67 | } 68 | 69 | .entry-cover img { 70 | border-radius: var(--radius); 71 | width: 100%; 72 | height: auto; 73 | image-rendering: -webkit-optimize-contrast; 74 | } 75 | 76 | .entry-cover a { 77 | color: var(--secondary); 78 | box-shadow: 0 1px 0 var(--primary); 79 | } 80 | -------------------------------------------------------------------------------- /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 h1 { 14 | padding: 12px 0; 15 | } 16 | 17 | .profile img { 18 | display: inline-table; 19 | border-radius: 50%; 20 | pointer-events: none; 21 | } 22 | 23 | .buttons { 24 | flex-wrap: wrap; 25 | max-width: 400px; 26 | margin: 0 auto; 27 | } 28 | 29 | .button { 30 | background: var(--tertiary-bg); 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-bg); 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-bg); 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-bg); 11 | border-radius: 6px; 12 | transition: transform 0.1s; 13 | } 14 | 15 | .terms-tags a:active { 16 | background: var(--tertiary-bg); 17 | transform: scale(0.96); 18 | } 19 | -------------------------------------------------------------------------------- /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-font-smoothing: antialiased; 11 | text-rendering: optimizeLegibility; */ 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, Helvetica, 'Helvetica Neue', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif; 28 | /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */ 29 | font-size: 18px; 30 | line-height: 1.6em; 31 | word-break: break-word; 32 | background: var(--theme); 33 | } 34 | 35 | article, 36 | aside, 37 | figcaption, 38 | figure, 39 | footer, 40 | header, 41 | hgroup, 42 | main, 43 | nav, 44 | section, 45 | table { 46 | display: block; 47 | } 48 | 49 | h1, 50 | h2, 51 | h3, 52 | h4, 53 | h5, 54 | h6 { 55 | line-height: 1.2; 56 | } 57 | 58 | h1, 59 | h2, 60 | h3, 61 | h4, 62 | h5, 63 | h6, 64 | p { 65 | margin-top: 0; 66 | margin-bottom: 0; 67 | } 68 | 69 | a { 70 | text-decoration: none; 71 | } 72 | 73 | body, 74 | figure { 75 | margin: 0; 76 | } 77 | 78 | table { 79 | width: 100%; 80 | border-collapse: collapse; 81 | border-spacing: 0; 82 | overflow-x: auto; 83 | word-break: keep-all; 84 | } 85 | 86 | button, 87 | input, 88 | textarea { 89 | padding: 0; 90 | font: inherit; 91 | background: 0 0; 92 | border: 0; 93 | } 94 | 95 | input, 96 | textarea { 97 | outline: 0; 98 | } 99 | 100 | button, 101 | input[type=button], 102 | input[type=submit] { 103 | cursor: pointer; 104 | } 105 | 106 | input:-webkit-autofill, 107 | textarea:-webkit-autofill { 108 | box-shadow: 0 0 0 50px var(--theme) inset; 109 | } 110 | 111 | img { 112 | display: block; 113 | max-width: 100%; 114 | } 115 | 116 | ::-webkit-scrollbar-track { 117 | background: 0 0; 118 | } 119 | 120 | .list-page:not(.dark)::-webkit-scrollbar-track { 121 | background: var(--code-bg); 122 | } 123 | 124 | ::-webkit-scrollbar-thumb { 125 | background: var(--tertiary-bg); 126 | border: 5px solid var(--theme); 127 | border-radius: var(--radius); 128 | } 129 | 130 | .list-page:not(.dark)::-webkit-scrollbar-thumb { 131 | border: 5px solid var(--code-bg); 132 | } 133 | 134 | ::-webkit-scrollbar-thumb:hover { 135 | background: var(--secondary); 136 | } 137 | -------------------------------------------------------------------------------- /assets/css/core/theme-vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --gap: 24px; 3 | --content-gap: 20px; 4 | --nav-width: 960px; 5 | --main-width: 720px; 6 | --post-width: 720px; 7 | --header-height: 60px; 8 | --footer-height: 80px; 9 | --radius: 8px; 10 | --monospace: "Lucida Console", Monaco, "Consolas", monospace; 11 | 12 | --theme: rgb(255, 255, 255); 13 | --entry: rgb(255, 255, 255); 14 | --primary: rgb(30, 30, 30); 15 | --primary-dim: rgb(60, 60, 60); 16 | --secondary: rgb(108, 108, 108); 17 | --tertiary: rgb(158, 158, 158); 18 | --tertiary-bg: rgb(214, 214, 214); 19 | --content: rgb(31, 31, 31); 20 | --code-bg: rgb(245, 245, 245); 21 | --border: rgb(238, 238, 238); 22 | --link-background-color: #e8e3f7; 23 | --link-color: var(--primary); 24 | --link-hover-color: #573eaa; 25 | --link-underline-shadow: 0 1px 0 var(--link-color); 26 | --link-hover-underline-color: #6549c0; 27 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 28 | --link-transition: all 0.3s ease; 29 | --line-yellow: url("data:image/svg+xml;charset=utf-8,%3Csvg preserveAspectRatio='none' width='120' height='6' viewBox='0 0 120 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M119 0.8C60 4 50-0.5 1 1.5' stroke='%23fc0' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); 30 | 31 | /* for type pages theming */ 32 | --signature: var(--primary); 33 | --signature-bg: var(--secondary); 34 | } 35 | @media screen and (max-width: 500px) { 36 | :root { 37 | --header-height: 52px; 38 | } 39 | 40 | } 41 | 42 | .dark { 43 | --theme: rgb(29, 30, 32); 44 | --entry: rgb(46, 46, 51); 45 | --primary: rgb(218, 218, 219); 46 | --primary-dim: rgb(186, 186, 186); 47 | --secondary: rgb(155, 156, 157); 48 | --tertiary: rgb(123, 124, 124); 49 | --tertiary-bg: rgb(65, 66, 68); 50 | --content: rgb(196, 196, 197); 51 | --code-bg: rgb(55, 56, 62); 52 | --border: rgb(51, 51, 51); 53 | --link-background-color: #5242746d; 54 | --link-color: var(--primary); 55 | --link-hover-color: #876fd6; 56 | --link-underline-shadow: 0 1px 0 var(--link-color); 57 | --link-hover-underline-color: var(--link-hover-color); 58 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 59 | 60 | /* for type pages theming */ 61 | --signature: var(--primary); 62 | --signature-bg: var(--secondary); 63 | } 64 | 65 | .list-page { 66 | background: var(--code-bg); 67 | } 68 | 69 | .dark.list-page { 70 | background: var(--theme); 71 | } 72 | -------------------------------------------------------------------------------- /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 | @media screen and (min-width: 768px) { 33 | /* reset */ 34 | ::-webkit-scrollbar { 35 | width: 19px; 36 | height: 11px; 37 | } 38 | } 39 | 40 | /* footer */ 41 | @media screen and (max-width: 900px) { 42 | .list-page .top-link { 43 | transform: translateY(-5rem); 44 | } 45 | } 46 | 47 | @media (prefers-reduced-motion) { 48 | /* terms; profile-mode; post-single; post-entry; post-entry; search; search */ 49 | .terms-tags a:active, 50 | .button:active, 51 | .share-buttons svg:active, 52 | .post-entry:active, 53 | .top-link, 54 | #searchResults .focus, 55 | #searchResults li:active { 56 | transform: none; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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/extended/essays.scss: -------------------------------------------------------------------------------- 1 | /* 2 | color candidates: 3 | #48C0A3 青碧 4 | #519A73 蒼黃 5 | #1BD1A5 碧色 6 | #7BCFA6 玉色 7 | */ 8 | body.type-essays { 9 | --signature: #48C0A3; 10 | --signature-bg: rgba(72, 192, 164, 0.427); 11 | --siguature-bg-dim: rgba(72, 192, 164, 0.298); 12 | // override theme-vars 13 | --link-hover-color: var(--signature); 14 | --link-hover-underline-color: var(--signature); 15 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 16 | --link-background-color: var(--siguature-bg-dim); 17 | 18 | .post-entry { 19 | /* same as .post-header h2 */ 20 | .entry-title { 21 | font-size: 24px; 22 | line-height: 1.3; 23 | margin-bottom: calc(var(--content-gap) / 2); 24 | a { 25 | color: var(--primary); 26 | transition: var(--link-transition); 27 | &:hover { 28 | color: var(--link-hover-color); 29 | box-shadow: var(--link-hover-underline-shadow); 30 | } 31 | } 32 | } 33 | .post-meta { 34 | margin-bottom: var(--content-gap); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /assets/css/lib/chroma-dark.css: -------------------------------------------------------------------------------- 1 | /* Background */ .chroma { color: #f8f8f2; background-color: #282a36 } 2 | /* Other */ .chroma .x { } 3 | /* Error */ .chroma .err { } 4 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 5 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } 6 | /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } 7 | /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 8 | /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 9 | /* Keyword */ .chroma .k { color: #ff79c6 } 10 | /* KeywordConstant */ .chroma .kc { color: #ff79c6 } 11 | /* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } 12 | /* KeywordNamespace */ .chroma .kn { color: #ff79c6 } 13 | /* KeywordPseudo */ .chroma .kp { color: #ff79c6 } 14 | /* KeywordReserved */ .chroma .kr { color: #ff79c6 } 15 | /* KeywordType */ .chroma .kt { color: #8be9fd } 16 | /* Name */ .chroma .n { } 17 | /* NameAttribute */ .chroma .na { color: #50fa7b } 18 | /* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } 19 | /* NameBuiltinPseudo */ .chroma .bp { } 20 | /* NameClass */ .chroma .nc { color: #50fa7b } 21 | /* NameConstant */ .chroma .no { } 22 | /* NameDecorator */ .chroma .nd { } 23 | /* NameEntity */ .chroma .ni { } 24 | /* NameException */ .chroma .ne { } 25 | /* NameFunction */ .chroma .nf { color: #50fa7b } 26 | /* NameFunctionMagic */ .chroma .fm { } 27 | /* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } 28 | /* NameNamespace */ .chroma .nn { } 29 | /* NameOther */ .chroma .nx { } 30 | /* NameProperty */ .chroma .py { } 31 | /* NameTag */ .chroma .nt { color: #ff79c6 } 32 | /* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } 33 | /* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } 34 | /* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } 35 | /* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } 36 | /* NameVariableMagic */ .chroma .vm { } 37 | /* Literal */ .chroma .l { } 38 | /* LiteralDate */ .chroma .ld { } 39 | /* LiteralString */ .chroma .s { color: #f1fa8c } 40 | /* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } 41 | /* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } 42 | /* LiteralStringChar */ .chroma .sc { color: #f1fa8c } 43 | /* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } 44 | /* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } 45 | /* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } 46 | /* LiteralStringEscape */ .chroma .se { color: #f1fa8c } 47 | /* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } 48 | /* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } 49 | /* LiteralStringOther */ .chroma .sx { color: #f1fa8c } 50 | /* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } 51 | /* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } 52 | /* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } 53 | /* LiteralNumber */ .chroma .m { color: #bd93f9 } 54 | /* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } 55 | /* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } 56 | /* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } 57 | /* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } 58 | /* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } 59 | /* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } 60 | /* Operator */ .chroma .o { color: #ff79c6 } 61 | /* OperatorWord */ .chroma .ow { color: #ff79c6 } 62 | /* Punctuation */ .chroma .p { } 63 | /* Comment */ .chroma .c { color: #6272a4 } 64 | /* CommentHashbang */ .chroma .ch { color: #6272a4 } 65 | /* CommentMultiline */ .chroma .cm { color: #6272a4 } 66 | /* CommentSingle */ .chroma .c1 { color: #6272a4 } 67 | /* CommentSpecial */ .chroma .cs { color: #6272a4 } 68 | /* CommentPreproc */ .chroma .cp { color: #ff79c6 } 69 | /* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } 70 | /* Generic */ .chroma .g { } 71 | /* GenericDeleted */ .chroma .gd { color: #ff5555 } 72 | /* GenericEmph */ .chroma .ge { text-decoration: underline } 73 | /* GenericError */ .chroma .gr { } 74 | /* GenericHeading */ .chroma .gh { font-weight: bold } 75 | /* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold } 76 | /* GenericOutput */ .chroma .go { color: #44475a } 77 | /* GenericPrompt */ .chroma .gp { } 78 | /* GenericStrong */ .chroma .gs { } 79 | /* GenericSubheading */ .chroma .gu { font-weight: bold } 80 | /* GenericTraceback */ .chroma .gt { } 81 | /* GenericUnderline */ .chroma .gl { text-decoration: underline } 82 | /* TextWhitespace */ .chroma .w { } 83 | -------------------------------------------------------------------------------- /assets/css/lib/chroma-light.css: -------------------------------------------------------------------------------- 1 | /* Background */ .chroma { background-color: #ffffff } 2 | /* Other */ .chroma .x { } 3 | /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } 4 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 5 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } 6 | /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } 7 | /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 8 | /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 9 | /* Keyword */ .chroma .k { color: #000000; font-weight: bold } 10 | /* KeywordConstant */ .chroma .kc { color: #000000; font-weight: bold } 11 | /* KeywordDeclaration */ .chroma .kd { color: #000000; font-weight: bold } 12 | /* KeywordNamespace */ .chroma .kn { color: #000000; font-weight: bold } 13 | /* KeywordPseudo */ .chroma .kp { color: #000000; font-weight: bold } 14 | /* KeywordReserved */ .chroma .kr { color: #000000; font-weight: bold } 15 | /* KeywordType */ .chroma .kt { color: #445588; font-weight: bold } 16 | /* Name */ .chroma .n { } 17 | /* NameAttribute */ .chroma .na { color: #008080 } 18 | /* NameBuiltin */ .chroma .nb { color: #0086b3 } 19 | /* NameBuiltinPseudo */ .chroma .bp { color: #999999 } 20 | /* NameClass */ .chroma .nc { color: #445588; font-weight: bold } 21 | /* NameConstant */ .chroma .no { color: #008080 } 22 | /* NameDecorator */ .chroma .nd { color: #3c5d5d; font-weight: bold } 23 | /* NameEntity */ .chroma .ni { color: #800080 } 24 | /* NameException */ .chroma .ne { color: #990000; font-weight: bold } 25 | /* NameFunction */ .chroma .nf { color: #990000; font-weight: bold } 26 | /* NameFunctionMagic */ .chroma .fm { } 27 | /* NameLabel */ .chroma .nl { color: #990000; font-weight: bold } 28 | /* NameNamespace */ .chroma .nn { color: #555555 } 29 | /* NameOther */ .chroma .nx { } 30 | /* NameProperty */ .chroma .py { } 31 | /* NameTag */ .chroma .nt { color: #000080 } 32 | /* NameVariable */ .chroma .nv { color: #008080 } 33 | /* NameVariableClass */ .chroma .vc { color: #008080 } 34 | /* NameVariableGlobal */ .chroma .vg { color: #008080 } 35 | /* NameVariableInstance */ .chroma .vi { color: #008080 } 36 | /* NameVariableMagic */ .chroma .vm { } 37 | /* Literal */ .chroma .l { } 38 | /* LiteralDate */ .chroma .ld { } 39 | /* LiteralString */ .chroma .s { color: #dd1144 } 40 | /* LiteralStringAffix */ .chroma .sa { color: #dd1144 } 41 | /* LiteralStringBacktick */ .chroma .sb { color: #dd1144 } 42 | /* LiteralStringChar */ .chroma .sc { color: #dd1144 } 43 | /* LiteralStringDelimiter */ .chroma .dl { color: #dd1144 } 44 | /* LiteralStringDoc */ .chroma .sd { color: #dd1144 } 45 | /* LiteralStringDouble */ .chroma .s2 { color: #dd1144 } 46 | /* LiteralStringEscape */ .chroma .se { color: #dd1144 } 47 | /* LiteralStringHeredoc */ .chroma .sh { color: #dd1144 } 48 | /* LiteralStringInterpol */ .chroma .si { color: #dd1144 } 49 | /* LiteralStringOther */ .chroma .sx { color: #dd1144 } 50 | /* LiteralStringRegex */ .chroma .sr { color: #009926 } 51 | /* LiteralStringSingle */ .chroma .s1 { color: #dd1144 } 52 | /* LiteralStringSymbol */ .chroma .ss { color: #990073 } 53 | /* LiteralNumber */ .chroma .m { color: #009999 } 54 | /* LiteralNumberBin */ .chroma .mb { color: #009999 } 55 | /* LiteralNumberFloat */ .chroma .mf { color: #009999 } 56 | /* LiteralNumberHex */ .chroma .mh { color: #009999 } 57 | /* LiteralNumberInteger */ .chroma .mi { color: #009999 } 58 | /* LiteralNumberIntegerLong */ .chroma .il { color: #009999 } 59 | /* LiteralNumberOct */ .chroma .mo { color: #009999 } 60 | /* Operator */ .chroma .o { color: #000000; font-weight: bold } 61 | /* OperatorWord */ .chroma .ow { color: #000000; font-weight: bold } 62 | /* Punctuation */ .chroma .p { } 63 | /* Comment */ .chroma .c { color: #999988; font-style: italic } 64 | /* CommentHashbang */ .chroma .ch { color: #999988; font-style: italic } 65 | /* CommentMultiline */ .chroma .cm { color: #999988; font-style: italic } 66 | /* CommentSingle */ .chroma .c1 { color: #999988; font-style: italic } 67 | /* CommentSpecial */ .chroma .cs { color: #999999; font-weight: bold; font-style: italic } 68 | /* CommentPreproc */ .chroma .cp { color: #999999; font-weight: bold; font-style: italic } 69 | /* CommentPreprocFile */ .chroma .cpf { color: #999999; font-weight: bold; font-style: italic } 70 | /* Generic */ .chroma .g { } 71 | /* GenericDeleted */ .chroma .gd { color: #000000; background-color: #ffdddd } 72 | /* GenericEmph */ .chroma .ge { color: #000000; font-style: italic } 73 | /* GenericError */ .chroma .gr { color: #aa0000 } 74 | /* GenericHeading */ .chroma .gh { color: #999999 } 75 | /* GenericInserted */ .chroma .gi { color: #000000; background-color: #ddffdd } 76 | /* GenericOutput */ .chroma .go { color: #888888 } 77 | /* GenericPrompt */ .chroma .gp { color: #555555 } 78 | /* GenericStrong */ .chroma .gs { font-weight: bold } 79 | /* GenericSubheading */ .chroma .gu { color: #aaaaaa } 80 | /* GenericTraceback */ .chroma .gt { color: #aa0000 } 81 | /* GenericUnderline */ .chroma .gl { text-decoration: underline } 82 | /* TextWhitespace */ .chroma .w { color: #bbbbbb } 83 | -------------------------------------------------------------------------------- /assets/js/fastsearch.js: -------------------------------------------------------------------------------- 1 | import * as params from '@params'; 2 | 3 | var fuse; // holds our search engine 4 | var resList = document.getElementById('searchResults'); 5 | var sInput = document.getElementById('searchInput'); 6 | var first, last, current_elem = null 7 | var resultsAvailable = false; 8 | 9 | // load our search index 10 | window.onload = function () { 11 | var xhr = new XMLHttpRequest(); 12 | xhr.onreadystatechange = function () { 13 | if (xhr.readyState === 4) { 14 | if (xhr.status === 200) { 15 | var data = JSON.parse(xhr.responseText); 16 | if (data) { 17 | // fuse.js options; check fuse.js website for details 18 | var 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 ? params.fuseOpts.iscasesensitive : false, 32 | includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false, 33 | includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false, 34 | minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1, 35 | shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true, 36 | findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false, 37 | keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'], 38 | location: params.fuseOpts.location ? params.fuseOpts.location : 0, 39 | threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4, 40 | distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100, 41 | ignoreLocation: params.fuseOpts.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 | const results = fuse.search(this.value.trim()); // the actual query being run using fuse.js 81 | if (results.length !== 0) { 82 | // build our html if result exists 83 | let resultSet = ''; // our results bucket 84 | 85 | for (let item in results) { 86 | resultSet += `
  • ${results[item].item.title} »
    ` + 87 | `
  • ` 88 | } 89 | 90 | resList.innerHTML = resultSet; 91 | resultsAvailable = true; 92 | first = resList.firstChild; 93 | last = resList.lastChild; 94 | } else { 95 | resultsAvailable = false; 96 | resList.innerHTML = ''; 97 | } 98 | } 99 | } 100 | 101 | sInput.addEventListener('search', function (e) { 102 | // clicked on x 103 | if (!this.value) reset() 104 | }) 105 | 106 | // kb bindings 107 | document.onkeydown = function (e) { 108 | let key = e.key; 109 | var ae = document.activeElement; 110 | 111 | let inbox = document.getElementById("searchbox").contains(ae) 112 | 113 | if (ae === sInput) { 114 | var elements = document.getElementsByClassName('focus'); 115 | while (elements.length > 0) { 116 | elements[0].classList.remove('focus'); 117 | } 118 | } else if (current_elem) ae = current_elem; 119 | 120 | if (key === "Escape") { 121 | reset() 122 | } else if (!resultsAvailable || !inbox) { 123 | return 124 | } else if (key === "ArrowDown") { 125 | e.preventDefault(); 126 | if (ae == sInput) { 127 | // if the currently focused element is the search input, focus the of first
  • 128 | activeToggle(resList.firstChild.lastChild); 129 | } else if (ae.parentElement != last) { 130 | // if the currently focused element's parent is last, do nothing 131 | // otherwise select the next search result 132 | activeToggle(ae.parentElement.nextSibling.lastChild); 133 | } 134 | } else if (key === "ArrowUp") { 135 | e.preventDefault(); 136 | if (ae.parentElement == first) { 137 | // if the currently focused element is first item, go to input box 138 | activeToggle(sInput); 139 | } else if (ae != sInput) { 140 | // if the currently focused element is input box, do nothing 141 | // otherwise select the previous search result 142 | activeToggle(ae.parentElement.previousSibling.lastChild); 143 | } 144 | } else if (key === "ArrowRight") { 145 | ae.click(); // click on active link 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /assets/js/instantclick.min.js: -------------------------------------------------------------------------------- 1 | /* InstantClick 3.1.0 | (C) 2014 Alexandre Dieulot | http://instantclick.io/license */ 2 | var InstantClick=function(d,e){function w(a){var b=a.indexOf("#");return 0>b?a:a.substr(0,b)}function z(a){for(;a&&"A"!=a.nodeName;)a=a.parentNode;return a}function A(a){var b=e.protocol+"//"+e.host;if(!(b=a.target||a.hasAttribute("download")||0!=a.href.indexOf(b+"/")||-1+new Date-500||(a=z(a.target))&&A(a)&&x(a.href)}function N(a){G>+new Date-500||(a=z(a.target))&&A(a)&&(a.addEventListener("mouseout",T),H?(O=a.href,l=setTimeout(x,H)):x(a.href))}function U(a){G=+new Date;(a=z(a.target))&&A(a)&&(D?a.removeEventListener("mousedown", 5 | M):a.removeEventListener("mouseover",N),x(a.href))}function V(a){var b=z(a.target);!b||!A(b)||1p.readyState)&&0!=p.status){q.ready=+new Date-q.start;if(p.getResponseHeader("Content-Type").match(/\/(x|ht|xht)ml/)){var a=d.implementation.createHTMLDocument("");a.documentElement.innerHTML=p.responseText.replace(//gi,"");y=a.title; 6 | u=a.body;var b=t("receive",r,u,y);b&&("body"in b&&(u=b.body),"title"in b&&(y=b.title));b=w(r);h[b]={body:u,title:y,scrollY:b in h?h[b].scrollY:0};for(var a=a.head.children,b=0,c,g=a.length-1;0<=g;g--)if(c=a[g],c.hasAttribute("data-instant-track")){c=c.getAttribute("href")||c.getAttribute("src")||c.innerHTML;for(var e=E.length-1;0<=e;e--)E[e]==c&&b++}b!=E.length&&(F=!0)}else F=!0;m&&(m=!1,P(r))}}function L(a){d.body.addEventListener("touchstart",U,!0);D?d.body.addEventListener("mousedown",M,!0):d.body.addEventListener("mouseover", 7 | N,!0);d.body.addEventListener("click",V,!0);if(!a){a=d.body.getElementsByTagName("script");var b,c,g,e;i=0;for(j=a.length;i+new Date-(q.start+q.display)||(l&&(clearTimeout(l),l=!1),a||(a=O),v&&(a==r||m))||(v=!0,m=!1,r=a,F=u=!1,q={start:+new Date},t("fetch"), 8 | p.open("GET",a),p.send())}function P(a){"display"in q||(q.display=+new Date-q.start);l||!v?l&&r&&r!=a?e.href=a:(x(a),C.start(0,!0),t("wait"),m=!0):m?e.href=a:F?e.href=r:u?(h[k].scrollY=pageYOffset,m=v=!1,K(y,u,r)):(C.start(0,!0),t("wait"),m=!0)}var I=navigator.userAgent,S=-1b;b++)a[b]+"Transform"in h.style&&(k=a[b]+"Transform");var c="transition";if(!(c in h.style))for(b=0;3>b;b++)a[b]+"Transition"in 11 | h.style&&(c="-"+a[b].toLowerCase()+"-"+c);a=d.createElement("style");a.innerHTML="#instantclick{position:"+(Q?"absolute":"fixed")+";top:0;left:0;width:100%;pointer-events:none;z-index:2147483647;"+c+":opacity .25s .1s}.instantclick-bar{background:#29d;width:100%;margin-left:-100%;height:2px;"+c+":all .25s}";d.head.appendChild(a);Q&&(m(),addEventListener("resize",m),addEventListener("scroll",m))},start:a,done:e}}(),R="pushState"in history&&(!I.match("Android")||I.match("Chrome/"))&&"file:"!=e.protocol; 12 | return{supported:R,init:function(){if(!k)if(R){for(var a=arguments.length-1;0<=a;a--){var b=arguments[a];!0===b?J=!0:"mousedown"==b?D=!0:"number"==typeof b&&(H=b)}k=w(e.href);h[k]={body:d.body,title:d.title,scrollY:pageYOffset};for(var b=d.head.children,c,a=b.length-1;0<=a;a--)c=b[a],c.hasAttribute("data-instant-track")&&(c=c.getAttribute("href")||c.getAttribute("src")||c.innerHTML,E.push(c));p=new XMLHttpRequest;p.addEventListener("readystatechange",W);L(!0);C.init();t("change",!0);addEventListener("popstate", 13 | function(){var a=w(e.href);a!=k&&(a in h?(h[k].scrollY=pageYOffset,k=a,K(h[a].title,h[a].body,!1,h[a].scrollY)):e.href=e.href)})}else t("change",!0)},on:function(a,b){B[a].push(b)}}}(document,location); 14 | -------------------------------------------------------------------------------- /exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | 25 | public/ 26 | resources/ 27 | .DS_Store 28 | .hugo_build.lock 29 | -------------------------------------------------------------------------------- /exampleSite/README.md: -------------------------------------------------------------------------------- 1 | # hugo-PaperModX Example 2 | 3 | This repository offers an example site for [hugo-PaperModX](https://github.com/reorx/hugo-PaperModX) 4 | -------------------------------------------------------------------------------- /exampleSite/assets/images/regular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/exampleSite/assets/images/regular.jpg -------------------------------------------------------------------------------- /exampleSite/config.default.yml: -------------------------------------------------------------------------------- 1 | baseURL: "https://reorx.github.io/hugo-PaperModX/" 2 | title: PaperModX 3 | paginate: 5 4 | theme: PaperModX 5 | # NOTE remove this line if you copy exampleSite outof hugo-PaperModX 6 | themesdir: ../.. 7 | 8 | enableInlineShortcodes: true 9 | enableRobotsTXT: true 10 | buildDrafts: false 11 | buildFuture: false 12 | buildExpired: false 13 | enableEmoji: true 14 | 15 | params: 16 | env: production # to enable google analytics, opengraph, twitter-cards and schema. 17 | description: "Theme PaperModX - https://github.com/reorx/hugo-PaperModX" 18 | author: 19 | - Reorx 20 | mainSections: 21 | - docs 22 | - posts 23 | disableAnchoredHeadings: true 24 | images: ["cover.png"] 25 | DateFormat: "2006-01-02" 26 | useCustomAnalytics: true 27 | 28 | defaultTheme: auto 29 | # disableThemeToggle: true 30 | ShowShareButtons: true 31 | ShowReadingTime: true 32 | ShowWordCount: true 33 | # disableSpecial1stPost: true 34 | displayFullLangName: true 35 | ShowPostNavLinks: true 36 | ShowBreadCrumbs: true 37 | ShowCodeCopyButtons: true 38 | ShowToc: true 39 | TocOpen: true 40 | TocSide: "right" 41 | EnableInstantClick: true 42 | EnableImageZoom: true 43 | 44 | commentSystems: 45 | disqus: 46 | shortname: reorx 47 | remark42: 48 | url: https://remark42.reorx.com 49 | site: reorx.github.io 50 | telegramWidget: 51 | channel: reorx_share 52 | accentColor: "9077e1" 53 | limit: 20 54 | defaultCommentSystems: 55 | remark42: true 56 | 57 | profileMode: 58 | enabled: false 59 | title: PaperModX 60 | imageUrl: "#" 61 | imageTitle: my image 62 | # imageWidth: 120 63 | # imageHeight: 120 64 | buttons: 65 | - name: Archives 66 | url: /archives/ 67 | - name: Tags 68 | url: /tags/ 69 | 70 | homeInfoParams: 71 | Title: "PaperModX" 72 | Content: | 73 | Welcome to demo of hugo's theme PaperModX. 74 | 75 | - **PaperModX** is a simple but fast and responsive theme with useful feature-set that enhances UX. 76 | 77 | - PaperModX is based on theme [PaperMod](https://github.com/adityatelange/hugo-PaperMod). 78 | 79 | To get started, please head to the [Docs](docs). 80 | 81 | To see examples of different contents, head to [examples tag](tags/example). 82 | 83 | socialIcons: 84 | - name: github-simple 85 | url: "https://github.com/reorx/hugo-PaperModX" 86 | - name: rss-simple 87 | url: "index.xml" 88 | 89 | editPost: 90 | URL: "https://github.com/reorx/hugo-PaperModX/tree/exampleSite/content" 91 | Text: "Suggest Changes" # edit text 92 | appendFilePath: true # to append file path to Edit link 93 | 94 | # label: 95 | # text: "Home" 96 | # icon: icon.png 97 | # iconHeight: 35 98 | 99 | # assets: 100 | # favicon: "" 101 | # favicon16x16: "" 102 | # favicon32x32: "" 103 | # apple_touch_icon: "" 104 | # safari_pinned_tab: "" 105 | 106 | # cover: 107 | # hidden: true # hide everywhere but not in structured data 108 | # hiddenInList: true # hide on list pages and home 109 | # hiddenInSingle: true # hide on single page 110 | 111 | # fuseOpts: 112 | # isCaseSensitive: false 113 | # shouldSort: true 114 | # location: 0 115 | # distance: 1000 116 | # threshold: 0.4 117 | # minMatchCharLength: 0 118 | # keys: ["title", "permalink", "summary", "content"] 119 | 120 | minify: 121 | disableXML: true 122 | # minifyOutput: true 123 | 124 | languages: 125 | en: 126 | languageName: "English" 127 | weight: 1 128 | menu: 129 | main: 130 | - name: Docs 131 | url: /docs/ 132 | weight: 1 133 | - name: Newsletter 134 | url: /newsletter/ 135 | weight: 1 136 | - name: Tags 137 | url: /tags/ 138 | weight: 4 139 | - name: Archive 140 | url: /archives/ 141 | weight: 5 142 | - name: Search 143 | url: /search/ 144 | weight: 10 145 | - name: "@Author" 146 | url: "https://reorx.com" 147 | params: 148 | external: true 149 | 150 | zh: 151 | languageName: ":cn:" 152 | languageAltTitle: 中文 153 | weight: 2 154 | title: PaperModX 155 | profileMode: 156 | enabled: true 157 | title: PaperModX 158 | # imageUrl: "#" 159 | # imageTitle: my image 160 | # imageWidth: 120 161 | # imageHeight: 120 162 | subtitle: > 163 |

    Hugo 主题

    164 | ☄️ 快速 | ☁️ 流畅 | 📖 可读性 | 📱 响应式 165 | buttons: 166 | - name: 文档 167 | url: docs 168 | - name: 标签 169 | url: tags 170 | menu: 171 | main: 172 | - name: 文档 173 | url: docs 174 | weight: 1 175 | - name: 标签 176 | url: tags/ 177 | weight: 4 178 | - name: 归档 179 | url: archives 180 | weight: 5 181 | - name: 搜索 182 | url: search/ 183 | weight: 10 184 | - name: "@作者" 185 | url: "https://reorx.com" 186 | params: 187 | external: true 188 | 189 | outputs: 190 | home: 191 | - HTML 192 | - RSS 193 | - JSON 194 | 195 | taxonomies: 196 | category: categories 197 | tag: tags 198 | series: series 199 | 200 | markup: 201 | goldmark: 202 | renderer: 203 | unsafe: true 204 | highlight: 205 | style: dracula 206 | lineNos: false 207 | noClasses: false 208 | 209 | privacy: 210 | vimeo: 211 | disabled: false 212 | simple: true 213 | 214 | twitter: 215 | disabled: false 216 | enableDNT: true 217 | simple: true 218 | 219 | instagram: 220 | disabled: false 221 | simple: true 222 | 223 | youtube: 224 | disabled: false 225 | privacyEnhanced: true 226 | 227 | services: 228 | instagram: 229 | disableInlineCSS: true 230 | twitter: 231 | disableInlineCSS: true 232 | -------------------------------------------------------------------------------- /exampleSite/config.profileMode.yml: -------------------------------------------------------------------------------- 1 | baseURL: "https://reorx.github.io/hugo-PaperModX/" 2 | title: PaperModX 3 | paginate: 5 4 | theme: PaperModX 5 | # NOTE remove this line if you copy exampleSite outof hugo-PaperModX 6 | themesdir: ../.. 7 | 8 | enableInlineShortcodes: true 9 | enableRobotsTXT: true 10 | buildDrafts: false 11 | buildFuture: false 12 | buildExpired: false 13 | enableEmoji: true 14 | 15 | params: 16 | env: production # to enable google analytics, opengraph, twitter-cards and schema. 17 | description: "Theme PaperModX - https://github.com/reorx/hugo-PaperModX" 18 | author: 19 | - Reorx 20 | mainSections: 21 | - docs 22 | - posts 23 | disableAnchoredHeadings: true 24 | images: ["cover.png"] 25 | DateFormat: "2006-01-02" 26 | useCustomAnalytics: true 27 | 28 | defaultTheme: auto 29 | # disableThemeToggle: true 30 | ShowShareButtons: true 31 | ShowReadingTime: true 32 | ShowWordCount: true 33 | # disableSpecial1stPost: true 34 | displayFullLangName: true 35 | ShowPostNavLinks: true 36 | ShowBreadCrumbs: true 37 | ShowCodeCopyButtons: true 38 | ShowToc: true 39 | TocOpen: true 40 | TocSide: "right" 41 | EnableInstantClick: true 42 | EnableImageZoom: true 43 | 44 | commentSystems: 45 | disqus: 46 | shortname: reorx 47 | remark42: 48 | url: https://remark42.reorx.com 49 | site: reorx.github.io 50 | telegramWidget: 51 | channel: reorx_share 52 | accentColor: "9077e1" 53 | limit: 20 54 | defaultCommentSystems: 55 | remark42: true 56 | 57 | profileMode: 58 | enabled: true 59 | title: PaperModX 60 | # imageUrl: "#" 61 | # imageTitle: my image 62 | # imageWidth: 120 63 | # imageHeight: 120 64 | subtitle: > 65 |

    Hugo 主题

    66 | ☄️ 快速 | ☁️ 流畅 | 📖 可读性 | 📱 响应式 67 | buttons: 68 | - name: 文档 69 | url: docs 70 | - name: 标签 71 | url: tags 72 | 73 | homeInfoParams: 74 | Title: "PaperModX" 75 | Content: | 76 | Welcome to demo of hugo's theme PaperModX. 77 | 78 | - **PaperModX** is a simple but fast and responsive theme with useful feature-set that enhances UX. 79 | 80 | - PaperModX is based on theme [PaperMod](https://github.com/adityatelange/hugo-PaperMod). 81 | 82 | To get started, please head to the [Docs](docs). 83 | 84 | To see examples of different contents, head to [examples tag](tags/example). 85 | 86 | socialIcons: 87 | - name: github-simple 88 | url: "https://github.com/reorx/hugo-PaperModX" 89 | - name: rss-simple 90 | url: "index.xml" 91 | 92 | editPost: 93 | URL: "https://github.com/reorx/hugo-PaperModX/tree/exampleSite/content" 94 | Text: "Suggest Changes" # edit text 95 | appendFilePath: true # to append file path to Edit link 96 | 97 | # label: 98 | # text: "Home" 99 | # icon: icon.png 100 | # iconHeight: 35 101 | 102 | # assets: 103 | # favicon: "" 104 | # favicon16x16: "" 105 | # favicon32x32: "" 106 | # apple_touch_icon: "" 107 | # safari_pinned_tab: "" 108 | 109 | # cover: 110 | # hidden: true # hide everywhere but not in structured data 111 | # hiddenInList: true # hide on list pages and home 112 | # hiddenInSingle: true # hide on single page 113 | 114 | # fuseOpts: 115 | # isCaseSensitive: false 116 | # shouldSort: true 117 | # location: 0 118 | # distance: 1000 119 | # threshold: 0.4 120 | # minMatchCharLength: 0 121 | # keys: ["title", "permalink", "summary", "content"] 122 | 123 | minify: 124 | disableXML: true 125 | # minifyOutput: true 126 | 127 | languages: 128 | en: 129 | languageName: "English" 130 | weight: 1 131 | menu: 132 | main: 133 | - name: Docs 134 | url: /docs/ 135 | weight: 1 136 | - name: Tags 137 | url: /tags/ 138 | weight: 4 139 | - name: Archive 140 | url: /archives/ 141 | weight: 5 142 | - name: Search 143 | url: /search/ 144 | weight: 10 145 | - name: "@Author" 146 | url: "https://reorx.com" 147 | params: 148 | external: true 149 | 150 | zh: 151 | languageName: ":cn:" 152 | languageAltTitle: 中文 153 | weight: 2 154 | title: PaperModX 155 | menu: 156 | main: 157 | - name: 文档 158 | url: docs 159 | weight: 1 160 | - name: 标签 161 | url: tags/ 162 | weight: 4 163 | - name: 归档 164 | url: archives 165 | weight: 5 166 | - name: 搜索 167 | url: search/ 168 | weight: 10 169 | - name: "@作者" 170 | url: "https://reorx.com" 171 | params: 172 | external: true 173 | 174 | outputs: 175 | home: 176 | - HTML 177 | - RSS 178 | - JSON 179 | 180 | taxonomies: 181 | category: categories 182 | tag: tags 183 | series: series 184 | 185 | markup: 186 | goldmark: 187 | renderer: 188 | unsafe: true 189 | highlight: 190 | style: dracula 191 | lineNos: false 192 | noClasses: false 193 | 194 | privacy: 195 | vimeo: 196 | disabled: false 197 | simple: true 198 | 199 | twitter: 200 | disabled: false 201 | enableDNT: true 202 | simple: true 203 | 204 | instagram: 205 | disabled: false 206 | simple: true 207 | 208 | youtube: 209 | disabled: false 210 | privacyEnhanced: true 211 | 212 | services: 213 | instagram: 214 | disableInlineCSS: true 215 | twitter: 216 | disableInlineCSS: true 217 | -------------------------------------------------------------------------------- /exampleSite/config.yml: -------------------------------------------------------------------------------- 1 | config.default.yml -------------------------------------------------------------------------------- /exampleSite/configTaxo.yml: -------------------------------------------------------------------------------- 1 | timeout: 30000 2 | enableInlineShortcodes: true 3 | 4 | taxonomies: 5 | category: categories 6 | tag: tags 7 | series: series 8 | 9 | privacy: 10 | vimeo: 11 | disabled: false 12 | simple: true 13 | 14 | twitter: 15 | disabled: false 16 | enableDNT: true 17 | simple: true 18 | disableInlineCSS: true 19 | 20 | instagram: 21 | disabled: false 22 | simple: true 23 | 24 | youtube: 25 | disabled: false 26 | privacyEnhanced: true 27 | -------------------------------------------------------------------------------- /exampleSite/content/archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Archives 3 | layout: archives 4 | --- 5 | -------------------------------------------------------------------------------- /exampleSite/content/archives.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 归档 3 | layout: archives 4 | --- 5 | -------------------------------------------------------------------------------- /exampleSite/content/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: PaperModX Docs 3 | summary: Contains documentations of PaperModX 4 | description: Contains documentations of PaperModX 5 | paginate: 10 6 | --- 7 | -------------------------------------------------------------------------------- /exampleSite/content/docs/_index.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: PaperModX 文档 3 | summary: 包含 PaperModX 的功能介绍和详细用法说明 4 | description: 包含 PaperModX 的功能介绍和详细用法说明 5 | paginate: 10 6 | --- 7 | -------------------------------------------------------------------------------- /exampleSite/content/docs/archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Docs Archives" 3 | layout: archives 4 | hidden: true 5 | --- 6 | -------------------------------------------------------------------------------- /exampleSite/content/docs/emoji-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Emoji Support" 3 | date: "2019-03-05" 4 | description: "Guide to emoji usage in Hugo" 5 | author: "Hugo Authors" 6 | tags: 7 | - example 8 | ShowToc: false 9 | ShowBreadCrumbs: false 10 | --- 11 | 12 | Emoji can be enabled in a Hugo project in a number of ways. 13 | 14 | 15 | 16 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 17 | 18 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 19 | 20 |

    🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

    21 |
    22 | 23 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 24 | 25 | --- 26 | 27 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 28 | 29 | {{< highlight html >}} 30 | .emoji { 31 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 32 | } 33 | {{< /highlight >}} 34 | 35 | {{< css.inline >}} 36 | 37 | 50 | 51 | {{< /css.inline >}} 52 | -------------------------------------------------------------------------------- /exampleSite/content/docs/features/images/homeinfo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/exampleSite/content/docs/features/images/homeinfo.jpg -------------------------------------------------------------------------------- /exampleSite/content/docs/features/images/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/exampleSite/content/docs/features/images/profile.jpg -------------------------------------------------------------------------------- /exampleSite/content/docs/features/images/regular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/exampleSite/content/docs/features/images/regular.jpg -------------------------------------------------------------------------------- /exampleSite/content/docs/icons.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Icons" 3 | summary: Explain how to use icons in PaperModX 4 | date: 2021-01-20 5 | tags: 6 | - icons 7 | --- 8 | 9 | ## Social Icons 10 | 11 | Go to [Icons Preview](icons_preview) to see a complete list of icons 12 | 13 | Usage : 14 | 15 | ``` 16 | socialIcons: 17 | - name: "kofi" 18 | url: "https://kofi.com" 19 | - name: "twitter" 20 | url: "https://twitter.com" 21 | ``` 22 | 23 | --- 24 | 25 | ## Share Icons 26 | 27 | | No. | Platform | 28 | | --- | --------------------------------------------------------------- | 29 | | 1 | `twitter` (also generates hash tags from tags linked with post) | 30 | | 2 | `linkedin` | 31 | | 3 | `reddit` | 32 | | 4 | `facebook` | 33 | | 5 | `whatsapp` | 34 | | 6 | `telegram` | 35 | 36 | Usage: 37 | 38 | ```yml 39 | params: 40 | ShowShareButtons: true 41 | ``` 42 | -------------------------------------------------------------------------------- /exampleSite/content/docs/icons_preview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Icons Preview" 3 | date: 2022-04-13 4 | summary: "Index of all icons in PaperModeX" 5 | layout: icons 6 | weight: 2 7 | tags: 8 | - example 9 | --- 10 | -------------------------------------------------------------------------------- /exampleSite/content/docs/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Math Typesetting 3 | date: 2019-03-08 4 | author: Hugo Authors 5 | description: A brief guide to setup KaTeX 6 | tags: 7 | - math 8 | - syntax 9 | - example 10 | math: true 11 | ShowBreadCrumbs: false 12 | --- 13 | 14 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 15 | 16 | 17 | 18 | In this example we will be using [KaTeX](https://katex.org/) 19 | 20 | - Create a partial under `/layouts/partials/math.html` 21 | - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. 22 | - Include the partial in your templates ([`extend_head.html`](../faq/#custom-head--footer)) like so: 23 | - refer [ISSUE #236](https://github.com/adityatelange/hugo-PaperMod/issues/236) 24 | 25 | ```bash 26 | {{ if or .Params.math .Site.Params.math }} 27 | {{ partial "math.html" . }} 28 | {{ end }} 29 | ``` 30 | 31 | - To enable KaTex globally set the parameter `math` to `true` in a project's configuration 32 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 33 | 34 | **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) 35 | 36 | {{< math.inline >}} 37 | {{ if or .Page.Params.math .Site.Params.math }} 38 | 39 | 40 | 41 | 42 | 43 | {{ end }} 44 | {{}} 45 | 46 | ### Examples 47 | 48 | {{< math.inline >}} 49 | 50 |

    51 | Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) 52 |

    53 | {{}} 54 | 55 | Block math: 56 | 57 | $$ 58 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 59 | $$ 60 | -------------------------------------------------------------------------------- /exampleSite/content/docs/papermodx-new-features.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "PaperModX New Features" 3 | date: 2022-04-12T23:37:00+08:00 4 | summary: This page explains the new features and changes of PaperModX comparing to the original PaperMod. 5 | weight: 1 6 | --- 7 | 8 | 9 | This page explains the new features and changes of PaperModX 10 | comparing to the original PaperMod. 11 | 12 | 13 | ## Table of Contents (ToC) floating on the side 14 | 15 | By adding config: 16 | 17 | ```yaml 18 | params: 19 | TocSide: 'left' # or 'right' 20 | ``` 21 | 22 | ToC will float on the left/right side of the page. 23 | You can take a look at how `'right'` feels like in [Installation | Update](https://reorx.github.io/hugo-PaperModX/docs/installation/). 24 | 25 | The ToC box is responsive, it only shows on the side when minimum screen size is 1440px. 26 | 27 | This feature is enabled on this site. 28 | 29 | 30 | ## InstantClick integration 31 | 32 | By adding config: 33 | 34 | ```yaml 35 | params: 36 | EnableInstantClick: true 37 | ``` 38 | 39 | [InstantClick](http://instantclick.io/) will be enabled, 40 | making navigation behaves like Single Page Application. 41 | 42 | Note that `/search` pages are omitted from InstantClick 43 | to prevent conflicts from search's JavaScript, 44 | this may be changed in the future after refactoring those scripts. 45 | 46 | Another thing to notice is smooth scrolling will be disabled 47 | if InstantClick is enabled, because they both listen click 48 | event on every `
    ` tags. IMO smooth scrolling is not very useful 49 | so it has to give way to InstantCllick. 50 | 51 | This feature is enabled on this site. 52 | 53 | 54 | ## Give links an accent color. 55 | 56 | Though PaperModX is designed to be minimal, accent color is still essential. 57 | It's a good way to show personality and make your site feels more delightful. 58 | 59 | The default color is a purple vibe, 60 | you can customize the colors of link, link underline and their hover variants 61 | by override the following css variables in `assets/css/extended/custom.css` of your site. 62 | 63 | ```css 64 | :root { 65 | --link-color: var(--primary); 66 | --link-hover-color: #573eaa; 67 | --link-underline-shadow: 0 1px 0 var(--link-color); 68 | --link-hover-underline-color: #573eaa; 69 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 70 | } 71 | ``` 72 | 73 | 74 | ## Customize pagniator size 75 | 76 | In section pages, if you want the paginator size be different from the 77 | [global config](https://gohugo.io/templates/pagination/#configure-pagination), 78 | you can add `paginate` in the frontmatter to customize. 79 | 80 | ```yaml 81 | --- 82 | paginate: 10 83 | --- 84 | ``` 85 | 86 | 87 | ## Menus external link 88 | 89 | You can add `external: true` to a menu item's params to mark it as an external link, 90 | this will add a small icon to the end, and make the link open in new tab when clicked. 91 | 92 | ```yaml 93 | menu: 94 | main: 95 | - name: "@Author" 96 | url: "https://reorx.com" 97 | params: 98 | external: true 99 | ``` 100 | 101 | 102 | ## Highlight code with Chroma, no bullshit 103 | 104 | PaperMod uses highlight.js to highlight code blocks. 105 | In PaperModX, we use Chroma which is the recommended way in Hugo's 106 | [official docs](https://gohugo.io/content-management/syntax-highlighting/#:~:text=Hugo%20uses%20Chroma%20as%20its%20code%20highlighter%3B%20it%20is%20built%20in%20Go%20and%20is%20really%2C%20really%20fast), 107 | thus changing theme is easily supported. 108 | 109 | By default the themes are `github` for light and `dracula` for dark, 110 | you can change it by adding `chroma-light.css` and `chroma-dark.css` 111 | in site's `assets/css/lib` directory. 112 | 113 | 114 | ## Social icons from Simple Icons 115 | 116 | Add social icons with `-simple` suffix from [Simple Icons](https://simpleicons.org/). 117 | 118 | Available icons: 119 | - github-simple 120 | - rss-simple 121 | - telegram-simple 122 | - twitter-simple 123 | - pinboard-simple 124 | 125 | The icons are moved from `layouts/partials/svg.html` to `data/svg.toml`, 126 | makes it easier to maintain, it's now possible to have an index page 127 | to show all the icons, check it out at: [Icons Preview](https://reorx.github.io/hugo-PaperModX/docs/icons_preview/) 128 | 129 | 130 | ## Opinionated UI enhancements 131 | 132 | - Distinguish home page width and post page width, post page is wider 133 | (800px) for better readability, you can change it by `--post-width` in `theme-vars.css`. 134 | - Menu links are always bold, this feels more consistent when clicking around. Active links have deeper color. 135 | -------------------------------------------------------------------------------- /exampleSite/content/docs/papermodx-new-features.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "PaperModX 新功能说明" 3 | date: 2022-04-12T23:37:00+08:00 4 | summary: 本文档描述 PaperModX 相比原版 PaperMod 增加的新功能和变化。 5 | weight: 1 6 | --- 7 | 8 | 9 | 本文档描述 PaperModX 相比原版 PaperMod 增加的新功能和变化。 10 | 11 | 12 | ## Table of Contents (ToC) floating on the side 13 | 14 | By adding config: 15 | 16 | ```yaml 17 | params: 18 | TocSide: 'left' # or 'right' 19 | ``` 20 | 21 | ToC will float on the left/right side of the page. 22 | You can take a look at how `'right'` feels like in [Installation | Update](https://reorx.github.io/hugo-PaperModX/docs/installation/). 23 | 24 | The ToC box is responsive, it only shows on the side when minimum screen size is 1440px. 25 | 26 | This feature is enabled on this site. 27 | 28 | 29 | ## InstantClick integration 30 | 31 | By adding config: 32 | 33 | ```yaml 34 | params: 35 | EnableInstantClick: true 36 | ``` 37 | 38 | [InstantClick](http://instantclick.io/) will be enabled, 39 | making navigation behaves like Single Page Application. 40 | 41 | Note that `/search` pages are omitted from InstantClick 42 | to prevent conflicts from search's JavaScript, 43 | this may be changed in the future after refactoring those scripts. 44 | 45 | Another thing to notice is smooth scrolling will be disabled 46 | if InstantClick is enabled, because they both listen click 47 | event on every `` tags. IMO smooth scrolling is not very useful 48 | so it has to give way to InstantCllick. 49 | 50 | This feature is enabled on this site. 51 | 52 | 53 | ## Give links an accent color. 54 | 55 | Though PaperModX is designed to be minimal, accent color is still essential. 56 | It's a good way to show personality and make your site feels more delightful. 57 | 58 | The default color is a purple vibe, 59 | you can customize the colors of link, link underline and their hover variants 60 | by override the following css variables in `assets/css/extended/custom.css` of your site. 61 | 62 | ```css 63 | :root { 64 | --link-color: var(--primary); 65 | --link-hover-color: #573eaa; 66 | --link-underline-shadow: 0 1px 0 var(--link-color); 67 | --link-hover-underline-color: #573eaa; 68 | --link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); 69 | } 70 | ``` 71 | 72 | 73 | ## Customize pagniator size 74 | 75 | In section pages, if you want the paginator size be different from the 76 | [global config](https://gohugo.io/templates/pagination/#configure-pagination), 77 | you can add `paginate` in the frontmatter to customize. 78 | 79 | ```yaml 80 | --- 81 | paginate: 10 82 | --- 83 | ``` 84 | 85 | 86 | ## Menus external link 87 | 88 | You can add `external: true` to a menu item's params to mark it as an external link, 89 | this will add a small icon to the end, and make the link open in new tab when clicked. 90 | 91 | ```yaml 92 | menu: 93 | main: 94 | - name: "@Author" 95 | url: "https://reorx.com" 96 | params: 97 | external: true 98 | ``` 99 | 100 | 101 | ## Social icons from Simple Icons 102 | 103 | Add social icons with `-simple` suffix from [Simple Icons](https://simpleicons.org/). 104 | 105 | Available icons: 106 | - github-simple 107 | - rss-simple 108 | - telegram-simple 109 | - twitter-simple 110 | - pinboard-simple 111 | 112 | The icons are moved from `layouts/partials/svg.html` to `data/svg.toml`, 113 | makes it easier to maintain, it's now possible to have an index page 114 | to show all the icons, check it out at: [Icons Preview](https://reorx.github.io/hugo-PaperModX/docs/icons_preview/) 115 | 116 | 117 | ## Opinionated UI enhancements 118 | 119 | - Distinguish home page width and post page width, post page is wider 120 | (800px) for better readability, you can change it by `--post-width` in `theme-vars.css`. 121 | - Menu links are always bold, this feels more consistent when clicking around. Active links have deeper color. 122 | -------------------------------------------------------------------------------- /exampleSite/content/newsletter/001-hello-world/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "My Newsletter: Hello World" 3 | date: 2022-09-07 4 | issueno: "001" 5 | --- 6 | 7 | Welcome to PaperModX. 8 | -------------------------------------------------------------------------------- /exampleSite/content/newsletter/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: My Newsletter 3 | subtitle: What do you want to write? 4 | description: | 5 | This is the template for creating a newsletter in PaperModX. 6 | type: newsletter 7 | cascade: 8 | - _target: 9 | kind: page 10 | type: newsletter 11 | titlePrefix: "My Newsletter: " 12 | newsletterName: "My Newsletter" 13 | --- 14 | -------------------------------------------------------------------------------- /exampleSite/content/newsletter/archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "My Newsletter Archives" 3 | layout: archives 4 | hidden: true 5 | --- 6 | -------------------------------------------------------------------------------- /exampleSite/content/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Posts 3 | --- 4 | -------------------------------------------------------------------------------- /exampleSite/content/posts/_index.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 文章列表 3 | --- 4 | -------------------------------------------------------------------------------- /exampleSite/content/posts/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: "Hugo Authors" 3 | title: "Markdown Syntax Guide" 4 | date: "2019-03-11" 5 | description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | tags: 7 | - markdown 8 | - syntax 9 | - example 10 | ShowToc: true 11 | TocOpen: true 12 | --- 13 | 14 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 15 | 16 | 17 | 18 | ## Headings 19 | 20 | The following HTML `

    `—`

    ` elements represent six levels of section headings. `

    ` is the highest section level while `

    ` is the lowest. 21 | 22 | # H1 23 | 24 | ## H2 25 | 26 | ### H3 27 | 28 | #### H4 29 | 30 | ##### H5 31 | 32 | ###### H6 33 | 34 | ## Paragraph 35 | 36 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 37 | 38 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 39 | 40 | ## Blockquotes 41 | 42 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 43 | 44 | #### Blockquote without attribution 45 | 46 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 47 | > **Note** that you can use _Markdown syntax_ within a blockquote. 48 | 49 | #### Blockquote with attribution 50 | 51 | > Don't communicate by sharing memory, share memory by communicating. 52 | > 53 | > — Rob Pike[^1] 54 | 55 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 56 | 57 | ## Tables 58 | 59 | Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box. 60 | 61 | | Name | Age | 62 | | ----- | --- | 63 | | Bob | 27 | 64 | | Alice | 23 | 65 | 66 | #### Inline Markdown within tables 67 | 68 | | Italics | Bold | Code | 69 | | --------- | -------- | ------ | 70 | | _italics_ | **bold** | `code` | 71 | 72 | ## Code Blocks 73 | 74 | #### Inline Code 75 | 76 | `This is Inline Code` 77 | 78 | #### Only `pre` 79 | 80 |
     81 | This is pre text
     82 | 
    83 | 84 | #### Code block with backticks 85 | 86 | ``` 87 | 88 | 89 | 90 | 91 | Example HTML5 Document 92 | 93 | 94 |

    Test

    95 | 96 | 97 | ``` 98 | 99 | #### Code block with backticks and language specified 100 | 101 | ```html {linenos=true} 102 | 103 | 104 | 105 | 106 | Example HTML5 Document 107 | 108 | 109 | 110 |

    Test

    111 | 112 | 113 | ``` 114 | 115 | #### Code block indented with four spaces 116 | 117 | 118 | 119 | 120 | 121 | Example HTML5 Document 122 | 123 | 124 |

    Test

    125 | 126 | 127 | 128 | #### Code block with Hugo's internal highlight shortcode 129 | 130 | {{< highlight html >}} 131 | 132 | 133 | 134 | 135 | 136 | Example HTML5 Document 137 | 138 | 139 |

    Test

    140 | 141 | 142 | {{< /highlight >}} 143 | 144 | #### Gist 145 | 146 | {{< gist spf13 7896402 >}} 147 | 148 | ## List Types 149 | 150 | #### Ordered List 151 | 152 | 1. First item 153 | 2. Second item 154 | 3. Third item 155 | 156 | #### Unordered List 157 | 158 | - List item 159 | - Another item 160 | - And another item 161 | 162 | #### Nested list 163 | 164 | - Fruit 165 | - Apple 166 | - Orange 167 | - Banana 168 | - Dairy 169 | - Milk 170 | - Cheese 171 | 172 | ## Other Elements — abbr, sub, sup, kbd, mark 173 | 174 | GIF is a bitmap image format. 175 | 176 | H2O 177 | 178 | Xn + Yn = Zn 179 | 180 | Press CTRL+ALT+Delete to end the session. 181 | 182 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 183 | -------------------------------------------------------------------------------- /exampleSite/content/posts/placeholder-text.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: "Hugo Authors" 3 | title: "Placeholder Text" 4 | date: "2019-03-09" 5 | description: "Lorem Ipsum Dolor Si Amet" 6 | tags: 7 | - example 8 | hideMeta: true 9 | searchHidden: true 10 | ShowBreadCrumbs: false 11 | --- 12 | 13 | Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 14 | 15 | 1. Exierant elisi ambit vivere dedere 16 | 2. Duce pollice 17 | 3. Eris modo 18 | 4. Spargitque ferrea quos palude 19 | 20 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 21 | 22 | 1. Comas hunc haec pietate fetum procerum dixit 23 | 2. Post torum vates letum Tiresia 24 | 3. Flumen querellas 25 | 4. Arcanaque montibus omnes 26 | 5. Quidem et 27 | 28 | # Vagus elidunt 29 | 30 | 31 | 32 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 33 | 34 | ## Mane refeci capiebant unda mulcebat 35 | 36 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 37 | 38 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 39 | 40 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, _oculos nomen_ non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 41 | 42 | {{< css.inline >}} 43 | 44 | 47 | 48 | {{< /css.inline >}} 49 | -------------------------------------------------------------------------------- /exampleSite/content/posts/rich-content.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: "Hugo Authors" 3 | title: "Rich Content" 4 | date: "2019-03-10" 5 | description: "A brief description of Hugo Shortcodes" 6 | tags: 7 | - shortcodes 8 | - privacy 9 | - example 10 | ShowToc: true 11 | --- 12 | 13 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 14 | 15 | --- 16 | 17 | ## Image 18 | 19 | third party image: 20 | 21 | ![](https://images.unsplash.com/photo-1662141978148-2eeb2afb3837?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=772&q=80) 22 | 23 | internal image: 24 | 25 | ![](images/regular.jpg) 26 | 27 | ## YouTube Privacy Enhanced Shortcode 28 | 29 | {{< youtube ZJthWmvUzzc >}} 30 | 31 |
    32 | 33 | --- 34 | 35 | ## Twitter Simple Shortcode 36 | 37 | {{< twitter user="SanDiegoZoo" id="1453110110599868418" >}} 38 | 39 |
    40 | 41 | --- 42 | 43 | ## Vimeo Simple Shortcode 44 | 45 | {{< vimeo_simple 48912912 >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Search" 3 | layout: "search" 4 | --- 5 | -------------------------------------------------------------------------------- /exampleSite/content/search.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "搜索" 3 | layout: "search" 4 | --- 5 | -------------------------------------------------------------------------------- /exampleSite/layouts/_default/icons.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 |

    {{ .Title }}

    3 | 4 |
    5 | {{ range $name, $icon := $.Site.Data.svg }} 6 |
    7 |
    {{ safeHTML $icon }}
    8 |
    {{ $name }}
    9 |
    10 | {{ end }} 11 |
    12 | 13 | {{- end }} 14 | -------------------------------------------------------------------------------- /exampleSite/layouts/partials/custom_analytics.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exampleSite/layouts/partials/extend_head.html: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /exampleSite/static/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/exampleSite/static/cover.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 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: "কপি হয়েছে!" 29 | -------------------------------------------------------------------------------- /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/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 Seite" 3 | 4 | - id: next_page 5 | translation: "Nächste Seite" 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/en.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Prev Page" 3 | 4 | - id: next_page 5 | translation: "Next Page" 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 | 35 | - id: comments 36 | translation: "Comments" 37 | -------------------------------------------------------------------------------- /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: "Página anterior" 3 | 4 | - id: next_page 5 | translation: "Página 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/fr.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Page Précédente" 3 | 4 | - id: next_page 5 | translation: "Page Suivante" 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: toc 13 | translation: "תוכן עניינים" 14 | 15 | - id: translations 16 | translation: "תרגומים" 17 | 18 | - id: home 19 | translation: "דף בית" 20 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "विषय - सूची" 14 | 15 | - id: translations 16 | translation: "अनुवाद" 17 | -------------------------------------------------------------------------------- /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: "Halaman Sebelumnya" 3 | 4 | - id: next_page 5 | translation: "Halaman Selanjutnya" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 menit" 10 | other: "{{ .Count }} menit" 11 | 12 | - id: toc 13 | translation: "Daftar Isi" 14 | 15 | - id: translations 16 | translation: "Terjemahan" 17 | -------------------------------------------------------------------------------- /i18n/it.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Pag Prec" 3 | 4 | - id: next_page 5 | translation: "Pag Succ" 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: "Tabella dei Contenuti" 19 | 20 | - id: translations 21 | translation: "Traduzioni" 22 | 23 | - id: code_copy 24 | translation: "copia" 25 | 26 | - id: code_copied 27 | translation: "copiato!" 28 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "目次" 14 | 15 | - id: translations 16 | translation: "言語" 17 | -------------------------------------------------------------------------------- /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: 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/ku.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Rêpela Berê" 3 | 4 | - id: next_page 5 | translation: "Rûpela Bê" 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: "Wergêranan" 17 | 18 | - id: home 19 | translation: "Xanî" 20 | 21 | - id: code_copy 22 | translation: "Jê bigre" 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/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/pl.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Poprzednia strona" 3 | 4 | - id: next_page 5 | translation: "Następna strona" 6 | 7 | - id: read_time 8 | translation: 9 | one: "1 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Spis treści" 14 | 15 | - id: translations 16 | translation: "Tłumaczenia" 17 | 18 | - id: home 19 | translation: "Strona Główna" 20 | 21 | - id: edit_post 22 | translation: "Edytuj" 23 | 24 | - id: code_copy 25 | translation: "Kopiuj" 26 | 27 | - id: code_copied 28 | translation: "Skopiowano!" 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /i18n/ru.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Предыдущая" 3 | 4 | - id: next_page 5 | translation: "Следующая" 6 | 7 | - id: read_time 8 | translation: "{{ .Count }} мин" 9 | 10 | - id: toc 11 | translation: "Оглавление" 12 | 13 | - id: translations 14 | translation: "Переводы" 15 | 16 | - id: home 17 | translation: "Главная" 18 | 19 | - id: code_copy 20 | translation: "копировать" 21 | 22 | - id: code_copied 23 | translation: "скопировано!" -------------------------------------------------------------------------------- /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/tr.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "Önceki Sayfa" 3 | 4 | - id: next_page 5 | translation: "Sonraki Sayfa" 6 | 7 | - id: read_time 8 | translation: 9 | one : "1 dk" 10 | other: "{{ .Count }} dk" 11 | 12 | - id: toc 13 | translation: "İçindekiler" 14 | 15 | - id: translations 16 | translation: "Çeviriler" 17 | 18 | - id: home 19 | translation: "Anasayfa" 20 | 21 | - id: code_copy 22 | translation: "Kopyala" 23 | 24 | - id: code_copied 25 | translation: "Kopyalandı!" 26 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Mục lục" 14 | 15 | - id: translations 16 | translation: "Bản dịch" 17 | 18 | - id: home 19 | translation: "Trang chủ" 20 | 21 | - id: code_copy 22 | translation: "Sao chép" 23 | 24 | - id: code_copied 25 | translation: "Đã sao chép!" 26 | -------------------------------------------------------------------------------- /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 | 35 | - id: comments 36 | translation: "评论" 37 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 |
    404
    3 | {{- end }}{{/* end main */ -}} 4 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{- $url := urls.Parse .Destination -}} 2 | {{- if $url.Scheme -}} 3 | {{/* third party image */}} 4 | {{ $.Text }} 5 | {{- else -}} 6 | {{/* internal image */}} 7 | {{- $img := .Page.Resources.GetMatch .Destination -}} 8 | {{- if not $img -}} 9 | {{- $img = resources.Get .Destination -}} 10 | {{- end -}} 11 | 12 | {{- if $img -}} 13 | {{- if eq $img.MediaType.MainType "video" -}} 14 |
    15 | 19 |
    20 | {{- else -}} 21 | {{ $.Text }} 22 | {{- end -}} 23 | {{- else -}} 24 | {{- warnf "No image found for %s from %s" .Destination .Page.File }} 25 | {{- end -}} 26 | {{- end -}} 27 | -------------------------------------------------------------------------------- /layouts/_default/archives.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | 11 | 12 | {{/* get pages from the current page's section */}} 13 | {{/* in this way, archives.html could be used for section archives other than the only one archives of the whole site */}} 14 | {{- $sections := site.Params.mainSections }} 15 | {{- if .Section }} 16 | {{- $sections = slice .Section }} 17 | {{- end }} 18 | {{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }} 19 | 20 | {{- range $pages.GroupByPublishDate "2006" }} 21 | {{- if ne .Key "0001" }} 22 |
    23 |

    24 | {{- replace .Key "0001" "" }}  {{ len .Pages }} 25 |

    26 | {{- range .Pages.GroupByDate "January" }} 27 |
    44 | {{- end }} 45 |
    46 | {{- end }} 47 | {{- end }} 48 | 49 | {{- end }}{{/* end main */}} 50 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{- partial "head.html" . }} 6 | {{- block "head" . }}{{ end }} 7 | 8 | 9 | 17 | {{- partialCached "header.html" . .Page -}} 18 |
    19 | {{- block "main" . }}{{ end }} 20 |
    21 | {{ partial "footer.html" . -}} 22 | {{- block "body_end" . }}{{ end }} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /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 | 22 | {{- end }} 23 | 24 | {{- if .Content }} 25 |
    26 | {{- if not (.Param "disableAnchoredHeadings") }} 27 | {{- partial "anchored_headings.html" .Content -}} 28 | {{- else }}{{ .Content }}{{ end }} 29 |
    30 | {{- end }} 31 | 32 | 33 | {{- $pages := .Pages }} 34 | {{- if .IsHome }} 35 | {{/* get all regular pages instead of pages in a section */}} 36 | {{- $pages = where site.RegularPages "Section" "in" site.Params.mainSections }} 37 | {{- end }} 38 | {{- $pages = where $pages "Params.hidden" "!=" true }} 39 | 40 | {{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}} 41 | {{ $paginator := "" }} 42 | {{ if (.Param "paginate") }} 43 | {{- $paginator = .Paginate $pages (.Param "paginate") }} 44 | {{ else }} 45 | {{- $paginator = .Paginate $pages }} 46 | {{ end }} 47 | 48 | {{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} 49 | {{- partial "home_info.html" . }} 50 | {{- end }} 51 | 52 | {{- $term := .Data.Term }} 53 | {{- range $index, $page := $paginator.Pages }} 54 | 55 | {{- $class := "post-entry" }} 56 | 57 | {{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} 58 | {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} 59 | {{- $class = "first-entry" }} 60 | {{- else if $term }} 61 | {{- $class = "post-entry tag-entry" }} 62 | {{- end }} 63 | 64 |
    65 | {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} 66 | {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} 67 |
    68 |

    69 | {{- .Title }} 70 | {{- if .Draft }}  [Draft]{{- end }} 71 | {{- if .Weight }}  [Pinned]{{- end }} 72 |

    73 |
    74 | {{- if (ne (.Param "hideSummary") true) }} 75 |
    76 | {{ if .Description }} 77 |

    {{ .Description | plainify | htmlUnescape }}

    78 | {{ else }} 79 |

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

    80 | {{ end }} 81 |
    82 | {{- end }} 83 | {{- if not (.Param "hideMeta") }} 84 |
    85 | {{- partial "post_meta.html" . -}} 86 |
    87 | {{- end }} 88 | 89 |
    90 | {{- end }} 91 | 92 | {{- if gt $paginator.TotalPages 1 }} 93 | 103 | {{- end }} 104 | 105 | {{- end }}{{/* end profileMode */}} 106 | 107 | {{- end }}{{- /* end main */ -}} 108 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pages := .Pages -}} 2 | {{- if $.IsHome -}} 3 | {{/* get all regular pages instead of pages in a section */}} 4 | {{- $pages = where site.RegularPages "Section" "in" site.Params.mainSections -}} 5 | {{- end }} 6 | {{- $pages = where $pages "Params.hidden" "!=" true -}} 7 | 8 | {{- $limit := site.Config.Services.RSS.Limit -}} 9 | {{- if ge $limit 1 -}} 10 | {{- $pages = $pages | first $limit -}} 11 | {{- end -}} 12 | 13 | {{- printf "" | safeHTML }} 14 | 15 | 16 | {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }} 17 | {{ .Permalink }} 18 | Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }} 19 | {{- with site.Params.logo }} 20 | 21 | {{ .icon | absURL }} 22 | {{ .icon | absURL }} 23 | 24 | {{- end }} 25 | Hugo -- gohugo.io{{ with site.LanguageCode }} 26 | {{.}}{{end}}{{ with site.Author.email }} 27 | {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Author.email }} 28 | {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Copyright }} 29 | {{.}}{{end}}{{ if not .Date.IsZero }} 30 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 31 | {{- with .OutputFormats.Get "RSS" -}} 32 | {{ printf "" .Permalink .MediaType | safeHTML }} 33 | {{- end -}} 34 | {{ range $pages }} 35 | {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} 36 | 37 | {{ .Title }} 38 | {{ .Permalink }} 39 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 40 | {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}} 41 | {{ .Permalink }} 42 | {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} 43 | {{- if not site.Params.RSSNoContent}} 44 | {{ (printf "" .Content) | safeHTML }} 45 | {{- end }} 46 | 47 | {{- end }} 48 | {{ end }} 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | {{- $isNewsletter := eq .Type "newsletter" }} 3 | 4 |
    5 |
    6 | {{ partial "breadcrumbs.html" . }} 7 | 8 | {{- if $isNewsletter -}} 9 | {{- partial "newsletter_brand.html" . }} 10 | {{- end -}} 11 |

    12 | {{- if $isNewsletter -}} 13 | {{- replace .Title (.Param "titlePrefix") (.Param "titlePrefixReplace") -}} 14 | {{- else -}} 15 | {{- .Title -}} 16 | {{- end -}} 17 | {{- if .Draft -}}  [draft]{{- end -}} 18 |

    19 | {{- if .Description }} 20 |
    21 | {{- .Description -}} 22 |
    23 | {{- end }} 24 | {{- if not (.Param "hideMeta") }} 25 | 31 | {{- end }} 32 |
    33 | {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }} 34 | {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} 35 | {{- if (.Param "ShowToc") }} 36 | {{- partial "toc.html" . }} 37 | {{- end }} 38 | 39 | {{- if .Content }} 40 |
    41 | {{- if not (.Param "disableAnchoredHeadings") }} 42 | {{- partial "anchored_headings.html" .Content -}} 43 | {{- else }}{{ .Content }}{{ end }} 44 |
    45 | {{- end }} 46 | 47 |
    48 | {{- if (.Param "socialLinks") }} 49 | {{- partial "social_links.html" . }} 50 | {{- end }} 51 | 52 | {{- if (.Param "ShowPostNavLinks") }} 53 | {{- partial "post_nav_links.html" . }} 54 | {{- end }} 55 | 56 | {{- if $isNewsletter }} 57 | 67 | {{- end }} 68 |
    69 | 70 | {{- if not (.Param "noComments") }} 71 |
    72 | {{- partial "comments.html" . }} 73 | {{- end }} 74 |
    75 | 76 | {{- end }}{{/* end main */}} 77 | -------------------------------------------------------------------------------- /layouts/_default/sitemap.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 4 | {{ range .Data.Pages }} 5 | {{- if and (not .Params.nositemap) .Permalink -}} 6 | 7 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 8 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 9 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 10 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 11 | {{ end }} 16 | {{ end }} 21 | 22 | {{- end -}} 23 | {{ end }} 24 | 25 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | {{- if .Title }} 4 | 12 | {{- end }} 13 | 14 | 26 | 27 | {{- end }}{{/* end main */ -}} 28 | -------------------------------------------------------------------------------- /layouts/blogroll/section.html: -------------------------------------------------------------------------------- 1 | {{/* section is AKA list */}} 2 | 3 | {{- define "main" }} 4 | 7 | 8 | 29 | 30 | {{- end }} 31 | -------------------------------------------------------------------------------- /layouts/essays/section.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | 14 | 15 | {{- if .Content }} 16 |
    17 | {{- if not (.Param "disableAnchoredHeadings") }} 18 | {{- partial "anchored_headings.html" .Content -}} 19 | {{- else }}{{ .Content }}{{ end }} 20 |
    21 | {{- end }} 22 | 23 | 24 | {{- $pages := .Pages }} 25 | {{- $pages = where $pages "Params.hidden" "!=" true }} 26 | 27 | {{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}} 28 | {{ $paginator := "" }} 29 | {{ if (.Param "paginate") }} 30 | {{- $paginator = .Paginate $pages (.Param "paginate") }} 31 | {{ else }} 32 | {{- $paginator = .Paginate $pages }} 33 | {{ end }} 34 | 35 | {{- $term := .Data.Term }} 36 | {{- range $index, $page := $paginator.Pages }} 37 | 38 |
    39 |

    40 | 41 | {{- .Title }} 42 | {{- if .Draft }}  [Draft]{{- end }} 43 | {{- if .Weight }}  [Pinned]{{- end }} 44 | 45 |

    46 | 51 |
    52 | {{ .Content }} 53 |
    54 |
    55 | {{- end }} 56 | 57 | {{- if gt $paginator.TotalPages 1 }} 58 | 68 | {{- end }} 69 | 70 | {{- end }}{{- /* end main */ -}} 71 | -------------------------------------------------------------------------------- /layouts/newsletter/archives.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 |
    3 | 4 |
    5 |

    {{ .Title }}

    6 | {{- partial "newsletter_sub_form.html"}} 7 | 8 | {{/* get pages from the current page's section */}} 9 | {{- $sections := slice .Section }} 10 | {{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }} 11 | 12 | {{/* TODO statistics */}} 13 |
    14 | {{- range $pages }} 15 |
    16 |
    17 | {{- if not .Date.IsZero -}} 18 | {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} 19 | {{- end }} 20 |
    21 | 27 |
    {{ with .Param "issueno" }}#{{ . }}{{ end }}
    28 |
    29 | {{- end }} 30 |
    31 | 32 |
    33 | {{ end }} 34 | -------------------------------------------------------------------------------- /layouts/newsletter/section.html: -------------------------------------------------------------------------------- 1 | {{/* section is AKA list */}} 2 | 3 | {{- define "main" }} 4 |
    5 | 6 |
    7 |

    {{ .Title }}

    8 | {{ with .Param "subtitle" }}
    {{ . }}
    {{ end }} 9 | 10 |
    11 |
    {{ .Description | markdownify }}
    12 | {{- partial "newsletter_sub_form.html"}} 13 |
    14 | 15 | {{ $pages := where .Pages "Params.hidden" "!=" true }} 16 | {{ if $pages }} 17 |

    Latest Issues

    18 | 19 |
    20 | {{- range first 5 $pages }} 21 |
    22 |
    23 | {{- if not .Date.IsZero -}} 24 | {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} 25 | {{- end }} 26 |
    27 | 33 |
    {{ with .Param "issueno" }}#{{ . }}{{ end }}
    34 |
    35 | {{- end }} 36 |
    37 | {{ end }} 38 | 39 |

    Links

    40 | 41 | {{- partial "inline_links.html" . -}} 42 |
    43 | {{ end }} 44 | -------------------------------------------------------------------------------- /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 | {{- /* You can add your own layouts/comments.html to override this file */ -}} 2 | 3 | {{- $pageCommentSystems := .Param "pageCommentSystems"}} 4 | {{- if not $pageCommentSystems }} 5 | {{- $pageCommentSystems = site.Params.defaultCommentSystems }} 6 | {{- end }} 7 | 8 | {{- $page := . -}} 9 | {{- with site.Params.commentSystems -}} 10 | {{- if $pageCommentSystems.remark42 -}} 11 | {{- with .remark42 -}} 12 | {{- partial "remark42.html" (dict "page" $page "ctx" .) }} 13 | {{- end -}} 14 | {{- end -}} 15 | 16 | {{- if $pageCommentSystems.telegramWidget -}} 17 | {{- with .telegramWidget -}} 18 | {{- partial "telegram_widget.html" . }} 19 | {{- end -}} 20 | {{- end -}} 21 | 22 | {{- if $pageCommentSystems.disqus -}} 23 | {{- with .disqus -}} 24 | {{- partial "disqus.html" (dict "page" $page "ctx" .) }} 25 | {{- end -}} 26 | {{- end -}} 27 | {{- end -}} 28 | -------------------------------------------------------------------------------- /layouts/partials/cover.html: -------------------------------------------------------------------------------- 1 | {{- with .cxt}} {{/* Apply proper context from dict */}} 2 | {{- if (and .Params.cover.image (not $.isHidden)) }} 3 | {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} 4 |
    5 | {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} 6 | {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }} 7 | {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} 8 | {{- if $cover -}}{{/* i.e it is present in page bundle */}} 9 | {{- if $addLink }}{{ end -}} 11 | {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} 12 | {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} 13 | {{- if hugo.IsExtended -}} 14 | {{- $processableFormats = $processableFormats | append "webp" -}} 15 | {{- end -}} 16 | {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} 17 | {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} 18 | {{ $alt }} 25 | {{- else }}{{/* Unprocessable image or responsive images disabled */}} 26 | {{ $alt }} 27 | {{- end }} 28 | {{- else }}{{/* For absolute urls and external links, no img processing here */}} 29 | {{- if $addLink }}{{ end -}} 31 | {{ $alt }} 32 | {{- end }} 33 | {{- if $addLink }}{{ end -}} 34 | {{/* Display Caption */}} 35 | {{- if not $.IsHome }} 36 | {{ with .Params.cover.caption }}

    {{ . | markdownify }}

    {{- end }} 37 | {{- end }} 38 |
    39 | {{- end }}{{/* End image */}} 40 | {{- end -}}{{/* End context */ -}} 41 | -------------------------------------------------------------------------------- /layouts/partials/disqus.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 | 31 | -------------------------------------------------------------------------------- /layouts/partials/edit_post.html: -------------------------------------------------------------------------------- 1 | {{- if or .Params.editPost.URL site.Params.editPost.URL -}} 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 site.Copyright }} 4 | {{ site.Copyright | markdownify }} 5 | {{- else }} 6 | © {{ now.Year }} {{ site.Title }} 7 | {{- end -}} 8 | 9 | CC BY-SA 10 | 11 | 12 | Powered by 13 | Hugo & 14 | PaperModX 15 | 16 |
    17 | {{- end }} 18 | 19 | {{- if (not site.Params.disableScrollToTop) }} 20 | 21 | 22 | 23 | 24 | 25 | {{- end }} 26 | 27 | {{- partial "extend_footer.html" . }} 28 | 29 | 44 | 45 | 78 | 79 | {{- if (not site.Params.disableScrollToTop) }} 80 | 92 | {{- end }} 93 | 94 | {{- /* Base64Email */}} 95 | {{- if (.Param "MaskedEmail") }} 96 | 102 | {{- end -}} 103 | 104 | 105 | {{/* Clear ToC Scroll */}} 106 | 115 | 116 | {{/* Load mediumZoom script */}} 117 | {{/* It has to be loaded here because of the data-no-instant attribute */}} 118 | {{- $imagezoom := resources.Get "js/medium-zoom.min.js" }} 119 | 122 | 123 | {{- if .IsPage }} 124 | {{- partial "page_footer.html" . }} 125 | {{- end}} 126 | 127 | {{- /* Search */}} 128 | {{- if (eq .Layout `search`) -}} 129 | 130 | {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) }} 131 | {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} 132 | {{- if not site.Params.assets.disableFingerprinting }} 133 | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} 134 | 135 | {{- else }} 136 | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} 137 | 138 | {{- end }} 139 | 140 | {{- else }} 141 | 142 | {{- /* InstantClick.js */}} 143 | {{- if (.Param "EnableInstantClick") }} 144 | {{- $instantclick := resources.Get "js/instantclick.js" }} 145 | {{- if hugo.IsProduction }} 146 | {{- $instantclick = minify $instantclick }} 147 | {{- end }} 148 | 151 | 160 | {{- end }} 161 | 162 | {{- end -}} 163 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- if hugo.IsProduction | or (eq site.Params.env "production") }} 5 | 6 | {{- else }} 7 | 8 | {{- end }} 9 | 10 | {{- /* Title */}} 11 | {{- $pageTitle := site.Title }} 12 | {{- if (and .Title (not .IsHome)) }} 13 | {{- $pageTitle = printf "%s | %s" .Title $pageTitle }} 14 | {{- end }} 15 | {{ $pageTitle }} 16 | 17 | {{- /* Meta */}} 18 | {{- if .IsHome }} 19 | {{ with site.Params.keywords -}}{{ end }} 20 | {{- else }} 21 | 24 | {{- end }} 25 | 28 | 29 | 30 | {{- if site.Params.analytics.googlesiteVerificationTag }} 31 | 32 | {{- end }} 33 | {{- if site.Params.analytics.yandexsiteVerificationTag }} 34 | 35 | {{- end }} 36 | {{- if site.Params.analytics.bingsiteVerificationTag }} 37 | 38 | {{- end }} 39 | 40 | {{- /* Styles */}} 41 | {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} 42 | {{- $reset := (resources.Get "css/core/reset.css") }} 43 | {{- $media := (resources.Get "css/core/zmedia.css") }} 44 | {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} 45 | {{- $commonHighlight := (resources.Get "css/common/highlight.scss") | css.Sass }} 46 | 47 | {{- /* order is important */}} 48 | {{- $core := (slice $theme_vars $reset $common $commonHighlight $media) | resources.Concat "assets/css/core.css" }} 49 | {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} 50 | {{- $extendedScss := (resources.Match "css/extended/*.scss") | resources.Concat "assets/css/extended.scss" | css.Sass }} 51 | 52 | {{- /* bundle all required css */}} 53 | {{- /* Add extended css after theme style */ -}} 54 | {{- $stylesheet := (slice $core $extended $extendedScss) | resources.Concat "assets/css/stylesheet.css" | minify }} 55 | 56 | {{- if not site.Params.assets.disableFingerprinting }} 57 | {{- $stylesheet := $stylesheet | fingerprint }} 58 | 59 | {{- else }} 60 | 61 | {{- end }} 62 | 63 | {{- /* Favicons */}} 64 | 65 | 66 | 67 | {{- /* RSS */}} 68 | {{ range .AlternativeOutputFormats -}} 69 | 70 | {{ end -}} 71 | {{- range .AllTranslations -}} 72 | 73 | {{ end -}} 74 | 75 | {{- /* Misc */}} 76 | {{- if hugo.IsProduction | or (eq site.Params.env "production") }} 77 | {{- if .Site.Config.Services.GoogleAnalytics.ID }} 78 | {{- template "_internal/google_analytics.html" . }} 79 | {{- end -}} 80 | {{- if site.Params.useCustomAnalytics }} 81 | {{- partialCached "custom_analytics.html" . "custom_analytics.html" }} 82 | {{- end -}} 83 | {{- end -}} 84 | 85 | {{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}} 86 | {{- if .Params.cover.image }} 87 | 88 | {{- else }} 89 | {{- with site.Params.images -}} 90 | 91 | {{- end }} 92 | {{- end }} 93 | 94 | 95 | {{- with site.Params.socialAccounts.twitter }} 96 | 97 | 98 | {{- end }} 99 | 100 | {{- template "partials/templates/opengraph.html" (dict "page" . "pageTitle" $pageTitle) }} 101 | 102 | {{- template "partials/templates/schema_json.html" (dict "page" . "pageTitle" $pageTitle) }} 103 | 104 | {{- partial "extend_head.html" . }} 105 | 143 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 59 | 69 | 70 |
    71 | 148 |
    149 | -------------------------------------------------------------------------------- /layouts/partials/home_info.html: -------------------------------------------------------------------------------- 1 | {{- with site.Params.homeInfoParams }} 2 |
    3 |
    4 |

    {{ .Title | markdownify }}

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

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

    31 | {{ .subtitle | markdownify }} 32 | {{- partial "social_icons.html" (dict "icons" site.Params.socialIcons "svg" $.Site.Data.svg "MaskedEmail" site.Params.MaskedEmail) -}} 33 | 34 | {{- with .buttons }} 35 |
    36 | {{- range . }} 37 | 38 | {{ .name | title }} 39 | 40 | {{- end }} 41 |
    42 | {{- end }} 43 |
    44 | {{- end}} 45 |
    46 | -------------------------------------------------------------------------------- /layouts/partials/inline_links.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /layouts/partials/newsletter_brand.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /layouts/partials/newsletter_sub_form.html: -------------------------------------------------------------------------------- 1 | {{/* Add `layouts/partials/newsletter_sub_form.html` in your own code to customize the form */}} 2 | 3 | 15 | -------------------------------------------------------------------------------- /layouts/partials/page_footer.html: -------------------------------------------------------------------------------- 1 | 2 | {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} 3 | 50 | {{- end }} 51 | 52 | 53 | 54 | {{/* ToC Scroll */}} 55 | 124 | 125 | {{- if (.Param "EnableImageZoom") }} 126 | 130 | {{- end }} 131 | -------------------------------------------------------------------------------- /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 | 2 | {{- if not .Date.IsZero -}} 3 | 4 | 5 | {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} 6 | {{- end }} 7 | 8 | {{- if .Params.tags -}} 9 | 10 | 11 | 16 | {{- end }} 17 | 18 | 19 | {{- if (.Param "ShowWordCount") -}} 20 | 21 | 22 | 23 | {{- i18n "words" .WordCount | default (printf "%d words" .WordCount) -}} 24 | 25 | {{- end }} 26 | 27 | 28 | {{- if (.Param "ShowReadingTime") -}} 29 | 30 | 31 | 32 | {{- i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime) -}} 33 | 34 | {{- end }} 35 | 36 | 37 | {{- if (.Param "ShowAuthor") -}} 38 | 39 | 40 | {{- partial "author.html" . -}} 41 | {{- end }} 42 | 43 | 44 | {{- if .IsTranslated -}} 45 | 46 | 47 | 48 | {{- range $i, $e := .Translations }} 49 | {{- if $i }} | {{ end -}} 50 | {{- with $e }} 51 | 52 | {{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }} 53 | {{- .Language.LanguageName | emojify -}} 54 | {{- else }} 55 | {{- .Lang | title -}} 56 | {{- end -}} 57 | 58 | {{- end }} 59 | {{- end }} 60 | 61 | {{- end }} 62 | -------------------------------------------------------------------------------- /layouts/partials/post_nav_links.html: -------------------------------------------------------------------------------- 1 | {{/* get pages from the current page's section */}} 2 | {{- $sections := site.Params.mainSections }} 3 | {{- if .Section }} 4 | {{- $sections = slice .Section }} 5 | {{- end }} 6 | {{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }} 7 | 8 | {{- if and (gt (len $pages) 1) (in $pages . ) }} 9 | 30 | {{- end }} 31 | -------------------------------------------------------------------------------- /layouts/partials/remark42.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | Comments 4 | 5 |
    6 |
    7 |
    8 |
    9 | 10 | 59 | -------------------------------------------------------------------------------- /layouts/partials/social_icons.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /layouts/partials/social_links.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /layouts/partials/social_quote_tweet.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /layouts/partials/static_comments.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reorx/hugo-PaperModX/846feebb62fcb438901c7af190678218b077e02d/layouts/partials/static_comments.html -------------------------------------------------------------------------------- /layouts/partials/telegram_widget.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 | 53 | -------------------------------------------------------------------------------- /layouts/partials/templates/opengraph.html: -------------------------------------------------------------------------------- 1 | {{ with .page }} 2 | 3 | 4 | 5 | 6 | {{- if .Params.cover.image -}} 7 | {{- if (eq .Params.cover.absolute true) }} 8 | 9 | {{- else}} 10 | 11 | {{- end}} 12 | {{- else }} 13 | {{- range site.Params.images }} 14 | 15 | {{- end }} 16 | {{ end }} 17 | 18 | {{- if .IsPage }} 19 | {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} 20 | 21 | {{ with .PublishDate }}{{ end }} 22 | {{ with .Lastmod }}{{ end }} 23 | {{- end -}} 24 | 25 | {{- with .Params.audio }}{{ end }} 26 | {{- with .Params.locale }}{{ end }} 27 | {{- with site.Params.title }}{{ end }} 28 | {{- with .Params.videos }} 29 | {{- range . }} 30 | 31 | {{- end }} 32 | {{- end }} 33 | 34 | {{- /* If it is part of a series, link to related articles */}} 35 | {{- $permalink := .Permalink }} 36 | {{- $siteSeries := site.Taxonomies.series }} 37 | {{- with .Params.series }} 38 | {{- range $name := . }} 39 | {{- $series := index $siteSeries ($name | urlize) }} 40 | {{- range $page := first 6 $series.Pages }} 41 | {{- if ne $page.Permalink $permalink }}{{ end }} 42 | {{- end -}} 43 | {{- end -}} 44 | {{- end -}} 45 | {{- end -}} 46 | -------------------------------------------------------------------------------- /layouts/partials/templates/schema_json.html: -------------------------------------------------------------------------------- 1 | {{ with .page }} 2 | {{ if .IsHome }} 3 | 20 | {{- else if (or .IsPage .IsSection) }} 21 | {{/* BreadcrumbList */}} 22 | {{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }} 23 | {{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} 24 | {{- $bc_list := (split $lang_url "/")}} 25 | 26 | {{- $scratch := newScratch }} 27 | 59 | {{- if .IsPage }} 60 | 117 | {{- end }}{{/* .IsPage end */}} 118 | 119 | {{- end -}} 120 | {{- end -}} 121 | -------------------------------------------------------------------------------- /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 | safeHTML -}} 75 | {{- else }} 76 |
    • 77 | {{- $header | 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 | 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/blockquote.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | {{ $.Scratch.Set "bl_author" false }} 8 | {{ $.Scratch.Set "bl_source" false }} 9 | {{ $.Scratch.Set "bl_link" false }} 10 | {{ $.Scratch.Set "bl_title" false }} 11 | 12 | {{ if .IsNamedParams }} 13 | {{ $.Scratch.Set "bl_author" (.Get "author") }} 14 | {{ $.Scratch.Set "bl_source" (.Get "source") }} 15 | {{ $.Scratch.Set "bl_link" (.Get "link") }} 16 | {{ $.Scratch.Set "bl_title" (.Get "title") }} 17 | {{ else }} 18 | 19 | {{ end }} 20 | 21 | 24 | 25 | {{ with $.Scratch.Get "bl_title" }} 26 | 27 | {{ else }} 28 | {{ with $.Scratch.Get "bl_link" }} 29 | {{ range last 1 (split ($.Scratch.Get "bl_link" ) "://") }} 30 | {{ $.Scratch.Set "title_without_protocol" . }} 31 | {{ end }} 32 | {{ range last 1 (split ($.Scratch.Get "title_without_protocol" ) "www.") }} 33 | {{ $.Scratch.Set "title_without_protocol" . }} 34 | {{ end }} 35 | {{ $.Scratch.Set "bl_title" ($.Scratch.Get "title_without_protocol") }} 36 | 37 | 38 | {{ if (gt (len ($.Scratch.Get "title_without_protocol") ) 32) }} 39 | {{ $title := (slicestr ($.Scratch.Get "title_without_protocol") 0 32) }} 40 | {{ $split_by_fw_slash := split $title "/" }} 41 | {{ $count := (sub (len $split_by_fw_slash) 1) }} 42 | 43 | {{ $.Scratch.Set "tempstring" "" }} 44 | {{ range first $count $split_by_fw_slash }} 45 | {{ $.Scratch.Set "tempstring" ( . | printf "%s%s/" ($.Scratch.Get "tempstring") | printf "%s" ) }} 46 | {{ end }} 47 | {{ $.Scratch.Set "bl_title" ( printf "%s..." ($.Scratch.Get "tempstring") | printf "%s" ) }} 48 | {{ end }} 49 | {{ end }} 50 | {{ end }} 51 | 52 |
    53 |

    {{ .Inner | markdownify }}

    54 | 72 |
    73 | -------------------------------------------------------------------------------- /layouts/shortcodes/collapse.html: -------------------------------------------------------------------------------- 1 |

    2 | {{ .Get 0 | markdownify }} 3 | {{ .Page.RenderString .Inner }} 4 |

    5 | -------------------------------------------------------------------------------- /layouts/shortcodes/figure-img-size.html: -------------------------------------------------------------------------------- 1 | {{- $width := .Get 1 }} 2 | {{- $height := .Get 2 }} 3 |
    4 |
    8 | {{ .Page.RenderString .Inner }} 9 |
    10 | 11 |

    {{ .Get 0 | markdownify }}

    12 |
    13 | -------------------------------------------------------------------------------- /layouts/shortcodes/figure-img.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ .Page.RenderString .Inner }} 3 | 4 |

    {{ .Get 0 | markdownify }}

    5 |
    6 | -------------------------------------------------------------------------------- /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/image-size-control.html: -------------------------------------------------------------------------------- 1 |
    6 | {{ .Page.RenderString .Inner }} 7 |
    8 | -------------------------------------------------------------------------------- /layouts/shortcodes/link.html: -------------------------------------------------------------------------------- 1 | {{ .Get "title" }} 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /layouts/shortcodes/social-quote-tweet.html: -------------------------------------------------------------------------------- 1 | {{ partial "social_quote_tweet.html" (dict "user" (.Get "user") "id" (.Get "id") "title" .Inner) }} 2 | -------------------------------------------------------------------------------- /layouts/shortcodes/standout.html: -------------------------------------------------------------------------------- 1 |

    2 | {{ .Page.RenderString .Inner }} 3 |

    4 | -------------------------------------------------------------------------------- /layouts/shortcodes/tweet-ref.html: -------------------------------------------------------------------------------- 1 |
    2 | {{- $url := .Get 0 -}} 3 | From {{ strings.TrimPrefix "https://" $url }}: 4 | 5 | {{- $dnt := true -}} 6 | {{- $query := querify "url" $url "dnt" $dnt -}} 7 | {{- $request := printf "https://publish.twitter.com/oembed?%s" $query -}} 8 | {{- $json := getJSON $request -}} 9 | {{- replaceRE "" "" $json.html | safeHTML -}} 10 |
    11 | -------------------------------------------------------------------------------- /layouts/shortcodes/video.html: -------------------------------------------------------------------------------- 1 |
    2 | 6 |
    7 | -------------------------------------------------------------------------------- /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 | tags = [ 10 | "responsive", 11 | "simple", 12 | "clean", 13 | "light", 14 | "dark", 15 | "blog", 16 | "minimalist", 17 | "highlight.js", 18 | "search" 19 | ] 20 | features = [ 21 | "responsive", 22 | "single-column", 23 | "blog", 24 | "cover-image", 25 | "table-of-contents", 26 | "opengraph", 27 | "highlight.js", 28 | "favicon", 29 | "archive", 30 | "share-icons", 31 | "cover", 32 | "multilingual", 33 | "social-icons", 34 | "minified-assets", 35 | "theme-toggle", 36 | "menu-location-indicator", 37 | "scroll-to-top", 38 | "search" 39 | ] 40 | min_version = "0.83.0" 41 | 42 | [author] 43 | name = "Aditya Telange" 44 | homepage = "https://github.com/adityatelange/" 45 | 46 | # If porting an existing theme 47 | [original] 48 | name = "Paper" 49 | author = "nanxiaobei" 50 | homepage = "https://github.com/nanxiaobei" 51 | repo = "https://github.com/nanxiaobei/hugo-paper/" 52 | --------------------------------------------------------------------------------