├── .gitignore ├── .gitmodules ├── .hugo_build.lock ├── .idea ├── .gitignore ├── modules.xml ├── sulv-hugo-papermod.iml └── vcs.xml ├── LICENSE ├── README.md ├── archetypes └── default.md ├── assets ├── .DS_Store ├── css │ ├── .DS_Store │ └── extended │ │ ├── .DS_Store │ │ ├── blank.css │ │ ├── code.css │ │ ├── comment.css │ │ ├── fonts.css │ │ ├── friend-link.css │ │ ├── hugo-easy-gallery.css │ │ ├── pagination.css │ │ ├── reward.css │ │ ├── tag-cloud.css │ │ ├── toc.css │ │ └── transition.css └── js │ ├── .DS_Store │ ├── fastsearch.js │ ├── fuse.basic.min.js │ ├── highlight.min.js │ └── load-photoswipe.js ├── config.yml ├── content ├── .DS_Store ├── about.md ├── archives.md ├── links.md ├── posts │ ├── .DS_Store │ ├── _index.md │ ├── blog │ │ ├── .DS_Store │ │ ├── _index.md │ │ └── blog.md │ ├── life │ │ ├── .DS_Store │ │ ├── _index.md │ │ └── life.md │ ├── read │ │ ├── .DS_Store │ │ ├── _index.md │ │ └── read.md │ └── tech │ │ ├── .DS_Store │ │ ├── _index.md │ │ ├── tech.md │ │ ├── tech1.md │ │ └── tech1 │ │ └── 1.png ├── search.md └── tags │ └── _index.md ├── data └── .DS_Store ├── 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 ├── tr.yaml ├── uk.yaml ├── uz.yaml ├── vi.yaml ├── zh-tw.yaml └── zh.yaml ├── layouts ├── .DS_Store ├── 404.html ├── _default │ ├── _markup │ │ └── render-image.html │ ├── archives.html │ ├── baseof.html │ ├── index.json │ ├── list.html │ ├── rss.xml │ ├── search.html │ ├── single.html │ └── terms.html ├── partials │ ├── anchored_headings.html │ ├── author.html │ ├── breadcrumbs.html │ ├── comments.html │ ├── cover.html │ ├── cover1.html │ ├── edit_post.html │ ├── extend_footer.html │ ├── extend_head.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── home_info.html │ ├── index_profile.html │ ├── post_canonical.html │ ├── post_meta.html │ ├── post_nav_links.html │ ├── share_icons.html │ ├── social_icons.html │ ├── svg.html │ ├── templates │ │ ├── opengraph.html │ │ ├── schema_json.html │ │ └── twitter_cards.html │ ├── toc.html │ └── translation_list.html ├── robots.txt └── shortcodes │ ├── .DS_Store │ ├── bilibili.html │ ├── blockquote.html │ ├── collapse.html │ ├── douban.html │ ├── figure.html │ ├── figure_origin.html │ ├── friend.html │ ├── gallery.html │ ├── innerlink.html │ ├── load-photoswipe.html │ ├── ltr.html │ ├── mermaid.html │ ├── ppt.html │ ├── rawhtml.html │ ├── rtl.html │ └── youtube.html ├── resources ├── .DS_Store └── _gen │ └── .DS_Store ├── static ├── .DS_Store ├── Q.gif ├── README_EN.md ├── fonts │ ├── MaShanZheng-Regular.ttf │ └── NeverMindHand-Regular.ttf ├── go2.png └── img │ ├── .DS_Store │ ├── Q.gif │ ├── alipay.png │ ├── beian.png │ ├── bilibili.png │ ├── docker.png │ ├── favicon.ico │ ├── hugo_group.png │ ├── instagram.png │ ├── magic16.ico │ ├── magic32.ico │ ├── phone.png │ ├── qq.png │ ├── twitter.png │ ├── wechat.png │ └── wechat_pay.png └── themes └── .DS_Store /.gitignore: -------------------------------------------------------------------------------- 1 | public 2 | .hugo_build.lock 3 | .idea 4 | .DS_Store -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "hugo-PaperMod"] 2 | path = hugo-PaperMod 3 | url = https://github.com/adityatelange/hugo-PaperMod.git 4 | [submodule "themes/hugo-PaperMod"] 5 | path = themes/hugo-PaperMod 6 | url = https://github.com/adityatelange/hugo-PaperMod.git 7 | -------------------------------------------------------------------------------- /.hugo_build.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/.hugo_build.lock -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/sulv-hugo-papermod.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 xyming108 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 语言:中文 | [English](https://github.com/xyming108/sulv-hugo-papermod/blob/main/static/README_EN.md) 2 | 3 | > 该主题根据Hugo PaperMod主题修改而来: https://github.com/adityatelange/hugo-PaperMod 4 | 5 | ### [博客DEMO](https://xyming108.github.io/) 6 | 7 | ## 1. git clone 拉取代码 8 | 9 | ① 用`git clone`的方式拉取代码至桌面,此时会在桌面生成sulv-hugo-papermod目录 10 | 11 | ② 进入到sulv-hugo-papermod目录,输入`git submodule update --init`,表示拉取themes/hugo-PaperMod/下的子模块,里面放的是官方主题 12 | 13 | ## 2. 启动界面 14 | 15 | ③ 把目录定位到sulv-hugo-papermod下,在终端输入`hugo server -D`,在浏览器输入:localhost:1313 即可看到现成的博客模板。 16 | 17 | ## 3. 修改信息 18 | 19 | 模板内部有许多个人信息需要自己配置,请耐心修改完,可以参考博主的建站教程:[https://www.sulvblog.cn/posts/blog/](https://www.sulvblog.cn/posts/blog/) 20 | 21 | ## 4. Hugo博客交流群 22 | 23 | 🎉🎉 787018782 🎉🎉 24 | 25 | ## 5. shortcodes使用方法 26 | 27 | `bilibili: {{< bilibili BV1Fh411e7ZH(填 bvid) >}}` 28 | 29 | `youtube: {{< youtube w7Ft2ymGmfc >}}` 30 | 31 | `ppt: {{< ppt src="网址" >}}` 32 | 33 | `douban: {{< douban src="网址" >}}` 34 | 35 | ``` 36 | # 文章内链卡片 37 | # 末尾要加 md,只能填写相对路径,如下 38 | {{< innerlink src="posts/tech/mysql_1.md" >}} 39 | ``` 40 | 41 | ``` 42 | gallery: 43 | 44 | {{< gallery >}} 45 | {{< figure src="https://www.sulvblog.cn/posts/read/structural_thinking/0.png" >}} 46 | {{< figure src="https://www.sulvblog.cn/posts/read/structural_thinking/0.png" >}} 47 | {{< /gallery >}} 48 | ``` 49 | 50 | ## 5. 可能遇到的问题 51 | 52 | 1. 有些使用者会部署到github,可能遇到跨系统的问题,如提示`LF will be replaced by CRLF in ******`,这时输入命令:`git config core.autocrlf false`,解决换行符自动转换的问题。 -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | lastmod: {{ .Date }} 5 | author: ["Sulv"] 6 | keywords: 7 | - 8 | categories: # 没有分类界面可以不填写 9 | - 10 | tags: # 标签 11 | - 12 | description: "" 13 | weight: 14 | slug: "" 15 | draft: false # 是否为草稿 16 | comments: true # 本页面是否显示评论 17 | reward: true # 打赏 18 | mermaid: true #是否开启mermaid 19 | showToc: true # 显示目录 20 | TocOpen: true # 自动展开目录 21 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 22 | disableShare: true # 底部不显示分享栏 23 | showbreadcrumbs: true #顶部显示路径 24 | cover: 25 | image: "" #图片路径例如:posts/tech/123/123.png 26 | zoom: # 图片大小,例如填写 50% 表示原图像的一半大小 27 | caption: "" #图片底部描述 28 | alt: "" 29 | relative: false 30 | --- 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/assets/.DS_Store -------------------------------------------------------------------------------- /assets/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/assets/css/.DS_Store -------------------------------------------------------------------------------- /assets/css/extended/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/assets/css/extended/.DS_Store -------------------------------------------------------------------------------- /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 | 7 | :root { 8 | --footer-height: 40px; 9 | /*--content-gap: 20px;*/ 10 | /*--content: rgb(80, 80, 80);*/ 11 | /*--hljs-bg: rgb(35, 35, 35);*/ 12 | --hljs-bg: rgb(44, 44, 44); 13 | /*--code-bg: rgb(235, 235, 235);*/ 14 | --code-bg: rgb(240, 240, 240); 15 | --code-bg-border: rgb(200, 200, 200); 16 | --black: rgb(0, 0, 0); 17 | --white: rgb(255, 255, 255); 18 | --tag: rgb(235, 235, 235); 19 | 20 | --nav-width: 1300px; 21 | /*--nav-width: 1024px;*/ 22 | --article-width: 650px; 23 | --toc-width: 300px; 24 | } 25 | 26 | .main { 27 | max-width: calc(var(--main-width) + var(--gap) * 5); 28 | } 29 | 30 | /*页面顶部栏两边宽度*/ 31 | .nav { 32 | max-width: calc(var(--nav-width) + var(--gap) * 10); 33 | } 34 | 35 | body { 36 | font-size: 18px; 37 | line-height: 1.6; 38 | font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; 39 | } 40 | 41 | .post-content { 42 | /*color: var(--secondary);*/ 43 | font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; 44 | } 45 | 46 | .post-content h1 { 47 | font-size: 40px; 48 | } 49 | 50 | .post-content h2 { 51 | font-size: 34px; 52 | } 53 | 54 | .post-content h3 { 55 | font-size: 26px; 56 | } 57 | 58 | .post-content h4 { 59 | font-size: 20px; 60 | } 61 | 62 | .post-content h5 { 63 | font-size: 16px; 64 | } 65 | 66 | .post-content h6 { 67 | font-size: 14px; 68 | } 69 | 70 | .post-content p { 71 | margin-top: 20px; 72 | /*text-indent: 2em;*/ /*所有首行缩进*/ 73 | } 74 | 75 | .dark .post-content h1, .dark .post-content h2, .dark .post-content h3, 76 | .dark .post-content h4, .dark .post-content h5, .dark .post-content h6, 77 | .dark .post-title { 78 | color: var(--content); 79 | } 80 | 81 | .dark h1, .dark h2, 82 | .dark h3, .dark h4, 83 | .dark h5, .dark h6, 84 | .dark p { 85 | color: rgba(180, 181, 182, 0.8); 86 | } 87 | 88 | .post-description { 89 | padding-bottom: 10px; 90 | color: var(--secondary); 91 | } 92 | 93 | .dark body, .dark a, .dark .toc .details { 94 | color: rgba(180, 181, 182, 0.8); 95 | } 96 | 97 | img { 98 | opacity: 1; 99 | border-radius: 10px; 100 | border: 1px solid var(--border); 101 | } 102 | 103 | .dark img { 104 | opacity: 0.8; 105 | border: 1px solid var(--border); 106 | } 107 | 108 | img:active { 109 | transform: scale(1.25, 1.25); 110 | opacity: 1; 111 | z-index: 999; 112 | border: 1px solid var(--border); 113 | } 114 | 115 | @media screen and (min-width: 768px) { 116 | ::-webkit-scrollbar { 117 | width: 13px; 118 | height: 13px; 119 | } 120 | } 121 | 122 | .footer { 123 | max-width: none; 124 | padding: 10px 0 5px 0; 125 | } 126 | 127 | .entry-cover1 { 128 | border-radius: 10px; 129 | display: flex; 130 | justify-content: center; 131 | } 132 | 133 | .post-entry { 134 | display: flex; 135 | flex-direction: row; 136 | align-items: center; 137 | } 138 | 139 | .entry-cover { 140 | border-radius: 10px; 141 | overflow: hidden; 142 | width: 50%; 143 | margin-bottom: unset; 144 | 145 | max-height: 150px; 146 | display: grid; 147 | align-content: center; 148 | } 149 | 150 | .post-info { 151 | display: inline-block; 152 | overflow: hidden; 153 | width: 100%; 154 | padding-right: 10px; 155 | } 156 | 157 | /*top*/ 158 | .topInner { 159 | display: grid; 160 | align-items: baseline; 161 | justify-items: center; 162 | margin: 7px; 163 | font-weight: 900; 164 | } 165 | 166 | .topSvg { 167 | width: 20px; 168 | } 169 | 170 | .top-link { 171 | padding: unset; 172 | } 173 | 174 | /*表格*/ 175 | .post-content table { 176 | word-break: normal; 177 | } 178 | 179 | .post-content table th { 180 | font-size: 18px; 181 | } 182 | 183 | /*首页button*/ 184 | .buttons { 185 | max-width: 100%; 186 | } -------------------------------------------------------------------------------- /assets/css/extended/code.css: -------------------------------------------------------------------------------- 1 | .post-content code { 2 | font-family: consolas, Menlo, "PingFang SC", "Microsoft YaHei", sans-serif; 3 | } 4 | 5 | .post-content pre code { 6 | max-height: 40em; 7 | margin-bottom: 2%; 8 | font-size: 0.75em; 9 | font-family: consolas, Menlo, "PingFang SC", "Microsoft YaHei", sans-serif; 10 | /*border-radius: unset unset var(--radius) var(--radius) !important;*/ 11 | border-top-left-radius: unset; 12 | border-top-right-radius: unset; 13 | border-bottom-left-radius: var(--radius); 14 | border-bottom-right-radius: var(--radius); 15 | } 16 | 17 | .highlight pre { 18 | tab-size: 4 !important; 19 | } 20 | 21 | .post-content .highlight:not(table), .post-content pre { 22 | /*box-shadow: 0px 2px 4px rgb(5 10 15 / 10%), 0px 7px 13px -3px rgb(5 10 15 / 30%);*/ 23 | margin: 50px 0 0 0; 24 | } 25 | 26 | .post-content :not(table) ::-webkit-scrollbar-thumb { 27 | border: 5px solid var(--hljs-bg); 28 | } 29 | 30 | /*解决角落显示方块问题*/ 31 | ::-webkit-scrollbar-corner { 32 | background-color: var(--hljs-bg); 33 | border-radius: 10px; 34 | } 35 | 36 | /*修复代码在ios展示大小不一的问题*/ 37 | code { 38 | text-size-adjust: 100%; 39 | -moz-text-size-adjust: 100%; 40 | -ms-text-size-adjust: 100%; 41 | -webkit-text-size-adjust: 100%; 42 | } 43 | 44 | code[class*="language-"], pre[class*="language-"] { 45 | font-size: 0.75em; 46 | line-height: 1.6; 47 | } 48 | 49 | /*评论区代码*/ 50 | pre[class*="language-"] > code { 51 | border-left: none !important; 52 | font-size: 0.6em; 53 | } 54 | 55 | /*复制按钮*/ 56 | .copy-code { 57 | display: block; 58 | position: absolute; 59 | top: -22px; 60 | right: 8px; 61 | z-index: 1; 62 | color: rgba(255, 255, 255, 0.8); 63 | background: unset; 64 | border-radius: var(--radius); 65 | padding: 0 5px; 66 | font-size: 14px; 67 | user-select: none; 68 | } 69 | 70 | /*mac风格代码*/ 71 | .mac { 72 | width:10px; 73 | height:10px; 74 | border-radius:5px; 75 | float:left; 76 | margin:10px 0 0 5px; 77 | } 78 | .bb1 { 79 | background: #ef4943; 80 | margin-left: 10px; 81 | } 82 | .bb2 { background: #f5b228; } 83 | .bb3 { background: #20d032; } 84 | .language-type { 85 | color: rgba(255,255,255,.8); 86 | position: absolute; 87 | right: 80px; 88 | font-size: 0.9em; 89 | } 90 | .mac-tool { 91 | background: var(--hljs-bg); 92 | border-top-left-radius: var(--radius); 93 | border-top-right-radius: var(--radius); 94 | width: 100%; 95 | position: absolute; 96 | top: -25px; 97 | height: 25px; 98 | } -------------------------------------------------------------------------------- /assets/css/extended/comment.css: -------------------------------------------------------------------------------- 1 | .tk-comments-container { 2 | font-size: 15px; 3 | } 4 | 5 | .pagination__title { 6 | margin-bottom: 30px; 7 | } 8 | 9 | .pagination__title-h { 10 | 11 | } 12 | 13 | .pagination__title hr { 14 | 15 | } 16 | 17 | ul.post-tags-meta a { 18 | color: var(--secondary); 19 | } 20 | 21 | /*评论头部间距*/ 22 | .post-footer { 23 | margin-top: 30px; 24 | margin-bottom: 30px; 25 | } -------------------------------------------------------------------------------- /assets/css/extended/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "MaShanZheng-Regular"; 3 | src: url("/fonts/MaShanZheng-Regular.ttf") format("truetype"); 4 | } 5 | 6 | @font-face { 7 | font-family: "NeverMindHand-Regular"; 8 | src: url("/fonts/NeverMindHand-Regular.ttf") format("truetype"); 9 | } 10 | -------------------------------------------------------------------------------- /assets/css/extended/friend-link.css: -------------------------------------------------------------------------------- 1 | /*友链*/ 2 | .friendurl { 3 | text-decoration: none !important; 4 | color: black; 5 | box-shadow: none !important; 6 | } 7 | 8 | .myfriend { 9 | width: 56px !important; 10 | height: 56px !important; 11 | border-radius: 50% !important; 12 | padding: 2px; 13 | margin-top: 20px !important; 14 | margin-left: 14px !important; 15 | background-color: #fff; 16 | } 17 | 18 | .frienddiv { 19 | overflow: auto; 20 | height: 100px; 21 | width: 49%; 22 | display: inline-block !important; 23 | border-radius: 5px; 24 | background: none; 25 | 26 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 27 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 28 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 29 | 30 | transition: box-shadow 0.4s ease, transform 0.4s ease; 31 | } 32 | 33 | .frienddiv:hover { 34 | background: var(--theme); 35 | 36 | /*-webkit-transform: scale(1.08);*/ 37 | /*-moz-transform: scale(1.08);*/ 38 | /*-ms-transform: scale(1.08);*/ 39 | /*-o-transform: scale(1.08);*/ 40 | /*transform: scale(1.08);*/ 41 | 42 | transition: box-shadow 1s ease, transform 1s ease; 43 | } 44 | 45 | .dark .frienddiv:hover { 46 | background: var(--code-bg); 47 | 48 | /*-webkit-transform: scale(1.08);*/ 49 | /*-moz-transform: scale(1.08);*/ 50 | /*-ms-transform: scale(1.08);*/ 51 | /*-o-transform: scale(1.08);*/ 52 | /*transform: scale(1.08);*/ 53 | 54 | transition: box-shadow 1s ease, transform 1s ease; 55 | } 56 | 57 | .frienddiv:hover .frienddivleft img { 58 | /*transition: 0.9s !important;*/ 59 | /*-webkit-transition: 0.9s !important;*/ 60 | /*-moz-transition: 0.9s !important;*/ 61 | /*-o-transition: 0.9s !important;*/ 62 | /*transform: rotate(360deg) !important;*/ 63 | /*-webkit-transform: rotate(360deg) !important;*/ 64 | /*-moz-transform: rotate(360deg) !important;*/ 65 | /*-o-transform: rotate(360deg) !important;*/ 66 | /*-ms-transform: rotate(360deg) !important;*/ 67 | } 68 | 69 | .frienddivleft { 70 | width: 92px; 71 | float: left; 72 | margin-right: -5px; 73 | } 74 | 75 | .frienddivright { 76 | margin-top: 18px; 77 | margin-right: 18px; 78 | } 79 | 80 | .friendname { 81 | text-overflow: ellipsis; 82 | font-size: 100%; 83 | margin-bottom: 5px; 84 | color: var(--primary); 85 | } 86 | 87 | .friendinfo { 88 | text-overflow: ellipsis; 89 | font-size: 70%; 90 | color: var(--primary); 91 | } 92 | 93 | .dark .friendname, .dark .friendinfo { 94 | color: rgba(180, 181, 182, 0.8); 95 | } 96 | 97 | @media screen and (max-width: 600px) { 98 | .friendinfo { 99 | display: none; 100 | } 101 | 102 | .frienddivleft { 103 | width: 84px; 104 | margin: auto; 105 | } 106 | 107 | .frienddivright { 108 | height: 100%; 109 | margin: auto; 110 | display: flex; 111 | align-items: center; 112 | justify-content: center; 113 | } 114 | 115 | .friendname { 116 | font-size: 18px; 117 | } 118 | } -------------------------------------------------------------------------------- /assets/css/extended/hugo-easy-gallery.css: -------------------------------------------------------------------------------- 1 | /* 2 | Put this file in /static/css/hugo-easy-gallery.css 3 | Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ 4 | */ 5 | 6 | 7 | /* 8 | Grid Layout Styles 9 | */ 10 | .gallery { 11 | overflow: hidden; 12 | margin: 10px; 13 | max-width: 768px; 14 | } 15 | 16 | .gallery .box { 17 | /*filter: blur(3px);*/ 18 | float: left; 19 | position: relative; 20 | /* Default: 1 tile wide */ 21 | width: 100%; 22 | padding-bottom: 100%; 23 | } 24 | 25 | .gallery .box:hover { 26 | /*filter: blur(0);*/ 27 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 28 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 29 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 30 | 31 | transition: box-shadow 0.4s ease, transform 0.4s ease; 32 | } 33 | 34 | .post-content figure > figcaption > p { 35 | color: white; 36 | background-color: rgba(0, 0, 0, 0); 37 | margin: 0; 38 | padding: 0; 39 | } 40 | 41 | @media only screen and (min-width: 365px) { 42 | /* Tablet view: 2 tiles */ 43 | .gallery .box { 44 | width: 50%; 45 | padding-bottom: 50%; 46 | } 47 | } 48 | 49 | @media only screen and (min-width: 480px) { 50 | /* Small desktop / ipad view: 3 tiles */ 51 | .gallery .box { 52 | width: 33.3%; 53 | padding-bottom: 33.3%; /* */ 54 | } 55 | } 56 | 57 | @media only screen and (min-width: 9999px) { 58 | /* Medium desktop: 4 tiles */ 59 | .box { 60 | width: 25%; 61 | padding-bottom: 25%; 62 | } 63 | } 64 | 65 | /* 66 | Transition styles 67 | */ 68 | .gallery.hover-transition figure, 69 | .gallery.hover-effect-zoom .img, 70 | .gallery:not(.caption-effect-appear) figcaption, 71 | .fancy-figure:not(.caption-effect-appear) figcaption { 72 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 73 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 74 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 75 | 76 | transition: box-shadow 0.4s ease, transform 0.4s ease; 77 | } 78 | 79 | /* 80 | figure styles 81 | */ 82 | .gallery figure { 83 | position: relative; /* purely to allow absolution positioning of figcaption */ 84 | overflow: hidden; 85 | } 86 | 87 | .gallery figure { 88 | border-radius: 10px; 89 | position: absolute; 90 | left: 5px; 91 | right: 5px; 92 | top: 5px; 93 | bottom: 5px; 94 | } 95 | 96 | .gallery.hover-effect-grow figure:hover { 97 | transform: scale(1.05); 98 | } 99 | 100 | .gallery.hover-effect-shrink figure:hover { 101 | transform: scale(0.95); 102 | } 103 | 104 | .gallery.hover-effect-slidedown figure:hover { 105 | transform: translateY(5px); 106 | } 107 | 108 | .gallery.hover-effect-slideup figure:hover { 109 | transform: translateY(-5px); 110 | } 111 | 112 | /* 113 | img / a styles 114 | */ 115 | 116 | .gallery .img { 117 | position: absolute; 118 | left: 0; 119 | right: 0; 120 | top: 0; 121 | bottom: 0; 122 | background-size: cover; 123 | background-position: 50% 50%; 124 | background-repeat: no-repeat; 125 | } 126 | 127 | .dark .gallery .img { 128 | opacity: 0.8; 129 | } 130 | 131 | .gallery.hover-effect-zoom figure:hover .img { 132 | transform: scale(1.05); 133 | } 134 | 135 | .gallery img { 136 | display: none; /* only show the img if not inside a gallery */ 137 | } 138 | 139 | figure a { 140 | position: absolute; 141 | left: 0; 142 | right: 0; 143 | top: 0; 144 | bottom: 0; 145 | } 146 | 147 | /* 148 | figcaption styles 149 | */ 150 | .gallery figcaption, 151 | .fancy-figure figcaption { 152 | position: absolute; 153 | bottom: 0; 154 | left: 0; 155 | right: 0; 156 | background: #000; 157 | color: #FFF; 158 | text-align: center; 159 | font-size: 75%; /* change this if you want bigger text */ 160 | background: rgba(0, 0, 0, 0.5); 161 | opacity: 1; 162 | cursor: pointer; 163 | } 164 | 165 | .gallery.caption-position-none figcaption, 166 | .fancy-figure.caption-position-none figcaption { 167 | display: none; 168 | } 169 | 170 | .gallery.caption-position-center figcaption, 171 | .fancy-figure.caption-position-center figcaption { 172 | top: 0; 173 | padding: 40% 5px; 174 | } 175 | 176 | .gallery.caption-position-bottom figcaption, 177 | .fancy-figure.caption-position-bottom figcaption { 178 | padding: 5px; 179 | } 180 | 181 | .gallery.caption-effect-fade figure:not(:hover) figcaption, 182 | .gallery.caption-effect-appear figure:not(:hover) figcaption, 183 | .fancy-figure.caption-effect-fade figure:not(:hover) figcaption, 184 | .fancy-figure.caption-effect-appear figure:not(:hover) figcaption { 185 | background: rgba(0, 0, 0, 0); 186 | opacity: 0; 187 | } 188 | 189 | .gallery.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption, 190 | .fancy-figure.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption { 191 | margin-bottom: -100%; 192 | } 193 | 194 | .gallery.caption-effect-slide.caption-position-center figure:not(:hover) figcaption, 195 | .fancy-figure.caption-effect-slide.caption-position-center figure:not(:hover) figcaption { 196 | top: 100%; 197 | } 198 | 199 | figcaption p { 200 | margin: auto; /* override style in theme */ 201 | } 202 | 203 | -------------------------------------------------------------------------------- /assets/css/extended/reward.css: -------------------------------------------------------------------------------- 1 | /*打赏*/ 2 | #QR { 3 | padding: 10px 0 10px 0; 4 | } 5 | 6 | #QR a { 7 | border: 0 8 | } 9 | 10 | #QR img { 11 | width: 100px; 12 | max-width: 100%; 13 | display: inline-block; 14 | margin: .8em 2em 0 2em 15 | } 16 | 17 | #rewardButton { 18 | /*border:1px solid var(--content);*/ 19 | line-height: 36px; 20 | text-align: center; 21 | height: 36px; 22 | display: block; 23 | border-radius: 4px; 24 | -webkit-transition-duration: .4s; 25 | transition-duration: .4s; 26 | background-color: var(--code-bg); 27 | color: var(--content); 28 | margin: 0 auto; 29 | padding: 0 25px 30 | } 31 | 32 | .dark #rewardButton { 33 | border: 1px solid rgb(55 56 62); 34 | line-height: 36px; 35 | text-align: center; 36 | height: 36px; 37 | display: block; 38 | border-radius: 4px; 39 | -webkit-transition-duration: .4s; 40 | transition-duration: .4s; 41 | background-color: rgb(55 56 62); 42 | /*color: rgb(218 218 219);*/ 43 | color: rgba(180, 181, 182, 0.8); 44 | margin: 0 auto; 45 | padding: 0 25px 46 | } 47 | 48 | #rewardButton:hover { 49 | color: var(--content); 50 | /*border-color: #999;*/ 51 | outline-style: none; 52 | 53 | /*-webkit-transform: scale(1.1);*/ 54 | /*-moz-transform: scale(1.1);*/ 55 | /*-ms-transform: scale(1.1);*/ 56 | /*-o-transform: scale(1.1);*/ 57 | /*transform: scale(1.1);*/ 58 | 59 | transition: box-shadow 0.4s ease, transform 0.4s ease; 60 | } 61 | 62 | .dark #rewardButton:hover { 63 | color: rgba(180,181,182,.8); 64 | background-color: var(--border); 65 | /*border-color: rgb(218 218 219);*/ 66 | outline-style: none; 67 | 68 | /*-webkit-transform: scale(1.1);*/ 69 | /*-moz-transform: scale(1.1);*/ 70 | /*-ms-transform: scale(1.1);*/ 71 | /*-o-transform: scale(1.1);*/ 72 | /*transform: scale(1.1);*/ 73 | 74 | transition: box-shadow 0.4s ease, transform 0.4s ease; 75 | } -------------------------------------------------------------------------------- /assets/css/extended/tag-cloud.css: -------------------------------------------------------------------------------- 1 | /*标签云*/ 2 | .terms-tags { 3 | text-align: center; 4 | } 5 | 6 | .terms-tags a { 7 | border-radius: 30px; 8 | background: none; 9 | transition: transform 0.5s; 10 | } 11 | 12 | .terms-tags a:hover { 13 | background: none; 14 | 15 | /*-webkit-transform: scale(1.2);*/ 16 | /*-moz-transform: scale(1.2);*/ 17 | /*-ms-transform: scale(1.2);*/ 18 | /*-o-transform: scale(1.2);*/ 19 | 20 | /*transform: scale(1.2);*/ 21 | 22 | transition: box-shadow 0.4s ease, transform 0.4s ease; 23 | 24 | } 25 | 26 | .dark .terms-tags a { 27 | background: none; 28 | } 29 | 30 | .dark .terms-tags a:hover { 31 | background: none; 32 | 33 | /*-webkit-transform: scale(1.2);*/ 34 | /*-moz-transform: scale(1.2);*/ 35 | /*-ms-transform: scale(1.2);*/ 36 | /*-o-transform: scale(1.2);*/ 37 | 38 | /*transform: scale(1.2);*/ 39 | 40 | transition: box-shadow 0.4s ease, transform 0.4s ease; 41 | } 42 | 43 | .terms-tags li { 44 | margin: 5px; 45 | } -------------------------------------------------------------------------------- /assets/css/extended/toc.css: -------------------------------------------------------------------------------- 1 | .toc { 2 | margin: 0 2px 40px 2px; 3 | border: 1.2px solid var(--border); 4 | background: var(--entry); 5 | border-radius: var(--radius); 6 | padding: 0.4em; 7 | } 8 | 9 | .toc-container { 10 | margin: 10px 0 0 0; 11 | } 12 | 13 | .toc-container.wide { 14 | position: absolute; 15 | height: 100%; 16 | /*border-right: 1px solid var(--border);*/ 17 | left: calc((var(--toc-width) + var(--gap)) * -0.92); 18 | top: calc(var(--gap) * 1); 19 | width: var(--toc-width); 20 | } 21 | 22 | .wide .toc { 23 | position: sticky; 24 | top: var(--gap); 25 | /*top: 0;*/ 26 | /*top: 15px;*/ 27 | border: unset; 28 | background: unset; 29 | border-radius: unset; 30 | width: 100%; 31 | margin: 0 2px 40px 2px; 32 | } 33 | 34 | .toc details summary { 35 | margin-inline-start: 20px; 36 | padding: 12px 0; 37 | width: 110px; 38 | cursor: pointer; 39 | } 40 | 41 | .toc details[open] summary { 42 | font-weight: 500; 43 | width: 110px; 44 | cursor: pointer; 45 | } 46 | 47 | .toc-container.wide .toc .inner { 48 | margin: 0; 49 | } 50 | 51 | .active { 52 | font-size: 100%; 53 | /*font-weight: 600;*/ 54 | border-bottom: 1px solid transparent; 55 | padding-bottom: 0.1rem; 56 | border-bottom-color: var(--secondary); 57 | font-weight: 600; 58 | } 59 | 60 | .dark .active { 61 | color: var(--content); 62 | font-weight: 600; 63 | } 64 | 65 | .toc ul { 66 | list-style-type: circle; 67 | } 68 | 69 | .toc .inner { 70 | margin: 0 0 0 20px; 71 | padding: 0 15px 15px 20px; 72 | font-size: 16px; 73 | 74 | max-height: 83vh; 75 | overflow-y: auto; 76 | } 77 | 78 | .toc .inner::-webkit-scrollbar-thumb { 79 | background: var(--border); 80 | border: 7px solid var(--theme); 81 | border-radius: var(--radius); 82 | } 83 | 84 | .toc li ul { 85 | margin-inline-start: calc(var(--gap) * 0.5); 86 | list-style-type: none; 87 | } 88 | 89 | .toc li { 90 | list-style: none; 91 | font-size: 0.90rem; 92 | /*padding-bottom: 5px;*/ 93 | padding: 5px 0 0 0; 94 | } 95 | 96 | .toc li a:hover { 97 | font-weight: 600; 98 | } 99 | 100 | .dark .toc li a:hover { 101 | font-weight: 600; 102 | color: var(--content); 103 | } 104 | -------------------------------------------------------------------------------- /assets/css/extended/transition.css: -------------------------------------------------------------------------------- 1 | /*首页笑脸*/ 2 | .profile .profile_inner h1 { 3 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 4 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 5 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 6 | 7 | transition: box-shadow 0.4s ease, transform 0.4s ease; 8 | } 9 | 10 | .profile .profile_inner h1:hover { 11 | /*-webkit-transform: scale(1.1);*/ 12 | /*-moz-transform: scale(1.1);*/ 13 | /*-ms-transform: scale(1.1);*/ 14 | /*-o-transform: scale(1.1);*/ 15 | /*transform: scale(1.1);*/ 16 | 17 | transition: box-shadow 0.4s ease, transform 0.4s ease; 18 | } 19 | 20 | /*变换light dark*/ 21 | #theme-toggle svg { 22 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 23 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 24 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 25 | 26 | transition: box-shadow 0.4s ease, transform 0.4s ease; 27 | } 28 | 29 | #theme-toggle svg:hover { 30 | /*-webkit-transform: scale(1.2);*/ 31 | /*-moz-transform: scale(1.2);*/ 32 | /*-ms-transform: scale(1.2);*/ 33 | /*-o-transform: scale(1.2);*/ 34 | /*transform: scale(1.2);*/ 35 | 36 | transition: box-shadow 0.4s ease, transform 0.4s ease; 37 | } 38 | 39 | button#theme-toggle { 40 | margin: auto 15px; 41 | } 42 | 43 | /*左上角名字*/ 44 | .logo a { 45 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 46 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 47 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 48 | 49 | transition: box-shadow 0.4s ease, transform 0.4s ease; 50 | } 51 | 52 | .logo a:hover { 53 | /*-webkit-transform: scale(1.06);*/ 54 | /*-moz-transform: scale(1.06);*/ 55 | /*-ms-transform: scale(1.06);*/ 56 | /*-o-transform: scale(1.06);*/ 57 | /*transform: scale(1.06);*/ 58 | 59 | transition: box-shadow 0.4s ease, transform 0.4s ease; 60 | } 61 | 62 | .logo a img { 63 | border-radius: 25px; 64 | } 65 | 66 | /*到顶部*/ 67 | .top-link { 68 | background: var(--entry); 69 | 70 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 71 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 72 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 73 | 74 | transition: box-shadow 0.4s ease, transform 0.4s ease; 75 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 76 | } 77 | 78 | .dark .top-link { 79 | background: var(--entry); 80 | 81 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 82 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 83 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 84 | 85 | transition: box-shadow 0.4s ease, transform 0.4s ease; 86 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 87 | } 88 | 89 | .top-link:hover { 90 | color: rgb(108, 108, 108); 91 | 92 | /*-webkit-transform: scale(1.1);*/ 93 | /*-moz-transform: scale(1.1);*/ 94 | /*-ms-transform: scale(1.1);*/ 95 | /*-o-transform: scale(1.1);*/ 96 | /*transform: scale(1.1);*/ 97 | 98 | transition: box-shadow 0.4s ease, transform 0.4s ease; 99 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 100 | } 101 | 102 | .dark .top-link:hover { 103 | color: rgba(180, 181, 182, .8); 104 | 105 | /*-webkit-transform: scale(1.1);*/ 106 | /*-moz-transform: scale(1.1);*/ 107 | /*-ms-transform: scale(1.1);*/ 108 | /*-o-transform: scale(1.1);*/ 109 | 110 | /*transform: scale(1.1);*/ 111 | 112 | transition: box-shadow 0.4s ease, transform 0.4s ease; 113 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 114 | } 115 | 116 | /*搜索*/ 117 | #searchbox input { 118 | } 119 | 120 | #searchbox input:hover { 121 | } 122 | 123 | /*最顶级页面*/ 124 | .list { 125 | } 126 | 127 | /*时间轴*/ 128 | .archive-entry { 129 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 130 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 131 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 132 | 133 | transition: box-shadow 0.4s ease, transform 0.4s ease; 134 | } 135 | 136 | .archive-entry:hover { 137 | /*-webkit-transform: scale(1.02);*/ 138 | /*-moz-transform: scale(1.02);*/ 139 | /*-ms-transform: scale(1.02);*/ 140 | /*-o-transform: scale(1.02);*/ 141 | /*transform: scale(1.02);*/ 142 | 143 | transition: box-shadow 0.4s ease, transform 0.4s ease; 144 | } 145 | 146 | /*文章页*/ 147 | .post-entry { 148 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 149 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 150 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 151 | 152 | transition: box-shadow 0.4s ease, transform 0.4s ease; 153 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 154 | } 155 | 156 | .dark .post-entry { 157 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 158 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 159 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 160 | 161 | transition: box-shadow 0.4s ease, transform 0.4s ease; 162 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 163 | } 164 | 165 | .post-entry:hover { 166 | /*-webkit-transform: scale(1.02);*/ 167 | /*-moz-transform: scale(1.02);*/ 168 | /*-ms-transform: scale(1.02);*/ 169 | /*-o-transform: scale(1.02);*/ 170 | /*transform: scale(1.02);*/ 171 | 172 | transition: box-shadow 0.4s ease, transform 0.4s ease; 173 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 174 | } 175 | 176 | .dark .post-entry:hover { 177 | /*-webkit-transform: scale(1.02);*/ 178 | /*-moz-transform: scale(1.02);*/ 179 | /*-ms-transform: scale(1.02);*/ 180 | /*-o-transform: scale(1.02);*/ 181 | /*transform: scale(1.02);*/ 182 | 183 | transition: box-shadow 0.4s ease, transform 0.4s ease; 184 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 185 | } 186 | 187 | /*首页按钮*/ 188 | .button { 189 | background: var(--entry); 190 | 191 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 192 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 193 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 194 | 195 | transition: box-shadow 0.4s ease, transform 0.4s ease; 196 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 197 | } 198 | 199 | .dark .button { 200 | background: var(--entry); 201 | 202 | -webkit-transition: box-shadow 0.4s ease, transform 0.4s ease; 203 | -moz-transition: box-shadow 0.4s ease, transform 0.4s ease; 204 | -o-transition: box-shadow 0.4s ease, transform 0.4s ease; 205 | 206 | transition: box-shadow 0.4s ease, transform 0.4s ease; 207 | box-shadow: 0px 2px 4px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 208 | } 209 | 210 | .button:hover { 211 | /*-webkit-transform: scale(1.1);*/ 212 | /*-moz-transform: scale(1.1);*/ 213 | /*-ms-transform: scale(1.1);*/ 214 | /*-o-transform: scale(1.1);*/ 215 | 216 | /*transform: scale(1.1);*/ 217 | 218 | transition: box-shadow 0.4s ease, transform 0.4s ease; 219 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 220 | /*-webkit-transform: translateY(-4px);*/ 221 | /*-moz-transform: translateY(-4px);*/ 222 | /*-ms-transform: translateY(-4px);*/ 223 | /*-o-transform: translateY(-4px);*/ 224 | /*transform: translateY(-4px);*/ 225 | } 226 | 227 | .dark .button:hover { 228 | /*-webkit-transform: scale(1.1);*/ 229 | /*-moz-transform: scale(1.1);*/ 230 | /*-ms-transform: scale(1.1);*/ 231 | /*-o-transform: scale(1.1);*/ 232 | 233 | /*transform: scale(1.1);*/ 234 | 235 | transition: box-shadow 0.4s ease, transform 0.4s ease; 236 | box-shadow: 0px 4px 8px rgb(5 10 15 / 5%), 0px 7px 13px -3px rgb(5 10 15 / 30%); 237 | } -------------------------------------------------------------------------------- /assets/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/assets/js/.DS_Store -------------------------------------------------------------------------------- /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/load-photoswipe.js: -------------------------------------------------------------------------------- 1 | /* 2 | Put this file in /static/js/load-photoswipe.js 3 | Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ 4 | */ 5 | 6 | /* Show an alert if this js file has been loaded twice */ 7 | if (window.loadphotoswipejs) { 8 | window.alert("You've loaded load-photoswipe.js twice. See https://github.com/liwenyip/hugo-easy-gallery/issues/6") 9 | } 10 | var loadphotoswipejs = 1 11 | 12 | /* TODO: Make the share function work */ 13 | $( document ).ready(function() { 14 | /* 15 | Initialise Photoswipe 16 | */ 17 | var items = []; // array of slide objects that will be passed to PhotoSwipe() 18 | // for every figure element on the page: 19 | $('figure').each( function() { 20 | if ($(this).attr('class') == 'no-photoswipe') return true; // ignore any figures where class="no-photoswipe" 21 | // get properties from child a/img/figcaption elements, 22 | var $figure = $(this), 23 | $a = $figure.find('a'), 24 | $img = $figure.find('img'), 25 | $src = $a.attr('href'), 26 | $title = $img.attr('alt'), 27 | $msrc = $img.attr('src'); 28 | // if data-size on tag is set, read it and create an item 29 | if ($a.data('size')) { 30 | var $size = $a.data('size').split('x'); 31 | var item = { 32 | src : $src, 33 | w : $size[0], 34 | h : $size[1], 35 | title : $title, 36 | msrc : $msrc 37 | }; 38 | console.log("Using pre-defined dimensions for " + $src); 39 | // if not, set temp default size then load the image to check actual size 40 | } else { 41 | var item = { 42 | src : $src, 43 | w : 800, // temp default size 44 | h : 600, // temp default size 45 | title : $title, 46 | msrc : $msrc 47 | }; 48 | console.log("Using default dimensions for " + $src); 49 | // load the image to check its dimensions 50 | // update the item as soon as w and h are known (check every 30ms) 51 | var img = new Image(); 52 | img.src = $src; 53 | var wait = setInterval(function() { 54 | var w = img.naturalWidth, 55 | h = img.naturalHeight; 56 | if (w && h) { 57 | clearInterval(wait); 58 | item.w = w; 59 | item.h = h; 60 | console.log("Got actual dimensions for " + img.src); 61 | } 62 | }, 30); 63 | } 64 | // Save the index of this image then add it to the array 65 | var index = items.length; 66 | items.push(item); 67 | // Event handler for click on a figure 68 | $figure.on('click', function(event) { 69 | event.preventDefault(); // prevent the normal behaviour i.e. load the hyperlink 70 | // Get the PSWP element and initialise it with the desired options 71 | var $pswp = $('.pswp')[0]; 72 | var options = { 73 | index: index, 74 | bgOpacity: 0.8, 75 | showHideOpacity: true 76 | } 77 | new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init(); 78 | }); 79 | }); 80 | }); -------------------------------------------------------------------------------- /config.yml: -------------------------------------------------------------------------------- 1 | baseURL: https://xyming108.github.io/ # 绑定的域名 2 | languageCode: zh # en-us 3 | title: Sulv's Blog 4 | theme: hugo-PaperMod # 主题名字,和themes文件夹下的一致 5 | 6 | enableInlineShortcodes: true 7 | enableEmoji: true # 允许使用 Emoji 表情,建议 true 8 | enableRobotsTXT: true # 允许爬虫抓取到搜索引擎,建议 true 9 | hasCJKLanguage: true # 自动检测是否包含 中文日文韩文 如果文章中使用了很多中文引号的话可以开启 10 | 11 | buildDrafts: false 12 | buildFuture: false 13 | buildExpired: false 14 | 15 | googleAnalytics: # 谷歌统计 16 | # Copyright: Sulv 17 | 18 | paginate: 15 # 首页每页显示的文章数 19 | summaryLength: 140 # 文章概览的自字数,默认70 20 | 21 | minify: 22 | disableXML: true 23 | # minifyOutput: true 24 | 25 | permalinks: # 访问博客时网址的显示形式 26 | post: "/:title/" 27 | # post: "/:year/:month/:day/:title/" 28 | 29 | defaultContentLanguage: zh # 最顶部首先展示的语言页面 30 | defaultContentLanguageInSubdir: false 31 | 32 | menu: 33 | main: 34 | - identifier: search 35 | name: 🔍 搜索 36 | url: search 37 | weight: 1 38 | - identifier: home 39 | name: 🏠 主页 40 | url: / 41 | weight: 2 42 | - identifier: posts 43 | name: 📚 文章 44 | url: posts 45 | weight: 3 46 | - identifier: tags 47 | name: 🧩 标签 48 | url: tags 49 | weight: 15 50 | - identifier: archives 51 | name: ⏱️ 时间轴 52 | url: archives/ 53 | weight: 20 54 | - identifier: about 55 | name: 🙋🏻‍♂️ 关于 56 | url: about 57 | weight: 50 58 | - identifier: links 59 | name: 🤝 友链 60 | url: links 61 | weight: 60 62 | 63 | outputs: 64 | home: 65 | - HTML 66 | - RSS 67 | - JSON 68 | 69 | # 这里的参数会被代码以 .Site.Params 的形式读取 70 | params: 71 | env: production # to enable google analytics, opengraph, twitter-cards and schema. 72 | description: "" 73 | author: Sulv 74 | # author: ["Me", "You"] # multiple authors 75 | 76 | defaultTheme: auto # defaultTheme: light or dark 77 | disableThemeToggle: false 78 | DateFormat: "2006-01-02" 79 | ShowShareButtons: true 80 | ShowReadingTime: true 81 | # disableSpecialistPost: true 82 | displayFullLangName: true 83 | ShowPostNavLinks: true 84 | ShowBreadCrumbs: true 85 | ShowCodeCopyButtons: true 86 | hideFooter: false # 隐藏页脚 87 | ShowWordCounts: true 88 | VisitCount: true 89 | ShowLastMod: true #显示文章更新时间 90 | 91 | ShowToc: true # 显示目录 92 | TocOpen: true # 自动展开目录 93 | 94 | extendCodeBackground: false # 代码块是否自动横向展开 95 | 96 | comments: true 97 | 98 | profileMode: 99 | enabled: true 100 | title: (〃'▽'〃) 101 | subtitle: 102 | # subtitle: "🧨学而时习之,不亦说乎?有朋自远方来,不亦乐乎?
    👇联系方式" 103 | imageUrl: "img/Q.gif" 104 | imageTitle: 105 | imageWidth: 150 106 | imageHeight: 150 107 | buttons: 108 | - name: 🧱 建站 109 | url: posts/blog 110 | - name: 👨🏻‍💻 技术 111 | url: posts/tech 112 | - name: 📕 阅读 113 | url: posts/read 114 | - name: 🏖 生活 115 | url: posts/life 116 | 117 | socialIcons: 118 | - name: github 119 | url: "https://github.com/xyming108" 120 | - name: twitter 121 | url: "img/twitter.png" 122 | - name: facebook 123 | url: "https://www.facebook.com/profile.php?id=100027782410997" 124 | - name: instagram 125 | url: "img/instagram.png" 126 | - name: QQ 127 | url: "img/qq.png" 128 | - name: WeChat 129 | url: "img/wechat.png" 130 | - name: bilibili 131 | url: "https://space.bilibili.com/234461224" 132 | - name: email 133 | url: "mailto:1931559710@qq.com" 134 | - name: RSS 135 | url: "index.xml" 136 | 137 | label: # 左上角图标 138 | text: "Sulv's Blog" 139 | icon: "img/Q.gif" 140 | iconHeight: 35 141 | 142 | analytics: 143 | google: 144 | SiteVerificationTag: "" 145 | 146 | assets: 147 | favicon: "img/Q.gif" 148 | favicon16x16: "img/Q.gif" 149 | favicon32x32: "img/Q.gif" 150 | apple_touch_icon: "img/Q.gif" 151 | safari_pinned_tab: "img/Q.gif" 152 | disableFingerprinting: true # 禁用指纹 153 | 154 | cover: 155 | hidden: false # hide everywhere but not in structured data 156 | hiddenInList: false # hide on list pages and home 157 | hiddenInSingle: false # hide on single page 158 | 159 | fuseOpts: # 搜索配置 160 | isCaseSensitive: false 161 | shouldSort: true 162 | location: 0 163 | distance: 1000 164 | threshold: 0.4 165 | minMatchCharLength: 0 166 | keys: [ "title", "permalink", "summary" ] 167 | 168 | StartYear: 2020 # 底部开始年份 169 | FilingNo: 填写自己的备案号 # 底部备案号 170 | PublicSecurityIconLink: 填自己的公安图标链接 # 填自己的公安图标链接,可用绝对路径,相对路径如 img/beian.png 171 | PublicNetworkSecurity: 填自己的公网安备 # 底部公网安备号 172 | 173 | Reward: true #打赏是否开启 174 | # 打赏微信图片地址, 175 | # 可用绝对和相对地址,相对地址的图片需放在static/img下, 176 | # 填写格式为img/wechat_pay.png 177 | WechatPay: img/wechat_pay.png 178 | Alipay: img/alipay.png #打赏支付宝图片地址 179 | 180 | # twikoo评论 181 | twikoo: 182 | version: 1.5.8 # 填写twikoo版本号 183 | id: # 填写自己的twikoo id 184 | region: # 环境地域,默认为 ap-shanghai,如果您的环境地域不是上海,需传此参数,请看twikoo官方文档 185 | 186 | taxonomies: 187 | category: categories 188 | tag: tags 189 | series: series 190 | 191 | markup: 192 | goldmark: 193 | renderer: 194 | unsafe: true # HUGO 默认转义 Markdown 文件中的 HTML 代码,如需开启的话 195 | highlight: 196 | # anchorLineNos: true 197 | codeFences: true 198 | guessSyntax: true 199 | # lineNos: true 200 | noClasses: true 201 | tabWidth: 4 202 | style: monokai 203 | # codeFences:代码围栏功能,这个功能一般都要设为 true 的,不然很难看,就是干巴巴的-代码文字,没有颜色。 204 | # guessSyntax:猜测语法,这个功能建议设置为 true, 如果你没有设置要显示的语言则会自动匹配。 205 | # hl_Lines:高亮的行号,一般这个不设置,因为每个代码块我们可能希望让高亮的地方不一样。 206 | # lineNoStart:行号从编号几开始,一般从 1 开始。 207 | # lineNos:是否显示行号,我比较喜欢显示,所以我设置的为 true. 208 | # lineNumbersInTable:使用表来格式化行号和代码,而不是 标签。这个属性一般设置为 true. 209 | # noClasses:使用 class 标签,而不是内嵌的内联样式 210 | 211 | privacy: 212 | vimeo: 213 | disabled: false 214 | simple: true 215 | 216 | twitter: 217 | disabled: false 218 | enableDNT: true 219 | simple: true 220 | 221 | instagram: 222 | disabled: false 223 | simple: true 224 | 225 | youtube: 226 | disabled: false 227 | privacyEnhanced: true 228 | 229 | services: 230 | instagram: 231 | disableInlineCSS: true 232 | twitter: 233 | disableInlineCSS: true 234 | -------------------------------------------------------------------------------- /content/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/.DS_Store -------------------------------------------------------------------------------- /content/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🙋🏻‍♂️关于" 3 | layout: about 4 | date: 2021-11-06T14:57:28+08:00 5 | hidemeta: true 6 | description: "" 7 | weight: 8 | slug: "" 9 | draft: false # 是否为草稿 10 | comments: true 11 | reward: false 12 | showToc: false # 显示目录 13 | TocOpen: false # 自动展开目录 14 | disableShare: true # 底部不显示分享栏 15 | showbreadcrumbs: false 16 | cover: 17 | image: "" 18 | caption: "" 19 | alt: "" 20 | relative: false 21 | --- 22 | 23 | 24 | 25 |

    关于我

    26 | 27 | | | | 28 | | --------- | ------------------ | 29 | | 英文名: | Kevin Xu | 30 | | 职业: | 程序员 | 31 | | 运动: | 跑步、乒乓球、爬山 | -------------------------------------------------------------------------------- /content/archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "⏱️时间轴" 3 | layout: archives 4 | summary: archives 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /content/links.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🤝友链" 3 | layout: links 4 | date: 2021-11-06T15:15:53+08:00 5 | description: 6 | draft: false 7 | hidemeta: true 8 | showToc: false 9 | disableShare: true 10 | comments: true 11 | reward: false 12 | showbreadcrumbs: false 13 | --- 14 | 15 |
    16 | 17 | {{< friend name="Sulv's Blog" url="https://www.sulvblog.cn" logo="https://www.sulvblog.cn/img/Q.gif" word="一个记录技术、阅读、生活的博客" >}} 18 | 19 | 20 |
    21 | 22 |
    23 |
    24 |
    25 |
    26 |
    27 | 28 | 29 | 30 |
    👉友链格式
    31 | 32 |
    33 | 34 | 35 | | | | 36 | | ------ | --------------------------------- | 37 | | 名称: | Sulv's Blog | 38 | | 网址: | https://www.sulvblog.cn | 39 | | 图标: | https://www.sulvblog.cn/img/Q.gif | 40 | | 描述: | 一个记录技术、阅读、生活的博客 | 41 | 42 |
    43 | 44 |
    45 | 46 |
    👉友链申请要求
    47 | 48 | > 秉承互换友链原则、文章定期更新、不能有太多广告、个人描述字数控制在15字内 49 | 50 |
    51 | 52 |
    👉Hugo博客交流群
    53 | 54 | > 787018782 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /content/posts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/.DS_Store -------------------------------------------------------------------------------- /content/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "📚文章" 3 | # description: "时间就像海绵里的水,只要愿挤,总还是有的         ——鲁迅" 4 | hidemeta: true # 是否隐藏文章的元信息,如发布日期、作者等 5 | --- -------------------------------------------------------------------------------- /content/posts/blog/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/blog/.DS_Store -------------------------------------------------------------------------------- /content/posts/blog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🧱 建站" 3 | # description: "本博客的搭建经验都在这里" 4 | hidemeta: true # 是否隐藏文章的元信息,如发布日期、作者等 5 | --- -------------------------------------------------------------------------------- /content/posts/blog/blog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Blog" 3 | date: 2022-05-05T00:18:23+08:00 4 | lastmod: 2022-05-05T00:18:23+08:00 5 | author: ["Sulv"] 6 | keywords: 7 | - 8 | categories: 9 | - 10 | tags: 11 | - blog 12 | description: "" 13 | weight: 14 | slug: "" 15 | draft: false # 是否为草稿 16 | comments: true 17 | reward: true # 打赏 18 | mermaid: true #是否开启mermaid 19 | showToc: true # 显示目录 20 | TocOpen: true # 自动展开目录 21 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 22 | disableShare: true # 底部不显示分享栏 23 | showbreadcrumbs: true #顶部显示路径 24 | cover: 25 | image: "" #图片路径例如:posts/tech/123/123.png 26 | caption: "" #图片底部描述 27 | alt: "" 28 | relative: false 29 | --- 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /content/posts/life/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/life/.DS_Store -------------------------------------------------------------------------------- /content/posts/life/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🏖 生活" 3 | # description: "记录生活、热爱生活、感受生活" 4 | hidemeta: true # 是否隐藏文章的元信息,如发布日期、作者等 5 | --- -------------------------------------------------------------------------------- /content/posts/life/life.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Life" 3 | date: 2022-05-05T00:18:15+08:00 4 | lastmod: 2022-05-05T00:18:15+08:00 5 | author: ["Sulv"] 6 | keywords: 7 | - 8 | categories: 9 | - 10 | tags: 11 | - life 12 | description: "" 13 | weight: 14 | slug: "" 15 | draft: false # 是否为草稿 16 | comments: true 17 | reward: true # 打赏 18 | mermaid: true #是否开启mermaid 19 | showToc: true # 显示目录 20 | TocOpen: true # 自动展开目录 21 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 22 | disableShare: true # 底部不显示分享栏 23 | showbreadcrumbs: true #顶部显示路径 24 | cover: 25 | image: "" #图片路径例如:posts/tech/123/123.png 26 | caption: "" #图片底部描述 27 | alt: "" 28 | relative: false 29 | --- 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /content/posts/read/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/read/.DS_Store -------------------------------------------------------------------------------- /content/posts/read/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "📕 阅读" 3 | # description: "读书如不及时做笔记,犹如雨落大海没有踪迹" 4 | hidemeta: true # 是否隐藏文章的元信息,如发布日期、作者等 5 | --- -------------------------------------------------------------------------------- /content/posts/read/read.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Read" 3 | date: 2022-05-05T00:18:06+08:00 4 | lastmod: 2022-05-05T00:18:06+08:00 5 | author: ["Sulv"] 6 | keywords: 7 | - 8 | categories: 9 | - 10 | tags: 11 | - read 12 | description: "" 13 | weight: 14 | slug: "" 15 | draft: false # 是否为草稿 16 | comments: true 17 | reward: true # 打赏 18 | mermaid: true #是否开启mermaid 19 | showToc: true # 显示目录 20 | TocOpen: true # 自动展开目录 21 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 22 | disableShare: true # 底部不显示分享栏 23 | showbreadcrumbs: true #顶部显示路径 24 | cover: 25 | image: "" #图片路径例如:posts/tech/123/123.png 26 | caption: "" #图片底部描述 27 | alt: "" 28 | relative: false 29 | --- 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /content/posts/tech/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/tech/.DS_Store -------------------------------------------------------------------------------- /content/posts/tech/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "👨🏻‍💻 技术" 3 | # description: "不积跬步,无以至千里;不积小流,无以成江海" 4 | hidemeta: true # 是否隐藏文章的元信息,如发布日期、作者等 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /content/posts/tech/tech.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Tech" 3 | date: 2022-05-05T00:17:58+08:00 4 | lastmod: 2022-05-05T00:17:58+08:00 5 | author: ["Sulv"] 6 | keywords: 7 | - 8 | categories: 9 | - 10 | tags: 11 | - tech 12 | description: "科技代码" 13 | weight: 14 | slug: "" 15 | draft: false # 是否为草稿 16 | comments: true 17 | reward: true # 打赏 18 | mermaid: true #是否开启mermaid 19 | showToc: true # 显示目录 20 | TocOpen: true # 自动展开目录 21 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 22 | disableShare: true # 底部不显示分享栏 23 | showbreadcrumbs: true #顶部显示路径 24 | cover: 25 | image: "https://www.sulvblog.cn/posts/blog/how_to_write_a_blog/1.png" #图片路径例如:posts/tech/123/123.png 26 | caption: "" #图片底部描述 27 | alt: "" 28 | relative: false 29 | --- 30 | 31 | 32 | ```html 33 |
    34 | 科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码科技代码 35 | 科技代码 36 | 科技代码 37 | 科技代码 38 | 科技代码 39 | 科技代码 40 | 科技代码 41 | 科技代码 42 | 科技代码 43 | 科技代码 44 | 科技代码 45 | 科技代码 46 | 科技代码 47 | 科技代码 48 | 科技代码 49 | 科技代码 50 | 科技代码 51 | 科技代码 52 | 科技代码 53 | 科技代码 54 | 科技代码 55 | 科技代码 56 | 科技代码 57 | 科技代码 58 | 科技代码 59 | 科技代码 60 | 科技代码 61 | 科技代码 62 | 科技代码 63 | 科技代码 64 | 科技代码 65 | 科技代码 66 |
    67 | ``` 68 | 69 | -------------------------------------------------------------------------------- /content/posts/tech/tech1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Redis scan命令学习" 3 | date: 2022-11-30T15:55:23+08:00 4 | lastmod: 2022-11-30T15:55:23+08:00 5 | author: ["Sulv"] 6 | keywords: 7 | - Redis 8 | categories: 9 | - Redis 10 | tags: 11 | - Redis 12 | - tech 13 | description: "scan命令详解" 14 | weight: 15 | slug: "" 16 | draft: false # 是否为草稿 17 | comments: true 18 | reward: true # 打赏 19 | mermaid: false # 是否开启mermaid 20 | showToc: true # 显示目录 21 | TocOpen: true # 自动展开目录 22 | hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等 23 | disableShare: true # 底部不显示分享栏 24 | showbreadcrumbs: true # 顶部显示路径 25 | cover: 26 | image: "" # 图片路径:posts/tech/123/123.png 27 | caption: "" # 图片底部描述 28 | alt: "" 29 | relative: false 30 | --- 31 | 32 | 33 | 34 | ## 1. 介绍 35 | 36 | `scan`命令的作用和`keys *`的作用类似,主要用于查找redis中的键,但是在正式的生产环境中一般不会直接使用`keys *`这个命令,因为他会返回所有的键,如果键的数量很多会导致查询时间很长,进而导致服务器阻塞,所以需要scan来进行更细致的查找 37 | 38 | `scan`总共有这几种命令:`scan`、`sscan`、`hscan`、`zscan`,分别用于迭代数据库中的:数据库中所有键、集合键、哈希键、有序集合键,命令具体结构如下: 39 | 40 | ```bash 41 | scan cursor [MATCH pattern] [COUNT count] [TYPE type] 42 | sscan key cursor [MATCH pattern] [COUNT count] 43 | hscan key cursor [MATCH pattern] [COUNT count] 44 | zscan key cursor [MATCH pattern] [COUNT count] 45 | ``` 46 | 47 | ## 2. scan 48 | 49 | `scan cursor [MATCH pattern] [COUNT count] [TYPE type]`,cursor表示游标,指查询开始的位置,count默认为10,查询完后会返回下一个开始的游标,当返回0的时候表示所有键查询完了 50 | 51 | ```bash 52 | 127.0.0.1:6379[2]> scan 0 53 | 1) "3" 54 | 2) 1) "mystring" 55 | 2) "myzadd" 56 | 3) "myhset" 57 | 4) "mylist" 58 | 5) "myset2" 59 | 6) "myset1" 60 | 7) "mystring1" 61 | 8) "mystring3" 62 | 9) "mystring4" 63 | 10) "myset" 64 | 127.0.0.1:6379[2]> scan 3 65 | 1) "0" 66 | 2) 1) "myzadd1" 67 | 2) "mystring2" 68 | 3) "mylist2" 69 | 4) "myhset1" 70 | 5) "mylist1" 71 | ``` 72 | 73 | MATCH可以采用模糊匹配找出自己想要查找的键,这里的逻辑是先查出20个,再匹配,而不是先匹配再查询,这里加上count 20是因为默认查出的10个数中可能不能包含所有的相关项,所以把范围扩大到查20个,我这里测试的键总共有15个 74 | 75 | ```bash 76 | 127.0.0.1:6379[2]> scan 0 match mylist* count 20 77 | 1) "0" 78 | 2) 1) "mylist" 79 | 2) "mylist2" 80 | 3) "mylist1" 81 | ``` 82 | 83 | TYPE可以根据具体的结构类型来匹配该类型的键 84 | 85 | ```bash 86 | 127.0.0.1:6379[2]> scan 0 count 20 type list 87 | 1) "0" 88 | 2) 1) "mylist" 89 | 2) "mylist2" 90 | 3) "mylist1" 91 | ``` 92 | 93 | ## 3. sscan 94 | 95 | `sscan key cursor [MATCH pattern] [COUNT count]`,sscan的第一个参数总是集合类型的key 96 | 97 | ```bash 98 | 127.0.0.1:6379[2]> sadd myset1 a b c d 99 | (integer) 4 100 | 127.0.0.1:6379[2]> smembers myset1 101 | 1) "d" 102 | 2) "a" 103 | 3) "c" 104 | 4) "b" 105 | 127.0.0.1:6379[2]> sscan myset1 0 106 | 1) "0" 107 | 2) 1) "d" 108 | 2) "c" 109 | 3) "b" 110 | 4) "a" 111 | 127.0.0.1:6379[2]> sscan myset1 0 match a 112 | 1) "0" 113 | 2) 1) "a" 114 | ``` 115 | 116 | ## 4. hscan 117 | 118 | `hscan key cursor [MATCH pattern] [COUNT count]`,sscan的第一个参数总是哈希类型的key 119 | 120 | ```bash 121 | 127.0.0.1:6379[2]> hset myhset1 kk1 vv1 kk2 vv2 kk3 vv3 122 | (integer) 3 123 | 127.0.0.1:6379[2]> hgetall myhset1 124 | 1) "kk1" 125 | 2) "vv1" 126 | 3) "kk2" 127 | 4) "vv2" 128 | 5) "kk3" 129 | 6) "vv3" 130 | 127.0.0.1:6379[2]> hscan myhset1 0 131 | 1) "0" 132 | 2) 1) "kk1" 133 | 2) "vv1" 134 | 3) "kk2" 135 | 4) "vv2" 136 | 5) "kk3" 137 | 6) "vv3" 138 | ``` 139 | 140 | ## 5. zscan 141 | 142 | `zscan key cursor [MATCH pattern] [COUNT count]`,sscan的第一个参数总是有序集合类型的key 143 | 144 | ```bash 145 | 127.0.0.1:6379[2]> zadd myzadd1 1 zz1 2 zz2 3 zz3 146 | (integer) 3 147 | 127.0.0.1:6379[2]> zrange myzadd1 0 -1 withscores 148 | 1) "zz1" 149 | 2) "1" 150 | 3) "zz2" 151 | 4) "2" 152 | 5) "zz3" 153 | 6) "3" 154 | 127.0.0.1:6379[2]> zscan myzadd1 0 155 | 1) "0" 156 | 2) 1) "zz1" 157 | 2) "1" 158 | 3) "zz2" 159 | 4) "2" 160 | 5) "zz3" 161 | 6) "3" 162 | ``` 163 | -------------------------------------------------------------------------------- /content/posts/tech/tech1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/content/posts/tech/tech1/1.png -------------------------------------------------------------------------------- /content/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🔍搜索" 3 | layout: search 4 | --- 5 | -------------------------------------------------------------------------------- /content/tags/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🧩 标签" 3 | layout: tags 4 | summary: tags 5 | --- -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/data/.DS_Store -------------------------------------------------------------------------------- /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 min" 10 | other: "{{ .Count }} min" 11 | 12 | - id: toc 13 | translation: "Inhaltsverzeichnis" 14 | 15 | - id: translations 16 | translation: "Übersetzungen" 17 | 18 | - id: edit_post 19 | translation: "Bearbeiten" 20 | -------------------------------------------------------------------------------- /i18n/en.yaml: -------------------------------------------------------------------------------- 1 | - id: prev_page 2 | translation: "上一页" 3 | # translation: "Prev Page" 4 | 5 | - id: next_page 6 | translation: "下一页" 7 | # translation: "Next Page" 8 | 9 | - id: read_time 10 | translation: 11 | # one : "时长: 1分钟" 12 | # other: "时长: {{ .Count }}分钟" 13 | one : "1 min" 14 | other: "{{ .Count }} min" 15 | 16 | - id: words 17 | translation: 18 | one : "word" 19 | other: "{{ .Count }} 字" 20 | 21 | - id: toc 22 | translation: "文章目录" 23 | # translation: "Table of Contents" 24 | 25 | - id: translations 26 | translation: "Translations" 27 | 28 | - id: home 29 | translation: "主页" 30 | # translation: "Home" 31 | 32 | - id: edit_post 33 | translation: "编辑" 34 | 35 | - id: code_copy 36 | translation: "📄复制" 37 | # translation: "copy" 38 | 39 | - id: code_copied 40 | translation: "👌🏻已复制!" 41 | # translation: "copied!" 42 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Tabla de Contenidos" 14 | 15 | - id: translations 16 | translation: "Traducciones" 17 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Table des Matières" 14 | 15 | - id: translations 16 | translation: "Traductions" 17 | 18 | - id: home 19 | translation: "Accueil" 20 | 21 | - id: edit_post 22 | translation: "Modifier" 23 | 24 | - id: code_copy 25 | translation: "copier" 26 | 27 | - id: code_copied 28 | translation: "copié!" 29 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Tabella dei Contenuti" 14 | 15 | - id: translations 16 | translation: "Traduzioni" 17 | 18 | - id: code_copy 19 | translation: "copia" 20 | 21 | - id: code_copied 22 | translation: "copiato!" 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Inhoudsopgave" 14 | 15 | - id: translations 16 | translation: "Vertalingen" 17 | 18 | - id: home 19 | translation: "Startpagina" 20 | 21 | - id: edit_post 22 | translation: "Bewerk" 23 | 24 | - id: code_copy 25 | translation: "kopieer" 26 | 27 | - id: code_copied 28 | translation: "gekopieerd!" 29 | -------------------------------------------------------------------------------- /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: toc 13 | translation: "Conteúdo" 14 | 15 | - id: translations 16 | translation: "Traduções" 17 | -------------------------------------------------------------------------------- /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/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: 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/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: 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 | -------------------------------------------------------------------------------- /layouts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/layouts/.DS_Store -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 |
    404
    3 | {{- end }}{{/* end main */ -}} 4 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ .Text }} 2 | -------------------------------------------------------------------------------- /layouts/_default/archives.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 |
    29 | 30 | {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} 31 | 32 | {{- if site.Params.ShowAllPagesInArchive }} 33 | {{- $pages = site.RegularPages }} 34 | {{- end }} 35 | 36 | {{- range $pages.GroupByPublishDate "2006" }} 37 | {{- if ne .Key "0001" }} 38 |
    39 |

    40 | {{- replace .Key "0001" "" }}  {{ len .Pages }} 41 |

    42 | {{- range .Pages.GroupByDate "January" }} 43 |
    44 |

    {{- .Key }}  {{ len .Pages }}

    45 |
    46 | {{- range .Pages }} 47 | {{- if eq .Kind "page" }} 48 |
    49 |

    50 | {{- .Title | markdownify }} 51 | {{- if .Draft }}  [draft]{{- end }} 52 |

    53 |
    54 | {{- partial "post_meta.html" . -}} 55 |
    56 | 57 |
    58 | {{- end }} 59 | {{- end }} 60 |
    61 |
    62 | {{- end }} 63 |
    64 | {{- end }} 65 | {{- end }} 66 | 67 | {{- end }}{{/* end main */}} 68 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{- partial "head.html" . }} 6 | 7 | 8 | 16 | {{- partialCached "header.html" . .Page -}} 17 |
    18 | {{- block "main" . }}{{ end }} 19 |
    20 | {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /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 | 17 | {{- end }} 18 | 19 | {{- if .Content }} 20 |
    21 | {{- if not (.Param "disableAnchoredHeadings") }} 22 | {{- partial "anchored_headings.html" .Content -}} 23 | {{- else }}{{ .Content }}{{ end }} 24 |
    25 | {{- end }} 26 | 27 | {{- $pages := union .RegularPages .Sections }} 28 | 29 | {{- if .IsHome }} 30 | {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} 31 | {{- end }} 32 | 33 | {{- $paginator := .Paginate $pages }} 34 | 35 | {{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} 36 | {{- partial "home_info.html" . }} 37 | {{- end }} 38 | 39 | {{- $term := .Data.Term }} 40 | {{- range $index, $page := $paginator.Pages }} 41 | 42 | {{- $class := "post-entry" }} 43 | 44 | {{- $user_preferred := or .Site.Params.disableSpecial1stPost .Site.Params.homeInfoParams }} 45 | {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} 46 | {{- $class = "first-entry" }} 47 | {{- else if $term }} 48 | 49 | {{- $class = "post-entry" }} 50 | {{- end }} 51 | 52 |
    53 | 77 | {{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList) }} 78 | {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} 79 | 80 |
    81 | {{- end }} 82 | 83 |
    84 |
    85 | 86 | {{- if gt $paginator.TotalPages 1 }} 87 | 126 | {{- end }} 127 | 128 |
    129 | 130 | {{- end }}{{/* end profileMode */}} 131 | 132 | {{- end }}{{- /* end main */ -}} 133 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pctx := . -}} 2 | {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} 3 | {{- $pages := slice -}} 4 | {{- if or $.IsHome $.IsSection -}} 5 | {{- $pages = $pctx.RegularPages -}} 6 | {{- else -}} 7 | {{- $pages = $pctx.Pages -}} 8 | {{- end -}} 9 | {{- $limit := .Site.Config.Services.RSS.Limit -}} 10 | {{- if ge $limit 1 -}} 11 | {{- $pages = $pages | first $limit -}} 12 | {{- end -}} 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.images }} 20 | 21 | {{ index . 0 | absURL }} 22 | {{ index . 0 | 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 .Site.Params.ShowFullTextinRSS }} 44 | {{ (printf "" .Content) | safeHTML }} 45 | {{- end }} 46 | 47 | {{- end }} 48 | {{ end }} 49 | 50 | 51 | -------------------------------------------------------------------------------- /layouts/_default/search.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | 17 | 18 | 23 | 24 | {{- end }}{{/* end main */}} 25 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 9 | 10 |
    11 |
    12 |
    13 | {{ partial "breadcrumbs.html" . }} 14 |

    15 | {{ .Title }} 16 | {{- if .Draft }}  [draft]{{- end }} 17 |

    18 | {{- if .Description }} 19 |
    20 | {{ .Description }} 21 |
    22 | {{- end }} 23 | {{- if not (.Param "hideMeta") }} 24 | 76 | {{- end }} 77 |
    78 | {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default 79 | .Site.Params.cover.hidden }} 80 | {{- partial "cover1.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} 81 | {{- if (.Param "ShowToc") }} 82 | {{- partial "toc.html" . }} 83 | {{- end }} 84 | 85 | {{- if .Content }} 86 |
    87 | {{- if not (.Param "disableAnchoredHeadings") }} 88 | {{- partial "anchored_headings.html" .Content -}} 89 | {{- else }}{{ .Content }}{{ end }} 90 |
    91 | {{- end }} 92 | 93 | {{- if .Param "reward" }} 94 |
    95 |
    96 |
    97 |
    98 | 99 | wechat_pay 100 |

    微信

    101 |
    102 |
    103 | 104 | alipay 105 |

    支付宝

    106 |
    107 |
    108 | 119 |
    120 |
    121 | {{- end }} 122 | 123 |
    124 | 131 | {{- if (.Param "ShowPostNavLinks") }} 132 | {{- partial "post_nav_links.html" . }} 133 | {{- end }} 134 | {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }} 135 | {{- partial "share_icons.html" . -}} 136 | {{- end }} 137 |
    138 |
    139 | 140 | {{- if (.Param "comments") }} 141 | {{- partial "comments.html" . }} 142 | {{- end }} 143 |
    144 | 145 | {{- end }}{{/* end main */}} 146 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{- define "main" }} 2 | 3 | {{- if .Title }} 4 | 19 | {{- end }} 20 | 21 | 48 | 49 | {{- end }}{{/* end main */ -}} -------------------------------------------------------------------------------- /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 | 5 | 6 | 18 | 19 | 20 |
    21 |
    22 | 23 | ... 24 | 25 |
    26 |
    27 | 29 | 38 |
    -------------------------------------------------------------------------------- /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/cover1.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/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 | 5 | -------------------------------------------------------------------------------- /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 | 6 | {{- /* Head custom content area start */ -}} 7 | {{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}} 8 | {{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} 9 | {{- /* Head custom content area end */ -}} 10 | 11 | {{ if (.Params.mermaid) }} 12 | 13 | {{ end }} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{- if not (.Param "hideFooter") }} 2 | 27 | {{- end }} 28 | 29 | {{- if (not .Site.Params.disableScrollToTop) }} 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | {{- end }} 39 | 40 | 49 | 50 | {{- partial "extend_footer.html" . }} 51 | 52 | 80 | 81 | {{- if (not .Site.Params.disableScrollToTop) }} 82 | 94 | {{- end }} 95 | 96 | {{- if (not .Site.Params.disableThemeToggle) }} 97 | 112 | {{- end }} 113 | 114 | 134 | 135 | {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} 136 | 206 | {{- end }} 207 | 208 | {{- if .Site.Params.extendCodeBackground }} 209 | 220 | {{- end }} 221 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} 5 | 6 | {{- else }} 7 | 8 | {{- end }} 9 | 10 | {{- /* Title */}} 11 | {{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} 12 | 13 | {{- /* Meta */}} 14 | {{- if .IsHome }} 15 | {{ with site.Params.keywords -}}{{ end }} 16 | {{- else }} 17 | 20 | {{- end }} 21 | 24 | 25 | 26 | {{- if site.Params.analytics.google.SiteVerificationTag }} 27 | 28 | {{- end }} 29 | {{- if site.Params.analytics.yandex.SiteVerificationTag }} 30 | 31 | {{- end }} 32 | {{- if site.Params.analytics.bing.SiteVerificationTag }} 33 | 34 | {{- end }} 35 | {{- if site.Params.analytics.naver.SiteVerificationTag }} 36 | 37 | {{- end }} 38 | 39 | {{- /* Styles */}} 40 | 41 | {{- /* includes */}} 42 | {{- $includes := slice }} 43 | {{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}} 44 | 45 | {{- if not (eq site.Params.assets.disableScrollBarStyle true) }} 46 | {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }} 47 | {{- $includes = (append $ScrollStyle $includes) }} 48 | {{- end }} 49 | 50 | {{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }} 51 | 52 | {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} 53 | {{- $reset := (resources.Get "css/core/reset.css") }} 54 | {{- $media := (resources.Get "css/core/zmedia.css") }} 55 | {{- $license_css := (resources.Get "css/core/license.css") }} 56 | {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} 57 | 58 | {{- /* include `an-old-hope` if hljs is on */}} 59 | {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }} 60 | {{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} 61 | 62 | {{- /* order is important */}} 63 | {{- $core := (slice $theme_vars $reset $common $hljs $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} 64 | {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} 65 | 66 | {{- /* bundle all required css */}} 67 | {{- /* Add extended css after theme style */ -}} 68 | {{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} 69 | 70 | {{- if not site.Params.assets.disableFingerprinting }} 71 | {{- $stylesheet := $stylesheet | fingerprint }} 72 | 73 | {{- else }} 74 | 75 | {{- end }} 76 | 77 | {{- /* Search */}} 78 | {{- if (eq .Layout `search`) -}} 79 | 80 | {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} 81 | {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} 82 | {{- $license_js := resources.Get "js/license.js" }} 83 | {{- if not site.Params.assets.disableFingerprinting }} 84 | {{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} 85 | 86 | {{- else }} 87 | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} 88 | 89 | {{- end }} 90 | {{- end -}} 91 | 92 | {{- /* Highlight.js */}} 93 | {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} 94 | {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} 95 | {{- if not site.Params.assets.disableFingerprinting }} 96 | {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }} 97 | 99 | {{- else }} 100 | {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }} 101 | 102 | {{- end }} 103 | {{- end }} 104 | 105 | {{- /* Favicons */}} 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | {{- /* RSS */}} 115 | {{ range .AlternativeOutputFormats -}} 116 | 117 | {{ end -}} 118 | {{- range .AllTranslations -}} 119 | 120 | {{ end -}} 121 | 122 | 161 | 162 | {{- partial "extend_head.html" . -}} 163 | 164 | {{- /* Misc */}} 165 | {{- if hugo.IsProduction | or (eq site.Params.env "production") }} 166 | {{- template "_internal/google_analytics.html" . }} 167 | {{- template "partials/templates/opengraph.html" . }} 168 | {{- template "partials/templates/twitter_cards.html" . }} 169 | {{- template "partials/templates/schema_json.html" . }} 170 | {{- end -}} 171 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | {{- /* theme-toggle is enabled */}} 2 | {{- if (not site.Params.disableThemeToggle) }} 3 | {{- /* theme is light */}} 4 | {{- if (eq site.Params.defaultTheme "light") }} 5 | 11 | {{- /* theme is dark */}} 12 | {{- else if (eq site.Params.defaultTheme "dark") }} 13 | 19 | {{- else }} 20 | {{- /* theme is auto */}} 21 | 44 | {{- end }} 45 | {{- /* theme-toggle is disabled and theme is auto */}} 46 | {{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} 47 | 53 | {{- end }} 54 | 55 |
    56 | 152 |
    153 | -------------------------------------------------------------------------------- /layouts/partials/home_info.html: -------------------------------------------------------------------------------- 1 | {{- with $.Site.Params.homeInfoParams }} 2 |
    3 |
    4 |

    {{ .Title | markdownify }}

    5 |
    6 |
    7 |

    {{ .Content | markdownify }}

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

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

    34 | {{ .subtitle | markdownify }} 35 | {{- partial "social_icons.html" site.Params.socialIcons -}} 36 | 37 | {{- with .buttons }} 38 | 55 | {{- end }} 56 |
    57 | {{- end}} 58 |
    59 | -------------------------------------------------------------------------------- /layouts/partials/post_canonical.html: -------------------------------------------------------------------------------- 1 | {{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}} 2 | {{ $url := urls.Parse .Params.canonicalURL }} 3 | 4 | {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL .Site.Params.editPost.URL) }} | {{- end -}} 5 | 6 | {{- (.Site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}} 7 |  {{ $url.Host }} 8 | 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /layouts/partials/post_meta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 72 | -------------------------------------------------------------------------------- /layouts/partials/post_nav_links.html: -------------------------------------------------------------------------------- 1 | {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} 2 | {{- if and (gt (len $pages) 1) (in $pages . ) }} 3 | 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /layouts/partials/share_icons.html: -------------------------------------------------------------------------------- 1 | {{- $pageurl := .Permalink }} 2 | {{- $title := .Title }} 3 | 4 | {{- $.Scratch.Set "tags" ""}} 5 | 6 | {{- with .Params.Tags }} 7 | {{- $hashtags := newScratch}} 8 | {{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} 9 | {{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} 10 | {{- end -}} 11 | 12 | {{- $custom := false }} 13 | {{- $ShareButtons := (.Param "ShareButtons")}} 14 | {{- with $ShareButtons }}{{ $custom = true }}{{ end }} 15 | 16 | 72 | -------------------------------------------------------------------------------- /layouts/partials/social_icons.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /layouts/partials/templates/opengraph.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{- if .Params.cover.image -}} 6 | {{- if (ne .Params.cover.relative true) }} 7 | 8 | {{- else}} 9 | 10 | {{- end}} 11 | {{- else }} 12 | 13 | {{- with $.Params.images -}} 14 | {{- range first 6 . }}{{ end -}} 15 | {{- else -}} 16 | {{- $images := $.Resources.ByType "image" -}} 17 | {{- $featured := $images.GetMatch "*feature*" -}} 18 | {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} 19 | {{- with $featured -}} 20 | 21 | {{- else -}} 22 | {{- with site.Params.images }}{{ end -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end }} 26 | 27 | {{- if .IsPage }} 28 | {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} 29 | 30 | {{ with .PublishDate }}{{ end }} 31 | {{ with .Lastmod }}{{ end }} 32 | {{- end -}} 33 | 34 | {{- with .Params.audio }}{{ end }} 35 | {{- with .Params.locale }}{{ end }} 36 | {{- with site.Params.title }}{{ end }} 37 | {{- with .Params.videos }}{{- range . }} 38 | 39 | {{ end }}{{ end }} 40 | 41 | {{- /* If it is part of a series, link to related articles */}} 42 | {{- $permalink := .Permalink }} 43 | {{- $siteSeries := site.Taxonomies.series }} 44 | {{ with .Params.series }}{{- range $name := . }} 45 | {{- $series := index $siteSeries ($name | urlize) }} 46 | {{- range $page := first 6 $series.Pages }} 47 | {{- if ne $page.Permalink $permalink }}{{ end }} 48 | {{- end }} 49 | {{ end }}{{ end }} 50 | 51 | {{- /* Facebook Page Admin ID for Domain Insights */}} 52 | {{- with site.Social.facebook_admin }}{{ end }} 53 | -------------------------------------------------------------------------------- /layouts/partials/templates/schema_json.html: -------------------------------------------------------------------------------- 1 | {{ if .IsHome }} 2 | 19 | {{- else if (or .IsPage .IsSection) }} 20 | {{/* BreadcrumbList */}} 21 | {{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }} 22 | {{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} 23 | {{- $bc_list := (split $lang_url "/")}} 24 | 25 | {{- $scratch := newScratch }} 26 | 56 | {{- if .IsPage }} 57 | 115 | {{- end }}{{/* .IsPage end */}} 116 | 117 | {{- end -}} 118 | -------------------------------------------------------------------------------- /layouts/partials/templates/twitter_cards.html: -------------------------------------------------------------------------------- 1 | {{- if .Params.cover.image -}} 2 | 3 | {{- if (ne $.Params.cover.relative true) }} 4 | 5 | {{- else }} 6 | 7 | {{- end}} 8 | {{- else }} 9 | {{- with $.Params.images -}} 10 | 11 | 12 | {{ else -}} 13 | {{- $images := $.Resources.ByType "image" -}} 14 | {{- $featured := $images.GetMatch "*feature*" -}} 15 | {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} 16 | {{- with $featured -}} 17 | 18 | 19 | {{- else -}} 20 | {{- with site.Params.images -}} 21 | 22 | 23 | {{ else -}} 24 | 25 | {{- end -}} 26 | {{- end -}} 27 | {{- end }} 28 | {{- end }} 29 | 30 | 31 | {{ with site.Social.twitter -}} 32 | 33 | {{ end -}} 34 | -------------------------------------------------------------------------------- /layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 | {{- $headers := findRE "(.|\n])+?
    " .Content -}} 2 | {{- $has_headers := ge (len $headers) 1 -}} 3 | {{- if $has_headers -}} 4 |
  • 88 | {{- end -}} 89 | {{- end }} 90 | 91 | 92 | 93 | 94 | 95 | 155 | {{- end }} -------------------------------------------------------------------------------- /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/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/layouts/shortcodes/.DS_Store -------------------------------------------------------------------------------- /layouts/shortcodes/bilibili.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | 26 | 27 |
    28 | 37 | 38 | 39 | 40 | 41 | 52 | 53 |
    54 | 55 | -------------------------------------------------------------------------------- /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 | {{ if .Get "summary" }} 2 | {{ else }} 3 | {{ warnf "missing value for param 'summary': %s" .Position }} 4 | {{ end }} 5 |

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

    9 | -------------------------------------------------------------------------------- /layouts/shortcodes/douban.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 163 | 164 | 219 | 220 | 221 |
    222 |
    223 |
    224 | 225 | -------------------------------------------------------------------------------- /layouts/shortcodes/figure.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} 8 | {{- $.Page.Scratch.Add "figurecount" 1 -}} 9 | 10 | {{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} 11 |
    12 |
    13 |
    14 | 15 |
    16 | {{ with .Get "link" | default (.Get "src") }}{{ end }} 17 | {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} 18 |
    19 | {{- with .Get "title" }}

    {{.}}

    {{ end }} 20 | {{- if or (.Get "caption") (.Get "attr")}} 21 |

    22 | {{- .Get "caption" -}} 23 | {{- with .Get "attrlink"}}{{ .Get "attr" }}{{ else }}{{ .Get "attr"}}{{ end -}} 24 |

    25 | {{- end }} 26 |
    27 | {{- end }} 28 |
    29 |
    30 | -------------------------------------------------------------------------------- /layouts/shortcodes/figure_origin.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/friend.html: -------------------------------------------------------------------------------- 1 | {{- if .IsNamedParams -}} 2 | 3 |
    4 |
    5 | 6 |
    7 |
    8 |
    {{- .Get "name" -}}
    9 |
    {{- .Get "word" -}}
    10 |
    11 |
    12 |
    13 | {{- end }} 14 | -------------------------------------------------------------------------------- /layouts/shortcodes/gallery.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | {{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} 7 | {{- $.Page.Scratch.Add "figurecount" 1 }} 8 | {{ $baseURL := .Site.BaseURL }} 9 | 42 | -------------------------------------------------------------------------------- /layouts/shortcodes/innerlink.html: -------------------------------------------------------------------------------- 1 |
    4 | {{ $url := .Get "src" }} 5 | {{ with .Site.GetPage $url }} 6 |
    7 | {{ .Title }} 8 |
    9 | 10 | 日期: {{ .Date.Format ( default "2006-01-02") }} 11 | {{ if .Params.tags }}  12 | 标签: 13 | {{ range .Params.tags }} 14 | #{{ . }}  15 | {{ end }} 16 | 17 |
    18 | {{ .Summary | plainify}} ...... 19 |
    20 | {{ end }} 21 | {{ end }} 22 |
    -------------------------------------------------------------------------------- /layouts/shortcodes/load-photoswipe.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | {{ if not ($.Page.Scratch.Get "photoswipeloaded") }} 8 | {{ $.Page.Scratch.Set "photoswipeloaded" 1 }} 9 | 10 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 71 | {{ end }} -------------------------------------------------------------------------------- /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/mermaid.html: -------------------------------------------------------------------------------- 1 |
    2 | {{.Inner}} 3 |
    -------------------------------------------------------------------------------- /layouts/shortcodes/ppt.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 |
    22 | 29 |
    30 | 31 | -------------------------------------------------------------------------------- /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/youtube.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | 26 | 27 |
    28 | 43 |
    44 | 45 | -------------------------------------------------------------------------------- /resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/resources/.DS_Store -------------------------------------------------------------------------------- /resources/_gen/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/resources/_gen/.DS_Store -------------------------------------------------------------------------------- /static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/.DS_Store -------------------------------------------------------------------------------- /static/Q.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/Q.gif -------------------------------------------------------------------------------- /static/README_EN.md: -------------------------------------------------------------------------------- 1 | Language:English | [中文](https://github.com/xyming108/sulv-hugo-papermod) 2 | 3 | ## 1. Git clone pull code 4 | 5 | ① Use `git clone` to pull the code to the desktop. At this time, the sulv Hugo papermod directory will be generated on the desktop 6 | 7 | ② Enter the sulv Hugo papermod directory and enter `git submodule update --init` to pull the submodule under themes / Hugo papermod / and put the official theme inside 8 | 9 | ## 2. Startup interface 10 | 11 | ③ Return the directory to sulv Hugo papermod, enter `hugo server -d` in the terminal, and enter: localhost:1313 in the browser to see the ready-made blog template. 12 | 13 | ## 3. Modify information 14 | 15 | There are many personal information in the template that need to be configured by yourself. Please be patient to modify it. You can refer to the blogger's website building tutorial:[ https://www.sulvblog.cn/posts/blog/ ]( https://www.sulvblog.cn/posts/blog/ ) 16 | 17 | ## 4. Hugo blog exchange group 18 | 19 | 🎉🎉 787018782 🎉🎉 20 | 21 | ## 5. How to use shortcodes 22 | 23 | `bilibili: {{< bilibili BV1Fh411e7ZH(填 bvid) >}}` 24 | 25 | `youtube: {{< youtube w7Ft2ymGmfc >}}` 26 | 27 | `ppt: {{< ppt src="网址" >}}` 28 | 29 | `douban: {{< douban src="网址" >}}` 30 | 31 | ``` 32 | #Intra article link card 33 | #To add md at the end, you can only fill in the relative path, as shown below 34 | {{< innerlink src="posts/tech/mysql_1.md" >}} 35 | ``` 36 | 37 | ``` 38 | gallery: 39 | 40 | {{< gallery >}} 41 | {{< figure src="https://www.sulvblog.cn/posts/read/structural_thinking/0.png" >}} 42 | {{< figure src="https://www.sulvblog.cn/posts/read/structural_thinking/0.png" >}} 43 | {{< /gallery >}} 44 | ``` 45 | 46 | ## 5. Possible problems 47 | 48 | 49 | 1. Some users will deploy to GitHub and may encounter cross system problems, such as the prompt `lf will be replaced by CRLF in *******`, and then enter the command: `git config core.autocrlf false`, which solves the problem of automatic conversion of line breaks。 -------------------------------------------------------------------------------- /static/fonts/MaShanZheng-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/fonts/MaShanZheng-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/NeverMindHand-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/fonts/NeverMindHand-Regular.ttf -------------------------------------------------------------------------------- /static/go2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/go2.png -------------------------------------------------------------------------------- /static/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/.DS_Store -------------------------------------------------------------------------------- /static/img/Q.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/Q.gif -------------------------------------------------------------------------------- /static/img/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/alipay.png -------------------------------------------------------------------------------- /static/img/beian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/beian.png -------------------------------------------------------------------------------- /static/img/bilibili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/bilibili.png -------------------------------------------------------------------------------- /static/img/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/docker.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/hugo_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/hugo_group.png -------------------------------------------------------------------------------- /static/img/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/instagram.png -------------------------------------------------------------------------------- /static/img/magic16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/magic16.ico -------------------------------------------------------------------------------- /static/img/magic32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/magic32.ico -------------------------------------------------------------------------------- /static/img/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/phone.png -------------------------------------------------------------------------------- /static/img/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/qq.png -------------------------------------------------------------------------------- /static/img/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/twitter.png -------------------------------------------------------------------------------- /static/img/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/wechat.png -------------------------------------------------------------------------------- /static/img/wechat_pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/static/img/wechat_pay.png -------------------------------------------------------------------------------- /themes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyming108/sulv-hugo-papermod/2b142e6d2f90a01f7113ee1a7cc542f1e9a17264/themes/.DS_Store --------------------------------------------------------------------------------