From 428a441c5544e268b612e98aedfbc9002b5948b2 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Sun, 11 Oct 2020 16:05:03 -0500 Subject: [PATCH 01/12] replace the dead link --- exampleSite/content/note/2017-06-14-another-note.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/note/2017-06-14-another-note.md b/exampleSite/content/note/2017-06-14-another-note.md index 16f41dea..76442dea 100644 --- a/exampleSite/content/note/2017-06-14-another-note.md +++ b/exampleSite/content/note/2017-06-14-another-note.md @@ -11,4 +11,4 @@ slug: another-note I just discovered [an awesome tutorial](https://apreshill.rbind.io/post/up-and-running-with-blogdown/) on **blogdown** written by Alison. I have to admit this is _the_ best **blogdown** tutorial I have seen so far. -![](https://apreshill.rbind.io/img/posts/2017-06-12-up-and-running-with-blogdown/blogdown-signpost-4.png) +![Alison's blogdown tutorial](https://alison.rbind.io/post/2017-06-12-up-and-running-with-blogdown/blogdown-signpost-1.png) From 5dc6edc633695dc99ffe3007408023233b20a982 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 12 Oct 2020 23:08:49 +0200 Subject: [PATCH 02/12] Fix paths in navigation bar (#36) Co-authored-by: Yihui Xie --- exampleSite/config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 88753423..6b5e2eb6 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -14,19 +14,19 @@ permalinks: menu: main: - name: Home - url: / + url: "" weight: 1 - name: About - url: /about/ + url: "about/" weight: 2 - name: Categories - url: /categories/ + url: "categories/" weight: 3 - name: Tags - url: /tags/ + url: "tags/" weight: 4 - name: Subscribe - url: /index.xml + url: "index.xml" params: description: "A website built through Hugo and blogdown." From 4100270f6fe5b530cf8b7989cf34a20b4e70c1d9 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 15 Oct 2020 21:04:46 -0500 Subject: [PATCH 03/12] don't echo the shell script when executing it --- exampleSite/content/_index.Rmarkdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/_index.Rmarkdown b/exampleSite/content/_index.Rmarkdown index a7df6f62..bae7bb60 100644 --- a/exampleSite/content/_index.Rmarkdown +++ b/exampleSite/content/_index.Rmarkdown @@ -10,7 +10,7 @@ title: Home **XMin** is a Hugo theme written by [Yihui Xie](https://yihui.org) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines). -```{bash, comment='', echo=3, eval=Sys.which('bash') != ''} +```{bash, comment='', echo=3, eval=Sys.which('bash') != '', message=FALSE} cd ../..; if [ ! -f 'theme.toml' ]; then exit 0; fi # only run find below within the theme example site find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l From 8079ad2d6302bda7cb950f16de49c8a325ef3445 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 5 Nov 2020 08:29:28 -0600 Subject: [PATCH 04/12] update license year --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index fa77e18e..c8a9d047 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Yihui Xie +Copyright (c) 2017-2020 Yihui Xie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From c5236cf022273adf4a94d5d6d3bb4230c8b02e66 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 11 Nov 2021 23:13:01 -0600 Subject: [PATCH 05/12] update license year --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index c8a9d047..56f404cf 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017-2020 Yihui Xie +Copyright (c) 2017-2021 Yihui Xie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From c996cc735a2fee5224d3532506c8170c532bb994 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 11 Nov 2021 23:14:09 -0600 Subject: [PATCH 06/12] use defer instead of async --- exampleSite/layouts/partials/foot_custom.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exampleSite/layouts/partials/foot_custom.html b/exampleSite/layouts/partials/foot_custom.html index 3389d46d..4f9aaa21 100644 --- a/exampleSite/layouts/partials/foot_custom.html +++ b/exampleSite/layouts/partials/foot_custom.html @@ -1,4 +1,4 @@ - - + + - + From 181e25cdef57ea2a03e6a10f65da9f0c03bd2f99 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 11 Nov 2021 23:19:55 -0600 Subject: [PATCH 07/12] update copyright year --- exampleSite/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 6b5e2eb6..8aa07718 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -30,7 +30,7 @@ menu: params: description: "A website built through Hugo and blogdown." - footer: "© [Yihui Xie](https://yihui.org) 2017 -- 2020 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)" + footer: "© [Yihui Xie](https://yihui.org) 2017 -- 2021 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)" markup: goldmark: From c073ce865a97a08c5348f9dcc5af91a3aa64c178 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 11 Nov 2021 23:24:37 -0600 Subject: [PATCH 08/12] close #47: the example site has switched to config.yaml --- exampleSite/content/about.md | 57 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md index 210bb355..804e82b0 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about.md @@ -7,38 +7,35 @@ author: Yihui Xie The theme name "XMin" can be interpreted as "**X**ie's **Min**imal theme" (Xie is my last name) or "e**X**tremely **Min**imal theme". -# config.toml +# config.yaml For this example site, I defined permalinks for two sections, `post` and `note`, so that the links to pages under these directories will contain the date info, e.g., `https://xmin.yihui.org/post/2016/02/14/a-plain-markdown-post/`. This is optional, and it is up to your personal taste of URLs. -``` -[permalinks] - post = "/post/:year/:month/:day/:slug/" - note = "/note/:year/:month/:day/:slug/" +```yaml +permalinks: + note: "/note/:year/:month/:day/:slug/" + post: "/post/:year/:month/:day/:slug/" ``` You can define the menu through `menu.main`, e.g., -``` -[[menu.main]] - name = "Home" - url = "/" - weight = 1 -[[menu.main]] - name = "About" - url = "/about/" - weight = 2 -[[menu.main]] - name = "Categories" - url = "/categories/" - weight = 3 -[[menu.main]] - name = "Tags" - url = "/tags/" - weight = 4 -[[menu.main]] - name = "Subscribe" - url = "/index.xml" +```yaml +menu: + main: + - name: Home + url: "" + weight: 1 + - name: About + url: "about/" + weight: 2 + - name: Categories + url: "categories/" + weight: 3 + - name: Tags + url: "tags/" + weight: 4 + - name: Subscribe + url: "index.xml" ``` Alternatively, you can add `menu: main` to the YAML metadata of any of your pages, so that these pages will appear in the menu. @@ -46,8 +43,8 @@ Alternatively, you can add `menu: main` to the YAML metadata of any of your page The page footer can be defined in `.Params.footer`, and the text is treated as Markdown, e.g., ``` -[params] - footer = "© [Yihui Xie](https://yihui.org) 2017" +params: + footer: "© [Yihui Xie](https://yihui.org) 2017 -- 2021" ``` # Custom layouts @@ -55,11 +52,11 @@ The page footer can be defined in `.Params.footer`, and the text is treated as M There are two layout files under `layouts/partials/` that you may want to override: `head_custom.html` and `foot_custom.html`. This is how you inject arbitrary HTML code to the head and foot areas. For example, this site has a file `layouts/partials/foot_custom.html` to support LaTeX math via MathJax and center images automatically: ```html - - + - + ``` You can certainly enable highlight.js for syntax highlighting by yourself through `head_custom.html` and `foot_custom.html` if you want. From 0b3e81d063d2b8f8588c61a979bf36739c8b3ac9 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 16 Nov 2021 09:48:32 -0600 Subject: [PATCH 09/12] don't use hugo's syntax highlighting by default --- exampleSite/config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 8aa07718..65719378 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -33,6 +33,8 @@ params: footer: "© [Yihui Xie](https://yihui.org) 2017 -- 2021 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)" markup: + highlight: + codeFences: false goldmark: renderer: unsafe: true From 6d4b5dcfbfebb7d5b800c8010e623ca95026a70c Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 30 Nov 2021 23:42:51 -0600 Subject: [PATCH 10/12] fix #53: correct the broken links --- exampleSite/content/note/2017-06-14-another-note.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/note/2017-06-14-another-note.md b/exampleSite/content/note/2017-06-14-another-note.md index 76442dea..c0f3a945 100644 --- a/exampleSite/content/note/2017-06-14-another-note.md +++ b/exampleSite/content/note/2017-06-14-another-note.md @@ -9,6 +9,6 @@ tags: slug: another-note --- -I just discovered [an awesome tutorial](https://apreshill.rbind.io/post/up-and-running-with-blogdown/) on **blogdown** written by Alison. I have to admit this is _the_ best **blogdown** tutorial I have seen so far. +I just discovered [an awesome tutorial](https://www.apreshill.com/blog/2020-12-new-year-new-blogdown/) on **blogdown** written by Alison. I have to admit this is _the_ best **blogdown** tutorial I have seen so far. -![Alison's blogdown tutorial](https://alison.rbind.io/post/2017-06-12-up-and-running-with-blogdown/blogdown-signpost-1.png) +![Alison's blogdown tutorial](https://www.apreshill.com/blog/2020-12-new-year-new-blogdown/03-blogdown-2021.png) From a8ae2c5743f105b715bb9496e7659d599dbb75ba Mon Sep 17 00:00:00 2001 From: Alexander Fallenstedt Date: Thu, 30 Dec 2021 19:10:33 -0800 Subject: [PATCH 11/12] display current year in footer (#54) --- exampleSite/config.yaml | 2 +- layouts/partials/footer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 65719378..59b9ae11 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -30,7 +30,7 @@ menu: params: description: "A website built through Hugo and blogdown." - footer: "© [Yihui Xie](https://yihui.org) 2017 -- 2021 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)" + footer: "© [Yihui Xie](https://yihui.org) 2017 -- {Year} | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)" markup: highlight: diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3f46ea54..f603e172 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,7 +2,7 @@ {{ partial "foot_custom.html" . }} {{ with .Site.Params.footer }}
- {{ . | markdownify }} + {{ replace . "{Year}" now.Year | markdownify}} {{ end }} From 50fc665d2a11da0e1e1ed6082630a299cb97db00 Mon Sep 17 00:00:00 2001 From: "Kenneth C. Arnold" Date: Wed, 19 Jan 2022 14:28:25 -0500 Subject: [PATCH 12/12] Make line-height unitless (#56) With fixed units, the line height is too small for headings that wrap (e.g., long post titles). --- static/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/style.css b/static/css/style.css index 4dc3ae45..0b51cd65 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2,7 +2,7 @@ body { max-width: 800px; margin: auto; padding: 1em; - line-height: 1.5em; + line-height: 1.5; } /* header and footer areas */