-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
16 lines (16 loc) · 12.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html><html xmlns=http://www.w3.org/1999/xhtml xml:lang=zh-cn lang=zh-cn><head><script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/light_dark.js></script>
<script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/tabs.js></script>
<script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/katex.min.js></script>
<script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/auto-render.min.js></script>
<script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/katex.js></script>
<script defer language=javascript type=text/javascript src=https://asher-ding.github.io/blog/js/toc.js></script><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title itemprop=name>Asher</title><meta property="og:title" content="Asher"><meta name=twitter:title content="Asher"><meta itemprop=name content="Asher"><meta name=application-name content="Asher"><meta property="og:site_name" content><meta name=description content="文字比大脑更擅长记忆"><meta itemprop=description content="文字比大脑更擅长记忆"><meta property="og:description" content="文字比大脑更擅长记忆"><meta name=twitter:description content="文字比大脑更擅长记忆"><base href=https://asher-ding.github.io/blog/><link rel=canonical href=https://asher-ding.github.io/blog/ itemprop=url><meta name=url content="https://asher-ding.github.io/blog/"><meta name=twitter:url content="https://asher-ding.github.io/blog/"><meta property="og:url" content="https://asher-ding.github.io/blog/"><meta property="og:updated_time" content="1006-01-03T611:38:23+0800"><link rel=sitemap type=application/xml title=Sitemap href=https://asher-ding.github.io/blog/sitemap.xml><link href=https://asher-ding.github.io/blog/index.xml rel=alternate type=application/rss+xml title><meta name=robots content="index,follow"><meta name=googlebot content="index,follow"><meta name=twitter:site content><meta name=twitter:creator content><meta property="fb:admins" content><meta name=apple-mobile-web-app-title content><meta name=apple-mobile-web-app-capable content="yes"><meta name=apple-mobile-web-app-status-bar-style content="black"><meta property="og:type" content="website"><meta name=author content><script defer type=application/ld+json>{{"@context":"http://schema.org","@type":"Article","headline":"","author":{"@type":"Person","name":""},"datePublished":"2023-06-01","description":"","wordCount":0,"mainEntityOfPage":"True","dateModified":"2023-06-01","image":{"@type":"imageObject","url":""},"publisher":{"@type":"Organization","name":"","logo":{"@type":"imageObject","url":""}}}}</script><meta name=generator content="Hugo 0.108.0"><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/poole.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/syntax.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/hyde.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/poison.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/fonts.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/katex.min.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/tabs.css><link type=text/css rel=stylesheet href=https://asher-ding.github.io/blog/css/custom.css><style>body{--sidebar-bg-color:#202020;--sidebar-img-border-color:#515151;--sidebar-p-color:#909090;--sidebar-h1-color:#FFF;--sidebar-a-color:#FFF;--sidebar-socials-color:#FFF;--text-color:#222;--bkg-color:#FAF9F6;--post-title-color:#303030;--list-color:#5a5a5a;--link-color:#268bd2;--date-color:#515151;--table-border-color:#E5E5E5;--table-stripe-color:#F9F9F9;--code-color:#bf616a;--code-background-color:#E5E5E5;--moon-sun-color:#FFF;--moon-sun-background-color:#515151}body.dark-theme{--text-color:#eee;--bkg-color:#121212;--post-title-color:#DBE2E9;--list-color:#9d9d9d;--link-color:#268bd2;--date-color:#9a9a9a;--table-border-color:#515151;--table-stripe-color:#202020;--code-color:#ff7f7f;--code-background-color:#393D47}body{background-color:var(--bkg-color)}</style></head><body class=dark-theme><div class=wrapper><aside class=sidebar><div class="container sidebar-sticky"><div class=light-dark align=right><button class=btn-light-dark><svg class="moon" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentcolor" d="M6 .278a.768.768.0 01.08.858 7.208 7.208.0 00-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527.0 1.04-.055 1.533-.16a.787.787.0 01.81.316.733.733.0 01-.031.893A8.349 8.349.0 018.344 16C3.734 16 0 12.286.0 7.71.0 4.266 2.114 1.312 5.124.06A.752.752.0 016 .278z"/></svg><svg class="sun" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentcolor" d="M8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.5.5.0 01.5.5v2a.5.5.0 01-1 0v-2A.5.5.0 018 0zm0 13a.5.5.0 01.5.5v2a.5.5.0 01-1 0v-2A.5.5.0 018 13zm8-5a.5.5.0 01-.5.5h-2a.5.5.0 010-1h2a.5.5.0 01.5.5zM3 8a.5.5.0 01-.5.5h-2a.5.5.0 010-1h2A.5.5.0 013 8zm10.657-5.657a.5.5.0 010 .707l-1.414 1.415a.5.5.0 11-.707-.708l1.414-1.414a.5.5.0 01.707.0zm-9.193 9.193a.5.5.0 010 .707L3.05 13.657a.5.5.0 01-.707-.707l1.414-1.414a.5.5.0 01.707.0zm9.193 2.121a.5.5.0 01-.707.0l-1.414-1.414a.5.5.0 01.707-.707l1.414 1.414a.5.5.0 010 .707zM4.464 4.465a.5.5.0 01-.707.0L2.343 3.05a.5.5.0 11.707-.707l1.414 1.414a.5.5.0 010 .708z"/></svg></button></div><div class=sidebar-about><h1 class=brand><a href=https://asher-ding.github.io/blog/><h1>Asher</h1></a></h1><p class=lead>文字比大脑更擅长记忆</p></div><nav><ul class=sidebar-nav><li class=heading><a href=/about/>About</a></li><li class=heading><a href=/posts/>Posts</a></li><li class=sub-heading>Recent</li><li class=bullet><a href=https://asher-ding.github.io/blog/posts/hugo%E5%A6%82%E4%BD%95%E5%A2%9E%E5%8A%A0%E4%B8%BB%E9%A2%98/>Hugo如何增加主题</a></li><li class=bullet><a href=https://asher-ding.github.io/blog/posts/introducing-poison/>如何使用Hugo</a></li><li class=bullet><a href=https://asher-ding.github.io/blog/posts/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8hugo/>如何使用Hugo</a></li></ul></nav><a target=_blank class=social href=https://github.com/Asher-Ding><svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="-2 -2 24 24"><path fill="currentcolor" d="M18.88 1.099C18.147.366 17.265.0 16.233.0H3.746C2.714.0 1.832.366 1.099 1.099.366 1.832.0 2.714.0 3.746v12.487c0 1.032.366 1.914 1.099 2.647.733.733 1.615 1.099 2.647 1.099H6.66c.19.0.333-.007.429-.02a.504.504.0 00.286-.169c.095-.1.143-.245.143-.435l-.007-.885c-.004-.564-.006-1.01-.006-1.34l-.3.052c-.19.035-.43.05-.721.046a5.555 5.555.0 01-.904-.091 2.026 2.026.0 01-.872-.39 1.651 1.651.0 01-.572-.8l-.13-.3a3.25 3.25.0 00-.41-.663c-.186-.243-.375-.407-.566-.494l-.09-.065a.956.956.0 01-.17-.156.723.723.0 01-.117-.182c-.026-.061-.004-.111.065-.15.07-.04.195-.059.378-.059l.26.04c.173.034.388.138.643.311a2.1 2.1.0 01.631.677c.2.355.44.626.722.813.282.186.566.28.852.28.286.0.533-.022.742-.065a2.59 2.59.0 00.585-.196c.078-.58.29-1.028.637-1.34a8.907 8.907.0 01-1.333-.234 5.314 5.314.0 01-1.223-.507 3.5 3.5.0 01-1.047-.872c-.277-.347-.505-.802-.683-1.365-.177-.564-.266-1.215-.266-1.952.0-1.049.342-1.942 1.027-2.68-.32-.788-.29-1.673.091-2.652.252-.079.625-.02 1.119.175.494.195.856.362 1.086.5.23.14.414.257.553.352a9.233 9.233.0 012.497-.338c.859.0 1.691.113 2.498.338l.494-.312a6.997 6.997.0 011.197-.572c.46-.174.81-.221 1.054-.143.39.98.424 1.864.103 2.653.685.737 1.028 1.63 1.028 2.68.0.737-.089 1.39-.267 1.957-.177.568-.407 1.023-.689 1.366a3.65 3.65.0 01-1.053.865c-.42.234-.828.403-1.223.507a8.9 8.9.0 01-1.333.235c.45.39.676 1.005.676 1.846v3.11c0 .147.021.266.065.357a.36.36.0 00.208.189c.096.034.18.056.254.064.074.01.18.013.318.013h2.914c1.032.0 1.914-.366 2.647-1.099.732-.732 1.099-1.615 1.099-2.647V3.746c0-1.032-.367-1.914-1.1-2.647z"/></svg></a><a target=_blank class=social href=https://asher-ding.github.io/blog//posts/index.xml><svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1em" height="1.2em" viewBox="0 0 1280 1280"><g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)" fill="#000" stroke="none"><path fill="currentcolor" d="M2295 11929c-284-12-642-45-707-65-17-5-18-63-18-1039 0-569 4-1036 8-1039 5-3 74 6 153 19 510 86 1168 95 1789 25 1348-153 2602-677 3670-1531 385-308 820-744 1126-1129 842-1060 1362-2313 1514-3650 70-621 61-1279-25-1789-13-79-22-148-19-153 3-4 471-8 1039-8h1035l5 23c51 225 85 942 67 1419-23 605-77 1044-198 1617-294 14e2-927 2734-1823 3846-1043 1295-2364 2259-3909 2854-1158 447-2451 656-3707 6e2z"/><path fill="currentcolor" d="M2255 7845c-269-25-620-81-667-106-17-9-18-55-18-899 0-706 3-890 13-890 6 0 66 18 132 41 130 44 288 79 467 105 154 21 577 30 749 15 1207-107 2267-823 2814-1902 166-327 268-637 330-1001 38-227 48-384 42-662-8-348-44-590-126-831-23-66-41-126-41-132 0-10 184-13 890-13 844 0 890 1 899 18 27 50 88 452 110 725 14 162 14 624 1 782-59 703-233 1323-545 1945-481 956-1313 1788-2270 2268-620 310-1239 483-1940 542-165 14-669 10-840-5z"/><path fill="currentcolor" d="M2519 3815c-391-66-725-336-868-703-79-201-96-462-45-677 83-344 338-641 666-774 116-47 205-69 330-80 412-39 811 153 1040 5e2 193 292 240 648 128 981-135 403-492 699-914 757-1e2 14-241 12-337-4z"/></g></svg></a><a target=_blank class=social href=mailto:[email protected]><svg width="1.2em" height="1.2em" viewBox="-2 -2.5 448 512" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns1="http://sozi.baierouge.fr" xmlns:cc="http://web.resource.org/cc/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><g id="Layer_2" transform="scale(2.3,3)"><path stroke="#202020" stroke-width="8" stroke-miterlimit="10" d="m194.77 146.09c0 6.627-5.373 12-12 12h-166c-6.627.0-12-5.373-12-12V49.864c0-6.627 5.373-12 12-12h166c6.627.0 12 5.373 12 12v96.226z" fill="currentcolor"/></g><g id="Layer_3" transform="scale(2.3,3)" stroke="#202020" stroke-width="8" stroke-miterlimit="10" fill="currentcolor"><polyline points="10.409 41.273 99.5 148 187.27 42.409"/><line y2="111.95" x1="9.318" x2="65.909" y1="153.32"/><line y2="153.32" x1="128.86" x2="189.32" y1="108.55"/></g></svg></a><p class=footnote>powered by <a target=_blank href=https://gohugo.io>Hugo</a> | themed with <a target=_blank href=https://github.com/lukeorth/poison>poison</a><br>© 2023 . All rights reserved.</p></div></aside><main class="content container"><div class=posts><article class=post><div class=info><h1 class=post-title><a href=https://asher-ding.github.io/blog/posts/hugo%E5%A6%82%E4%BD%95%E5%A2%9E%E5%8A%A0%E4%B8%BB%E9%A2%98/>Hugo如何增加主题</a></h1><time datetime=2023-06-01T15:11:38+0800 class=post-date>June 1, 2023</time></div>增加主题 参考 git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal 更新主题 cd themes/poison git pull 使用主题,修改配置文件 # config.toml theme = "terminal" 启动服务器查看效果</article><article class=post><div class=info><h1 class=post-title><a href=https://asher-ding.github.io/blog/posts/introducing-poison/>如何使用Hugo</a></h1><time datetime=2023-05-30T16:11:22+0800 class=post-date>May 30, 2023</time></div></article><article class=post><div class=info><h1 class=post-title><a href=https://asher-ding.github.io/blog/posts/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8hugo/>如何使用Hugo</a></h1><time datetime=2023-05-30T16:11:22+0800 class=post-date>May 30, 2023</time></div>安装hugo 首先,去Hugo官网https://gohugo.io/下载适合您操作系统的最新版本。
brew install hugo
hugo version
然后,将Hugo解压缩到您想要的位置。例如,您可以将其解压缩到/usr/local/bin/,这将使Hugo可用于整个系统。
接下来,打开命令行终端并运行以下命令来检查Hugo是否已成功安装:
hugo version 如果一切正常,您应该会看到Hugo的版本信息。
新建站点 hugo new site /path/to 新建博文 hugo new posts/my-first-post.md
生成您的网站静态文件。在命令行中输入以下命令:
hugo 这将使用Hugo生成静态网页,并将它们存储在“public”目录中。
此时的目录
. ├── archetypes │ └── default.md ├── assets ├── config.toml ├── content │ └── 如何使用Hugo.md ├── data ├── layouts ├── public │ ├── categories │ │ └── index.xml │ ├── index.xml │ ├── sitemap.xml │ └── tags │ └── index.xml ├── resources │ └── _gen │ ├── assets │ └── images ├── static └── themes 配置github仓库 配置域名<div class=read-more-link><a href=/blog/posts/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8hugo/>Read More…</a></div></article></div></main></div></body></html>