Skip to content

Commit

Permalink
add new post
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyanguu committed May 31, 2023
1 parent 06fc340 commit d99fd55
Show file tree
Hide file tree
Showing 134 changed files with 5,111 additions and 4,228 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
6 changes: 2 additions & 4 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="head-meta">

<span>404 Page not found</span>
<span>2021-03-07</span>
<span>2023-05-30</span>



Expand Down Expand Up @@ -58,7 +58,6 @@ <h1>404 NOT FOUND</h1>




<div class="footer">
<ul class="menu">

Expand All @@ -68,7 +67,7 @@ <h1>404 NOT FOUND</h1>

<li><a href="/categories/"><span data-hover="Categories">Categories</span></a></li>

<li><a href="/about-me/"><span data-hover="About Me">About Me</span></a></li>
<li><a href="/about%20me/"><span data-hover="About Me">About Me</span></a></li>

</ul>

Expand All @@ -95,7 +94,6 @@ <h1>404 NOT FOUND</h1>
}
</script>


</body>
</html>

64 changes: 31 additions & 33 deletions about-hugo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,41 +108,41 @@ <h1 id="configtoml">config.toml</h1>
<p>By default, your site title will be displayed at the top in Blackletter fonts if your web browser and operating system support Blackletter fonts. Essentially, for every English letter <code>X</code> in your site title, it is substituted with <code>&amp;Xfr;</code>, e.g. the Blackletter version of <code>A</code> is <code>&amp;Afr;</code> (𝔄). Below are the letters from A to Z:</p>
<h2 id="afrbfrcfrdfrefrffrgfrhfrifrjfrkfrlfrmfrnfrofrpfrqfrrfrsfrtfrufrvfrwfrxfryfrzfr">𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ</h2>
<p>Alternatively, you can provide a banner image:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-toml" data-lang="toml">[<span style="color:#a6e22e">params</span>.<span style="color:#a6e22e">banner</span>]
<span style="color:#a6e22e">src</span> = <span style="color:#e6db74">&#34;/path/to/banner.png&#34;</span>
<span style="color:#a6e22e">alt</span> = <span style="color:#e6db74">&#34;alternative text on image&#34;</span>
</code></pre></div><p>By default, each summary block on the homepage contains the first 200 letters extracted from all paragraphs of an article. I find Hugo&rsquo;s built in <code>.Summary</code> often unsatisfactory (e.g. it may contain headings and code blocks, which really should not go to the summary), so I wrote my own version. It works much better and the size of most summary blocks will be the same, unless certain articles are really short. The length 200 can be customized via <code>params.summary_length</code>.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#a6e22e">params</span>.<span style="color:#a6e22e">banner</span>]
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">src</span> = <span style="color:#e6db74">&#34;/path/to/banner.png&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">alt</span> = <span style="color:#e6db74">&#34;alternative text on image&#34;</span>
</span></span></code></pre></div><p>By default, each summary block on the homepage contains the first 200 letters extracted from all paragraphs of an article. I find Hugo&rsquo;s built in <code>.Summary</code> often unsatisfactory (e.g. it may contain headings and code blocks, which really should not go to the summary), so I wrote my own version. It works much better and the size of most summary blocks will be the same, unless certain articles are really short. The length 200 can be customized via <code>params.summary_length</code>.</p>
<p>If you are not satisfied with the automatic summary, you can specify the <code>description</code> option in the (YAML) metadata of your Markdown document, e.g.,</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;My Cool Post&#34;</span>
<span style="color:#f92672">description</span>: <span style="color:#e6db74">&#34;Please use this as the summary.&#34;</span>
</code></pre></div><p>Each summary block may contain a thumbnail, which is the first image in an article if exists. You can override it by providing the <code>thumbnail</code> option in the meta data of your Markdown document, e.g.,</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">---
<span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;My Cool Post&#34;</span>
<span style="color:#f92672">thumbnail</span>: <span style="color:#e6db74">&#34;/url/of/the/image&#34;</span>
---
</code></pre></div><p>For each page, this theme adds an edit link to the top-right if a parameter <code>github_edit</code> is provided, so that your reader may easily help you edit a page and submit a pull request on Github.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;My Cool Post&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">description</span>: <span style="color:#e6db74">&#34;Please use this as the summary.&#34;</span>
</span></span></code></pre></div><p>Each summary block may contain a thumbnail, which is the first image in an article if exists. You can override it by providing the <code>thumbnail</code> option in the meta data of your Markdown document, e.g.,</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#e6db74">&#34;My Cool Post&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">thumbnail</span>: <span style="color:#e6db74">&#34;/url/of/the/image&#34;</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p>For each page, this theme adds an edit link to the top-right if a parameter <code>github_edit</code> is provided, so that your reader may easily help you edit a page and submit a pull request on Github.</p>
<p>The page footer can be defined in <code>.Params.footer</code>, and the text is treated as Markdown. Below are some sample configurations:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-toml" data-lang="toml">[<span style="color:#a6e22e">params</span>]
<span style="color:#a6e22e">summary_length</span> = <span style="color:#ae81ff">200</span>
<span style="color:#a6e22e">github_edit</span> = <span style="color:#e6db74">&#34;https://github.com/yihui/hugo-xmag/edit/master/exampleSite/content/&#34;</span>
<span style="color:#a6e22e">footer</span> = <span style="color:#e6db74">&#34;&amp;copy; [Yihui Xie](https://yihui.name) 2017&#34;</span>
</code></pre></div><p>There are a few phrases that you can &ldquo;translate&rdquo; (I didn&rsquo;t use Hugo&rsquo;s multi-language feature just because I&rsquo;m lazy):</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-toml" data-lang="toml">[<span style="color:#a6e22e">params</span>.<span style="color:#a6e22e">text</span>]
<span style="color:#a6e22e">about_author</span> = <span style="color:#e6db74">&#34;About the Author&#34;</span>
<span style="color:#a6e22e">author_delimiter</span> = <span style="color:#e6db74">&#34;, &#34;</span>
<span style="color:#a6e22e">back</span> = <span style="color:#e6db74">&#34;Back to Home&#34;</span>
<span style="color:#a6e22e">edit</span> = <span style="color:#e6db74">&#34;Edit this page&#34;</span>
<span style="color:#a6e22e">tags</span> = <span style="color:#e6db74">&#34;Tags: &#34;</span>
<span style="color:#a6e22e">truncated</span> = <span style="color:#e6db74">&#34; &amp;hellip;&#34;</span>
<span style="color:#a6e22e">uncategorized</span> = <span style="color:#e6db74">&#34;Uncategorized&#34;</span>
</code></pre></div><p>You can define a data file under <code>data/</code> to store all authors information, e.g., you can use a TOML file <code>data/authors.toml</code> (or YAML/JSON):</p>
<pre><code>&quot;Alice Wonder&quot; = &quot;I'm Alice. More about me on [my homepage](http://example.com).&quot;
&quot;Yihui Xie&quot; = &quot;Hey this is Yihui. You don't want to follow me on Twitter @xieyihui.&quot;
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#a6e22e">params</span>]
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">summary_length</span> = <span style="color:#ae81ff">200</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">github_edit</span> = <span style="color:#e6db74">&#34;https://github.com/yihui/hugo-xmag/edit/master/exampleSite/content/&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">footer</span> = <span style="color:#e6db74">&#34;&amp;copy; [Yihui Xie](https://yihui.name) 2017&#34;</span>
</span></span></code></pre></div><p>There are a few phrases that you can &ldquo;translate&rdquo; (I didn&rsquo;t use Hugo&rsquo;s multi-language feature just because I&rsquo;m lazy):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span>[<span style="color:#a6e22e">params</span>.<span style="color:#a6e22e">text</span>]
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">about_author</span> = <span style="color:#e6db74">&#34;About the Author&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">author_delimiter</span> = <span style="color:#e6db74">&#34;, &#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">back</span> = <span style="color:#e6db74">&#34;Back to Home&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">edit</span> = <span style="color:#e6db74">&#34;Edit this page&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">tags</span> = <span style="color:#e6db74">&#34;Tags: &#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">truncated</span> = <span style="color:#e6db74">&#34; &amp;hellip;&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">uncategorized</span> = <span style="color:#e6db74">&#34;Uncategorized&#34;</span>
</span></span></code></pre></div><p>You can define a data file under <code>data/</code> to store all authors information, e.g., you can use a TOML file <code>data/authors.toml</code> (or YAML/JSON):</p>
<pre tabindex="0"><code>&#34;Alice Wonder&#34; = &#34;I&#39;m Alice. More about me on [my homepage](http://example.com).&#34;
&#34;Yihui Xie&#34; = &#34;Hey this is Yihui. You don&#39;t want to follow me on Twitter @xieyihui.&#34;
</code></pre><p>Then for an article with an author name that can be found in <code>data/authors.toml</code>, the author info will be added to the bottom of a page. For example, on this page, you can find information about me. You can change the phrase &ldquo;About the Author&rdquo; by changing the parameter <code>about_author</code> in <code>config.toml</code>.</p>
<p>To add a table of contents to an article, you can add <code>toc: true</code> to the YAML metadata of the Markdown document.</p>
<h1 id="custom-layouts">Custom layouts</h1>
<p>Besides the custom layout^[If this is the first time you have heard about &ldquo;customizing layouts&rdquo;, please read the Hugo documentation first: https://gohugo.io/themes/customizing/.] files <code>head_custom.html</code> and <code>foot_custom.html</code> supported in <strong>XMin</strong> (see <a href="https://xmin.yihui.name/about/">documentation</a>), this theme added a few more layout files such as <code>banner.html</code>, <code>comments.html</code> and <code>info.html</code> under <code>layouts/partials/</code>. The first can be used to customize the banner. The second can be used to add a comment section, e.g., if you want to use Hugo&rsquo;s default Disqus template, just add this to <code>comments.html</code>:</p>
<pre><code>{{ template &quot;_internal/disqus.html&quot; . }}
<pre tabindex="0"><code>{{ template &#34;_internal/disqus.html&#34; . }}
</code></pre><p>You can also append arbitrary text to each article through <code>info.html</code>. For example, you may declare copyrights or briefly introduce your site.</p>
<p>There are other partial templates in this theme and I encourage you to read the source code to figure out what they do.</p>
<h1 id="final-words">Final words</h1>
Expand Down Expand Up @@ -195,10 +195,9 @@ <h1 id="final-words">Final words</h1>
}
</script>


<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
window.disqus_config = function () {



Expand Down Expand Up @@ -228,7 +227,7 @@ <h1 id="final-words">Final words</h1>

<li><a href="/categories/"><span data-hover="Categories">Categories</span></a></li>

<li><a href="/about-me/"><span data-hover="About Me">About Me</span></a></li>
<li><a href="/about%20me/"><span data-hover="About Me">About Me</span></a></li>

</ul>

Expand Down Expand Up @@ -262,7 +261,6 @@ <h1 id="final-words">Final words</h1>
}
</script>


</body>
</html>

6 changes: 2 additions & 4 deletions about-me/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ <h1><span class="title">Yang Liu</span></h1>
}
</script>


<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
window.disqus_config = function () {



Expand Down Expand Up @@ -138,7 +137,7 @@ <h1><span class="title">Yang Liu</span></h1>

<li><a href="/categories/"><span data-hover="Categories">Categories</span></a></li>

<li><a href="/about-me/"><span data-hover="About Me">About Me</span></a></li>
<li><a href="/about%20me/"><span data-hover="About Me">About Me</span></a></li>

</ul>

Expand All @@ -165,7 +164,6 @@ <h1><span class="title">Yang Liu</span></h1>
}
</script>


</body>
</html>

10 changes: 3 additions & 7 deletions categories/catalog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="head-meta">

<span>Catalog</span>
<span>2021-03-07</span>
<span>2023-05-30</span>



Expand Down Expand Up @@ -72,9 +72,7 @@ <h1><a href="/post/2018/07/01/catalogue-of-my-old-blog/">Catalog of my old blog<
</section>

</main>
<nav>

</nav>
<nav></nav>
</div>

<script async src="//yihui.org/js/center-img.js"></script>
Expand All @@ -96,7 +94,6 @@ <h1><a href="/post/2018/07/01/catalogue-of-my-old-blog/">Catalog of my old blog<




<div class="footer">
<ul class="menu">

Expand All @@ -106,7 +103,7 @@ <h1><a href="/post/2018/07/01/catalogue-of-my-old-blog/">Catalog of my old blog<

<li><a href="/categories/"><span data-hover="Categories">Categories</span></a></li>

<li><a href="/about-me/"><span data-hover="About Me">About Me</span></a></li>
<li><a href="/about%20me/"><span data-hover="About Me">About Me</span></a></li>

</ul>

Expand All @@ -133,7 +130,6 @@ <h1><a href="/post/2018/07/01/catalogue-of-my-old-blog/">Catalog of my old blog<
}
</script>


</body>
</html>

2 changes: 1 addition & 1 deletion categories/catalog/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<guid>https://liuyanguu.github.io/post/2018/07/01/catalogue-of-my-old-blog/</guid>
<description>Introducing my new blog written solely in R MarkdownWhen I realized it was so convenient to write blog directly using R Markdown, I searched if there is a specific tool for it. And I found Blogdown, an R package developed by Yihui Xie, who also developed R Markdown.
CatalogAs a summary, I would like to create a catalog for the main topics I wrote on google blogger before July 2018.</description>
CatalogAs a summary, I would like to create a catalog for the main topics I wrote on google blogger before July 2018.</description>
</item>

</channel>
Expand Down
11 changes: 10 additions & 1 deletion categories/catalog/page/1/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
<!DOCTYPE html><html><head><title>https://liuyanguu.github.io/categories/catalog/</title><link rel="canonical" href="https://liuyanguu.github.io/categories/catalog/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://liuyanguu.github.io/categories/catalog/" /></head></html>
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>https://liuyanguu.github.io/categories/catalog/</title>
<link rel="canonical" href="https://liuyanguu.github.io/categories/catalog/">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=https://liuyanguu.github.io/categories/catalog/">
</head>
</html>
Loading

0 comments on commit d99fd55

Please sign in to comment.