
<p>Math student and GNU/Linux user. Support <a href="https://bit.ly/2WT9eQW" rel="nofollow noreferrer">Santilli</a>'s <a href="https://git.io/fjp32" rel="nofollow noreferrer">keyboard attack</a> to free netizens from censorship.</p>
<h1>Build your free personal math blog with comments on GitLab</h1>
<p>View demo at <a href="https://vincenttam.gitlab.io/bhdemo" rel="nofollow noreferrer">https://vincenttam.gitlab.io/bhdemo</a></p>
<h2>Server-side setup</h2>
<p>See <a href="https://lstu.fr/smguide" rel="nofollow noreferrer">https://lstu.fr/smguide</a>.</p>
<h2>Client-side setup</h2>
<ol>
<li><p>Clone this repo</p>
<pre><code> git clone --recurse-submodules https://gitlab.com/VincentTam/bhdemo.git &lt;your-site-name&gt;
</code></pre>
<p>If this is your personal page, <code>&lt;your-site-name&gt;</code> is <code>&lt;your-user-name&gt;.gitlab.io</code></p>
</li>
<li><p>Start a new project on GitLab named as <code>&lt;your-site-name&gt;</code></p>
</li>
<li><p>Add your GitLab bot user as a &quot;<strong>developer</strong>&quot; for your project</p>
</li>
<li><p>Remove existing comments under the folder <code>data/</code> and the file <code>LICENSE</code></p>
</li>
<li><p>Modify the following fields in the Hugo config file <code>config.toml</code>. Comment out stuff by <code>#</code></p>
<pre><code> baseURL = &quot;https://&lt;username&gt;.gitlab.io&quot;
 title = &quot;Your title&quot;
 [Params]
   subtitle = &quot;Your subtitle&quot;
 [Params.staticman]
   api = &quot;https://&lt;your-api&gt;.herokuapp.com/v3/entry/gitlab/&lt;username&gt;/&lt;username&gt;.gitlab.io/master/comments&quot;
   pulls = &quot;https://gitlab.com/&lt;username&gt;/&lt;username&gt;.gitlab.io/merge_requests&quot;
 [Author]
   name = &quot;Your name&quot;
   website = &quot;https://example.com&quot;
</code></pre>
</li>
</ol>
<p>If this is your project page, use the following parameters instead</p>
<pre><code>    baseURL = &quot;https://&lt;username&gt;.gitlab.io/&lt;your-project&gt;&quot;
    [Params.staticman]
      api = &quot;https://&lt;your-api&gt;.herokuapp.com/v3/entry/gitlab/&lt;username&gt;/&lt;your-project&gt;/master/comments&quot;
      pulls = &quot;https://gitlab.com/&lt;username&gt;/&lt;your-project&gt;/merge_requests&quot;
</code></pre>
<ol start="4">
<li><p>Either remove the <a href="https://bit.ly/2T1KGTn" rel="nofollow noreferrer">reCAPTCHA</a> config or <em>change the parameters below with your own site key and secret</em>  (You may apply your personal ones with your Google account)</p>
<pre><code> [Params.staticman.recaptcha]
   sitekey = &quot;6Lcv8...--qkFo&quot;
   secret = &quot;p5u...wNw==&quot;
</code></pre>
</li>
<li><p>Remove these lines at the bottom of <code>config.toml</code></p>
<pre><code> [[menu.main]]
   name = &quot;Source&quot;
   url = &quot;https://gitlab.com/vincenttam/bhdemo&quot;
   weight = 2
</code></pre>
</li>
<li><p>Edit the bottom of <code>staticman.yml</code> corresponding to (6)</p>
</li>
<li><p>Comment moderation:</p>
<ul>
<li>approval before publish: <code>moderation: true</code>.</li>
<li>otherwise: go to <strong>Settings → Repository → Protected Branches</strong> and
permit your GitLab bot to push against <code>master</code> branch.</li>
</ul>
</li>
</ol>
<p>Write new posts.</p>
<ol>
<li>Execute <code>hugo new posts/&lt;your-filename&gt;.md</code></li>
<li>Edit <code>content/posts/&lt;your-filename&gt;.md</code></li>
<li>Save everything with <code>git add .</code></li>
<li>Commit with <code>git commit</code></li>
<li>Publish with <code>git push -u origin master</code></li>
</ol>
<h2>Demo</h2>
<p><a href="https://bit.ly/2YBvq2s" rel="nofollow noreferrer"><img src="https://bit.ly/2YBvq2s" alt="demo" /></a> <a href="https://bit.ly/2Hr1K24" rel="nofollow noreferrer"><img src="https://bit.ly/2Hr1K24" alt="staticman math comment" /></a></p>

GNUSupporter 8964民主女神 地下教會