<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>安裝 on Hugo Bootstrap</title><link>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/</link><description>Recent content in 安裝 on Hugo Bootstrap</description><generator>Hugo</generator><language>zh-hant</language><copyright>Copyright © 2016-2025 Razon Yang. All Rights Reserved.</copyright><lastBuildDate>Sat, 04 Dec 2021 10:43:39 +0800</lastBuildDate><atom:link href="https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/index.xml" rel="self" type="application/rss+xml"/><item><title>通過 via Hugo Module 安裝</title><link>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/hugo-module/</link><pubDate>Sat, 26 Feb 2022 17:10:39 +0200</pubDate><guid>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/hugo-module/</guid><description><![CDATA[<p>This article refers to the modern, up-to-date installation method of installing the theme locally as Hugo module.</p>

<h2 id="proxy-optional" data-numberify>Proxy (Optional)<a class="anchor ms-1" href="#proxy-optional"></a></h2>
<p>If you&rsquo;re located at China mainland without VPN, the Hugo module download may fail.</p>
<p>There are two proxies for this: <a href="https://goproxy.cn" target="_blank" rel="noopener noreferrer">GOPROXY.CN<i class="fas fa-external-link-square-alt ms-1"></i></a> and <a href="https://goproxy.io" target="_blank" rel="noopener noreferrer">GOPROXY.IO<i class="fas fa-external-link-square-alt ms-1"></i></a>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">$ <span class="nb">export</span> <span class="nv">HUGO_MODULE_PROXY</span><span class="o">=</span>https://goproxy.cn
</span></span></code></pre></div><blockquote>
<p>Please note that, Hugo doesn&rsquo;t respect the <code>GOPROXY</code> env var, please use <code>HUGO_MODULE_PROXY</code> instead.</p></blockquote>
<p>You can also set the <code>module.proxy</code> instead of using env var.</p>]]></description></item><item><title>Starter Template</title><link>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/starter-template/</link><pubDate>Thu, 16 Dec 2021 17:25:20 +0800</pubDate><guid>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/starter-template/</guid><description>&lt;p>The starter template for newbie.&lt;/p></description></item><item><title>通過 Git Submodule 安裝</title><link>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/git-submodule/</link><pubDate>Sat, 04 Dec 2021 10:43:39 +0800</pubDate><guid>https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/git-submodule/</guid><description><![CDATA[<p>This article refers to the traditional installation method of cloning the theme locally as Git submodule.
While this installation method is still widely used, we recommend to install the theme as <a href="https://hbs.razonyang.com/v1/zh-hant/docs/getting-started/installation/hugo-module/">Hugo module</a>.</p>

<h2 id="從頭開始創建站點" data-numberify>從頭開始創建站點<a class="anchor ms-1" href="#從頭開始創建站點"></a></h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">$ git clone https://github.com/razonyang/hugo-theme-bootstrap-skeleton myblog
</span></span><span class="line"><span class="ln">2</span><span class="cl">$ <span class="nb">cd</span> myblog
</span></span><span class="line"><span class="ln">3</span><span class="cl">$ git submodule add https://github.com/razonyang/hugo-theme-bootstrap themes/hugo-theme-bootstrap
</span></span><span class="line"><span class="ln">4</span><span class="cl">$ sed -i <span class="s2">&#34;s/theme:.*/theme: hugo-theme-bootstrap/g&#34;</span> config/_default/config.yaml
</span></span><span class="line"><span class="ln">5</span><span class="cl">$ rm go.mod go.sum
</span></span><span class="line"><span class="ln">6</span><span class="cl">$ hugo mod npm pack
</span></span><span class="line"><span class="ln">7</span><span class="cl">$ npm install
</span></span><span class="line"><span class="ln">8</span><span class="cl">$ hugo server
</span></span></code></pre></div><blockquote>
<p>如果你使用的是 Windows，請改用 <code>xcopy .\themes\hugo-theme-bootstrap\exampleSite /E</code>。</p>]]></description></item></channel></rss>