Initial commit

This commit is contained in:
vlnst 2023-03-07 18:55:48 +03:00
commit 4da3ce7548
50 changed files with 954 additions and 0 deletions

0
.hugo_build.lock Normal file
View file

5
archetypes/default.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: '{{ .Date }}'
---

50
config.toml Normal file
View file

@ -0,0 +1,50 @@
baseURL = 'https://bloatcat.tk/'
languageCode = 'en-us'
title = 'bloatcat'
theme = 'hugo-xmin'
defaultContentLanguage = 'en'
[languages]
[languages.en]
title = 'Home'
languageName = 'English'
weight = 1
[[languages.en.menu.main]]
name = 'Home'
url = '/'
weight = 1
[[languages.en.menu.main]]
name = 'About'
url = 'about/'
weight = 2
[[languages.en.menu.main]]
name = 'Contact'
url = 'contact/'
weight = 3
[[languages.en.menu.main]]
name = 'Posts'
url = 'blog/'
weight = 4
[languages.ru]
title = 'Главная'
languageName = 'Русский'
weight = 2
[[languages.ru.menu.main]]
name = "Главная"
url = 'ru'
weight = 1
[[languages.ru.menu.main]]
name = "О проекте"
url = 'ru/about'
weight = 2
[[languages.ru.menu.main]]
name = "Связаться"
url = 'ru/contact'
weight = 3
[[languages.ru.menu.main]]
name = "Блог"
url = 'ru/blog'
weight = 4
[markup.goldmark.renderer]
unsafe = true

51
content/_index.md Normal file
View file

@ -0,0 +1,51 @@
---
title: "Home"
---
<div style="float: right;">
<b>EN</b>
<a href="/ru">RU</a>
</div>
# Hello!
### Welcome to bloatcat.tk. Here you can find some useful services
Public:
* [AnonymousOverflow](https://ao.bloatcat.tk/) - 09.02.23
* [BreezeWiki](https://breezewiki.bloatcat.tk/) [WIP] - 03.02.23
* [Forgejo](https://git.bloatcat.tk/) - 14.01.23
* [FreshRSS](https://freshrss.bloatcat.tk/) - 11.02.23
* [Gothub](https://gh.bloatcat.tk/) [WIP] - 13.02.23
* [Laboratory](https://lab.bloatcat.tk/) [WIP] - 14.02.23
* [Libreddit](https://libreddit.bloatcat.tk/) - 09.02.23
* [Libremdb](https://ld.bloatcat.tk/) - 13.02.23
* [Librex](https://librex.bloatcat.tk) - 19.01.23
* [Lingva Translate](https://lingva.bloatcat.tk/) - 16.01.23
* Mumble (mumble.bloatcat.tk) - 19.01.23
* [Piped](https://piped.bloatcat.tk/) - 08.02.23
* [PrivateBin](https://bin.bloatcat.tk/) - 02.02.23
* [RSS-Bridge](https://rss.bloatcat.tk/) - 03.02.23
* [Rural Dictionary](https://rd.bloatcat.tk/) - 16.01.23
* [SearXNG](https://searx.bloatcat.tk/) - 14.01.23
* [SimplyTranslate](https://st.bloatcat.tk/) [NEW] - 04.03.23
* [Tent](https://tent.bloatcat.tk/) [WIP] - 09.02.23
* [Wayback Classic](https://wayback.bloatcat.tk/) [WIP] - 13.02.23
* [Whoogle](https://whoogle.bloatcat.tk/) [NEW] - 02.03.23
* [Wikiless](https:/wikiless.bloatcat.tk/) - 22.01.23
* [Yarn](https://yarn.bloatcat.tk/) - 13.02.23
Private:
* Akkoma - 23.01.23
* E-mail - 20.01.23
* XMPP - 14.01.23
You can check services status on [this page](https://uptime.bloatcat.tk/)
Website is available on <b>Tor:</b>
6goqebhsf5mgaq3pipdifmazkw4pxx7q25h4g4aakd4nkflftvyhrdqd.onion
If something doesn't work or work slowly, you can check an auto-updated list of other alternative frontend instances [here](https://github.com/NoPlagiarism/frontend-instances-list/blob/master/instances/all.md)

49
content/_index.ru.md Normal file
View file

@ -0,0 +1,49 @@
---
title: "Главная"
---
<div style="float: right;">
<a href="/">EN</a>
<b>RU</b>
</div>
# Привет!
### Добро пожаловать на bloatcat.tk. Здесь представлен список полезных сервисов
Публичные:
* [AnonymousOverflow](https://ao.bloatcat.tk/) - 09.02.23
* [BreezeWiki](https://breezewiki.bloatcat.tk/) [WIP] - 03.02.23
* [Forgejo](https://git.bloatcat.tk/) - 14.01.23
* [FreshRSS](https://freshrss.bloatcat.tk/) - 11.02.23
* [Gothub](https://gh.bloatcat.tk/) [WIP] - 13.02.23
* [Laboratory](https://lab.bloatcat.tk/) [WIP] - 14.02.23
* [Libreddit](https://libreddit.bloatcat.tk/) - 09.02.23
* [Libremdb](https://ld.bloatcat.tk/) - 13.02.23
* [Librex](https://librex.bloatcat.tk) - 19.01.23
* [Lingva Translate](https://lingva.bloatcat.tk/) - 16.01.23
* Mumble (mumble.bloatcat.tk) - 19.01.23
* [Piped](https://piped.bloatcat.tk/) - 08.02.23
* [PrivateBin](https://bin.bloatcat.tk/) - 02.02.23
* [RSS-Bridge](https://rss.bloatcat.tk/) - 03.02.23
* [Rural Dictionary](https://rd.bloatcat.tk/) - 16.01.23
* [SearXNG](https://searx.bloatcat.tk/) - 14.01.23
* [SimplyTranslate](https://st.bloatcat.tk/) [Новый] - 04.03.23
* [Tent](https://tent.bloatcat.tk/) [WIP] - 09.02.23
* [Wayback Classic](https://wayback.bloatcat.tk/) [WIP] - 13.02.23
* [Whoogle](https://whoogle.bloatcat.tk/) [Новый] - 02.03.23
* [Wikiless](https:/wikiless.bloatcat.tk/) - 22.01.23
* [Yarn](https://yarn.bloatcat.tk/) - 13.02.23
Приватные:
* Akkoma - 23.01.23
* Почта - 20.01.23
* XMPP - 14.01.23
Вы можете узнать состояние сервисов на [этой страничке](https://uptime.bloatcat.tk/)
Веб-сайт доступен в сети Tor - 6goqebhsf5mgaq3pipdifmazkw4pxx7q25h4g4aakd4nkflftvyhrdqd.onion
Если что-то не работает или работает медленно, вы можете посмотреть самообновляющийся список инстансов альтернативных фронтендов [тут](https://github.com/NoPlagiarism/frontend-instances-list/blob/master/instances/all.md)

33
content/about.md Normal file
View file

@ -0,0 +1,33 @@
---
title: "About"
---
### What is it?
This is just a simple project that provides some services for free.
I started this project on 13.01.23 to learn something new and to improve my skills in managing GNU/Linux.
Server is located in Iceland 🇮🇸.
<table>
<tbody>
<tr>
<td>OS</td>
<td>Debian GNU/Linux 11</td>
<tr>
<td>RAM</td>
<td>1G</td>
</tr>
<tr>
<td>CPU</td>
<td>1</td>
</tr>
<tr>
<td>Storage</td>
<td>25G</td>
</tr>
</tbody>
</table>
I pay 4.50€/m for VPS and around 10$/y for domain name.

33
content/about.ru.md Normal file
View file

@ -0,0 +1,33 @@
---
title: "О проекте"
---
### Что это за сайт?
Это просто небольшой проект, предостовляющий в бесплатное пользование некоторые сервисы
Я начал данный проект 13 января 2023 года, чтобы научиться чему-то новому и улучшить мои навыки управления системами GNU/Linux.
Сервер расположен в Исландии 🇮🇸.
<table>
<tbody>
<tr>
<td>Операционная система</td>
<td>Debian GNU/Linux 11</td>
<tr>
<td>ОЗУ</td>
<td>1G</td>
</tr>
<tr>
<td>Количество ядер</td>
<td>1</td>
</tr>
<tr>
<td>ПЗУ</td>
<td>25G</td>
</tr>
</tbody>
</table>
Я плачу́ 5$ за VPS в месяц и около 10$ за доменное имя в год.

View file

@ -0,0 +1,9 @@
---
title: "First Steps"
date: "2023-02-08"
---
I added Librex instance to Librex official repo and PrivateBin instance to PrivateBin instance directory. This is a huge step towards making server more popular, and I will have more difficulties to face.
I'm planing on adding other services to public lists when I will be sure about stability of the server, when I finally resolve all minor issues.
For the last two weeks I hosted some cool services which I needed (e.g. piped). I also started filling up wiki and hosted a gemini site (which is empty for now). I'm thinking about doing translations to my main language. I suppose it would be better to have multiple languages.

View file

@ -0,0 +1,10 @@
---
title: "Первые шаги"
date: "2023-02-08"
---
Я добавил свой инстанс [Librex](https://librex.bloatcat.tk/) в официальный [репозиторий](https://github.com/hnhx/librex), тоже самое сделал и с [PrivateBin](https://bin.bloatcat.tk/), добавив его [сюда](https://privatebin.info/directory/). Это большой шаг к популяризации данного проекта, а также мне придётся столкнуться с новыми трудностями.
Я планирую добавить и некоторые остальные сервисы в публичные листы, когда у меня появится время, и я буду уверен в их стабильной работе, а также решу некоторые незначительные проблемы.
За последние две недели я поднял несколько крутых сервисов, которые мне были нужны (например, piped). Я также начал заполнять [вики](https://wiki.bloatcat.tk/) и поднял gemini капсулу (где пока пусто). Я думаю о том, чтобы сделать перевод данного сайта на мой родной язык. Я думаю, это было бы неплохо иметь несколько языков на сайте.

View file

@ -0,0 +1,5 @@
---
title: "Removing Jitsi Meet"
date: "2023-01-19"
---
I made a descision to remove Jisti Meet for now, as it consumed too much RAM.

View file

@ -0,0 +1,5 @@
---
title: "Удаление Jitsi Meet"
date: "2023-01-19T11:32:34+03:00"
---
Я принял решение снести Jitsi Meet, так как мне не хватало ОЗУ для нормальной работы сервера. Думаю, это не навсегда.

4
content/blog/_index.md Normal file
View file

@ -0,0 +1,4 @@
---
title: Blog
---

View file

@ -0,0 +1,4 @@
---
title: Блог
---

7
content/blog/hi.md Normal file
View file

@ -0,0 +1,7 @@
---
title: "Hi!"
date: "2023-01-17"
---
How are you?

7
content/blog/hi.ru.md Normal file
View file

@ -0,0 +1,7 @@
---
title: "Привет!"
date: "2023-01-17"
---
Как дела?

12
content/blog/hugo.md Normal file
View file

@ -0,0 +1,12 @@
---
title: "Hugo"
date: "2023-03-07"
---
I wanted to change design of the site for a while, but I don't have much fantasy, and I wanted to write something of my own, unusual, memorable.
First, I wrote the site with the help of [simplecss](https://simplecss.org/) and html wrote from scratch, sometimes changing something in style.css. Over time, I realized that this was not very convenient and tried to get back to the [Hugo](https://gohugo.io) I met a long time ago when I made a site with the schedule and homework for my course.
I haven't been fucking hard for a long time, but I decided to give up on him. Yesterday, I tried to update the site using [lit.cs](https://ajusa.github.io/lit/). It didn't work well, but I didn't leave the idea that we could do things differently, more comfortable and better. I've decided to give another chance to the static website generators.
At first, my sight fell on the [Jekyll](https://jekyllrb.com/) I haven't worked with. I almost didn't notice the difference from the hugo. When you start using it, it's almost the same thing, but I didn't like it, and I decided to go back to Hugo. Today, I finally finished and translated all the articles, but it's not a final option. For the theme, I used [hugo-xmin](https://github.com/yihui/hugo-xmin), which was slightly changed.

12
content/blog/hugo.ru.md Normal file
View file

@ -0,0 +1,12 @@
---
title: "Обновление дизайна сайта"
date: "2023-03-07"
---
Я давно хотел поменять дизайн сайта, но у меня мало фантазии, при этом хотелось написать что-то своё, необычное, запоминающееся.
Сначала я писал сайт через Neovim, используя [simplecss](https://simplecss.org/), и писал с нуля html, изредка что-то изменяя в стилях. Со временем я понял, что это не очень удобно и попробовал вернуться к [Hugo](https://gohugo.io), с которым я давно познакомился, когда делал сайт для с расписанием и домашкой для своего курса.
Я недолго мучался с Hugo, но решил всё же отказаться от него. Вчера я попробовал обновить сайт, используя [lit.css](https://ajusa.github.io/lit/). Получилось не плохо, но меня не покидала идея, что можно сделать по-другому, удобнее и лучше. Ложась спать, я всё же решил дать ещё один шанс статическим генераторам сайтов.
Сначала мой взор пал на [Jekyll](https://jekyllrb.com/), с которым я ещё не работал. Я почти не заметил разницы с Hugo, когда только начинаешь им пользоваться, почти всё то же самое, но мне не понравилось, и я принял решение вернуться к Hugo. Сегодня я наконец доделал и перевёл все статьи, но это далеко не конечный вариант. Для темы я использовал [hugo-xmin](https://github.com/yihui/hugo-xmin), которая была немного изменёна.

12
content/contact.md Normal file
View file

@ -0,0 +1,12 @@
---
title: "Contact"
---
### Here you can find my contacts
### XMPP
[vlnst@bloatcat.tk](xmpp:vlnst@bloatcat.tk?roster;name=vlnst)
### E-mail
[vlnst@bloatcat.tk](mailto:vlnst@bloatcat.tk)
[GPG](/vlnst.pub)

12
content/contact.ru.md Normal file
View file

@ -0,0 +1,12 @@
---
title: "Связаться"
---
### Здесь вы можете найти мои контакты. Пишите, даже по всякой чепухе :3
### XMPP
[vlnst@bloatcat.tk](xmpp:vlnst@bloatcat.tk?roster;name=vlnst)
### Почта
[vlnst@bloatcat.tk](mailto:vlnst@bloatcat.tk)
[GPG](/vlnst.pub)

2
i18n/en.toml Normal file
View file

@ -0,0 +1,2 @@
[footer]
other = "<a href='https://git.bloatcat.tk/vlnst/bloatcat.tk-hugo'>Source code</a>"

2
i18n/ru.toml Normal file
View file

@ -0,0 +1,2 @@
[footer]
other = "<a href='https://git.bloatcat.tk/vlnst/bloatcat.tk-hugo'>Исходный код</a>"

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

41
static/vln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mnej4K2XkPJwRDpXU7w7nrKB+x60w6zLLecM7h/NtPJsTKPml7dqKQgA
eIE+JvskQUjPimAjVlnUB45oeTdmc1SfNIoRSHUdFcpVNTabtFngrhrlC/hyKqM0
Y+ob7kabiUD6Xu4YtoCfb7rH0QrVJXkQa1cEEbp06kMVLefpOZoyLJa8iPyhBW8i
WI1zjAPxjrG3GSaGVHEle2Q3oyCOjhuK6UR20Ol3lEGlh23mBuEJS0zgYNBbUad5
hc4ejMsKASXBb2isMYi0hXI=
=pny4
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017-2022 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
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,28 @@
# HUGO XMIN
## _Keep it simple, but not simpler_
**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
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```
```
5 ./layouts/404.html
12 ./layouts/_default/single.html
20 ./layouts/_default/list.html
13 ./layouts/_default/terms.html
0 ./layouts/partials/foot_custom.html
0 ./layouts/partials/head_custom.html
9 ./layouts/partials/footer.html
20 ./layouts/partials/header.html
51 ./static/css/style.css
7 ./static/css/fonts.css
137 total
```
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.org)

View file

@ -0,0 +1,4 @@
---
title: ''
date: ''
---

View file

@ -0,0 +1,40 @@
baseurl: "/"
languageCode: "en-us"
title: "A minimal Hugo website"
theme: "hugo-xmin"
googleAnalytics: ""
disqusShortname: ""
ignoreFiles: ["\\.Rmd$", "\\.Rmarkdown$", "_cache$"]
footnotereturnlinkcontents: "↩"
permalinks:
note: "/note/:year/:month/:day/:slug/"
post: "/post/:year/:month/:day/:slug/"
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"
params:
description: "A website built through Hugo and blogdown."
footer: "&copy; [Yihui Xie](https://yihui.org) 2017 -- {Year} | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
markup:
highlight:
codeFences: false
goldmark:
renderer:
unsafe: true

View file

@ -0,0 +1,25 @@
---
title: Home
---
[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/yihui/hugo-xmin)
# HUGO XMIN
## _Keep it simple, but not simpler_
**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') != '', 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
```
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,
`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`
All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.

View file

@ -0,0 +1,38 @@
---
title: Home
---
[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/yihui/hugo-xmin)
# HUGO XMIN
## _Keep it simple, but not simpler_
**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
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```
```
5 ./layouts/404.html
12 ./layouts/_default/single.html
20 ./layouts/_default/list.html
13 ./layouts/_default/terms.html
0 ./layouts/partials/foot_custom.html
0 ./layouts/partials/head_custom.html
9 ./layouts/partials/footer.html
20 ./layouts/partials/header.html
51 ./static/css/style.css
7 ./static/css/fonts.css
137 total
```
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,
`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`
All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.

View file

@ -0,0 +1,100 @@
---
title: About Hugo XMin
author: Yihui Xie
---
**XMin** is the first Hugo theme I have designed. The original reason that I wrote it was I needed a minimal example of Hugo themes when I was writing the [**blogdown**](https://github.com/rstudio/blogdown) book. Basically I wanted a simple theme that supports a navigation menu, a home page, other single pages, lists of pages, blog posts, categories, tags, and RSS. That is all. Nothing fancy. In terms of CSS and JavaScript, I really want to keep them minimal. In fact, this theme does not contain any JavaScript code at all, although on this example website I did introduce some JavaScript code (still relatively simple anyway). The theme does not contain any images, either, and is pretty much a plain-text theme.
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.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.
```yaml
permalinks:
note: "/note/:year/:month/:day/:slug/"
post: "/post/:year/:month/:day/:slug/"
```
You can define the menu through `menu.main`, e.g.,
```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.
The page footer can be defined in `.Params.footer`, and the text is treated as Markdown, e.g.,
```
params:
footer: "&copy; [Yihui Xie](https://yihui.org) 2017 -- {Year}"
```
Here `{Year}` means the year in which the site is built (usually the current year).
# Custom layouts
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
<script defer src="//yihui.org/js/math-code.js"></script>
<script defer src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script defer src="//yihui.org/js/center-img.js"></script>
```
You can certainly enable highlight.js for syntax highlighting by yourself through `head_custom.html` and `foot_custom.html` if you want.
If you do not like the default fonts (e.g., `Palatino`), you may provide your own `static/css/fonts.css` under the root directory of your website to override the `fonts.css` in the theme.
# Other features
I could have added more features to this theme, but I decided not to, since I have no intention to make this theme feature-rich. However, I will teach you how. I have prepared several examples via pull requests at https://github.com/yihui/hugo-xmin/pulls, so that you can see the implementations of these features when you check out the diffs in the pull requests. For example, you can:
- [Enable Google Analytics](https://github.com/yihui/hugo-xmin/pull/3)
- [Enable Disqus comments](https://github.com/yihui/hugo-xmin/pull/4)
- [Enable highlight.js for syntax highlighting of code blocks](https://github.com/yihui/hugo-xmin/pull/5)
- [Display categories and tags on a page](https://github.com/yihui/hugo-xmin/pull/2)
- [Add a table of contents](https://github.com/yihui/hugo-xmin/pull/7)
- [Add a link in the footer of each page to "Edit this page" on Github](https://github.com/yihui/hugo-xmin/pull/6)
To fully understand these examples, you have to read [the section on Hugo templates](https://bookdown.org/yihui/blogdown/templates.html) in the **blogdown** book.
# Design philosophy
Lastly, a few words about my design philosophy for this theme: I have been relying on existing frameworks like Bootstrap for years since I'm not really a designer, and I was always scared by the complexity of CSS.
When I started writing this theme, I asked myself, "_What if I just write from scratch?_" No Bootstrap. No Normalize.css. I don't care about IE (life could be so much easier without IE) or inconsistencies among browsers (for personal websites). As long as the theme looks okay in Chrome, Firefox, and Safari, I'm done. Thanks to the simplicity of Markdown, you cannot really produce very complicated HTML, and I think styling the HTML output from Markdown is much simpler than general HTML documents. For example, I do not need to care much about form elements like textareas or buttons.
After I finished this theme, I started to wonder why I'd need `normalize.css` at all (it sounds like a religious belief). The default appearance of modern browsers actually looks pretty good in my eyes, after I tweak the typeface a little bit.
Compared to inconsistencies across browsers, I care much more about these properties of HTML elements:
- Tables should always be centered, and striped tables are easier to read especially when they are wide. Tables should not have vertical borders.
- An image should be centered if it is the only child element of a paragraph.
- The `max-width` of images, videos, and iframes should be `100%`.
I hope you can enjoy this theme. The source code is [on Github](https://github.com/yihui/hugo-xmin). Happy hacking!

View file

@ -0,0 +1,15 @@
---
title: A Quick Note on Two Beautiful Websites
author: Yihui Xie
date: '2017-06-13'
categories:
- Example
slug: a-quick-note
---
To me, the two most impressive websites based on **blogdown** are:
1. [Rob J Hyndman](https://robjhyndman.com)'s personal website.
1. [Live Free or Dichotomize](http://livefreeordichotomize.com) by Lucy and Nick _et al_.
I'm sure there will be more.

View file

@ -0,0 +1,14 @@
---
title: Another Note on A blogdown Tutorial
author: Yihui Xie
date: '2017-06-14'
categories:
- Example
tags:
- Tutorial
slug: another-note
---
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://www.apreshill.com/blog/2020-12-new-year-new-blogdown/03-blogdown-2021.png)

View file

@ -0,0 +1,18 @@
---
title: Lorem Ipsum
date: '2015-07-23'
categories:
- Example
tags:
- Markdown
---
**Lorem ipsum** dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore _magna aliqua_. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Quisque mattis volutpat lorem vitae feugiat. Praesent porta est quis porta imperdiet. Aenean porta, mi non cursus volutpat, mi est mollis libero, id suscipit orci urna a augue. In fringilla euismod lacus, vitae tristique massa ultricies vitae. Mauris accumsan ligula tristique, viverra nulla sed, porta sapien. Vestibulum facilisis nec nisl blandit convallis. Maecenas venenatis porta malesuada. Ut ac erat tortor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla sodales quam sit amet tincidunt egestas. In et turpis at orci vestibulum ullamcorper. Aliquam sed ante libero. Sed hendrerit arcu lacus.
> Sed luctus volutpat sem in dapibus. Ut pellentesque vitae magna ac mattis. Sed vestibulum, nulla at condimentum semper, magna quam posuere dui, quis sagittis enim nisi eget ex. Vivamus tempor erat a sem dapibus porta. Fusce varius dapibus tempus. Nam bibendum dignissim fringilla. Phasellus eu justo facilisis, ullamcorper urna in, feugiat mauris. Quisque dignissim purus vitae ullamcorper scelerisque. Sed at magna at nisi consequat euismod. Curabitur justo ex, efficitur in fermentum luctus, tincidunt nec lectus. Aliquam a neque metus. Etiam nulla nunc, tristique vitae accumsan ullamcorper, placerat eget nunc. Cras porta eleifend dolor maximus molestie. Etiam vitae pellentesque turpis, quis accumsan ligula. Mauris auctor, nisi nec ullamcorper pulvinar, libero magna sagittis enim, sollicitudin dignissim urna justo et tortor.
Morbi non sem euismod, suscipit purus id, gravida velit. Quisque mollis luctus ligula non suscipit. Curabitur massa arcu, aliquam ac dolor a, pellentesque dignissim dui. Donec at vestibulum magna. Quisque fermentum, tortor id sodales egestas, ligula ligula interdum ipsum, et volutpat elit massa vitae nibh. Morbi eleifend libero quis pretium viverra. Etiam congue, velit ac vestibulum finibus, velit nibh fringilla purus, eu semper dui est eu nunc. Etiam feugiat scelerisque diam vitae sodales. Etiam luctus in urna eu lobortis. Nam vestibulum eros et nibh elementum ullamcorper. Nam tristique porttitor orci, nec pretium est vestibulum at. Quisque posuere semper orci, vel semper justo commodo sed. Nullam accumsan risus rhoncus fringilla porta. Morbi interdum condimentum pharetra. Donec eu elit quam. Vivamus eleifend posuere mi, vel accumsan urna sollicitudin ut.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla nec nunc felis. Sed bibendum vel leo id semper. Maecenas vitae iaculis ante. Nam ut tempor est, eu molestie augue. Quisque tincidunt sagittis odio sed tristique. Aenean et felis quis mi viverra consequat.

View file

@ -0,0 +1,92 @@
---
title: A Plain Markdown Post
author: Yihui Xie
date: '2016-02-14'
categories:
- Example
- Hugo
tags:
- blogdown
- Markdown
- MathJax
- Pandoc
- RStudio
---
This sample post is mainly for [**blogdown**](https://github.com/rstudio/blogdown) users. If you do not use **blogdown**, you can skip the first section.
# 1. Markdown or R Markdown
This is a post written in plain Markdown (`*.md`) instead of R Markdown (`*.Rmd`). The major differences are:
1. You cannot run any R code in a plain Markdown document, whereas in an R Markdown document, you can embed R code chunks (```` ```{r} ````);
2. A plain Markdown post is rendered through [Blackfriday](https://gohugo.io/overview/configuration/), and an R Markdown document is compiled by [**rmarkdown**](http://rmarkdown.rstudio.com) and [Pandoc](http://pandoc.org).
There are many differences in syntax between Blackfriday's Markdown and Pandoc's Markdown. For example, you can write a task list with Blackfriday but not with Pandoc:
- [x] Write an R package.
- [ ] Write a book.
- [ ] ...
- [ ] Profit!
Similarly, Blackfriday does not support LaTeX math and Pandoc does. I have added the MathJax support to this theme ([hugo-xmin](https://github.com/yihui/hugo-xmin)) but there is a caveat for plain Markdown posts: you have to include math expressions in a pair of backticks (inline: `` `$ $` ``; display style: `` `$$ $$` ``), e.g., `$S_n = \sum_{i=1}^n X_i$`.^[This is because we have to protect the math expressions from being interpreted as Markdown.] For R Markdown posts, you do not need the backticks, because Pandoc can identify and process math expressions.
When creating a new post, you have to decide whether the post format is Markdown or R Markdown, and this can be done via the `rmd` argument of the function `blogdown::new_post()`, e.g.
```r
blogdown::new_post("Post Title", rmd = FALSE)
```
Actually I recommend you to use the RStudio addin "New Post" instead:
![RStudio addin New Post](https://bookdown.org/yihui/blogdown/images/new-post.png)
# 2. Sample Text
## Second-level header
### Third-level header
#### Fourth-level header
A paragraph (with a footnote):
**Lorem ipsum** dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore _magna aliqua_. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.^[I'm sure you are bored by the text here.]
A blockquote (a gray bar at the left and lightgray background):
> Quisque mattis volutpat lorem vitae feugiat. Praesent porta est quis porta imperdiet. Aenean porta, mi non cursus volutpat, mi est mollis libero, id suscipit orci urna a augue. In fringilla euismod lacus, vitae tristique massa ultricies vitae. Mauris accumsan ligula tristique, viverra nulla sed, porta sapien. Vestibulum facilisis nec nisl blandit convallis. Maecenas venenatis porta malesuada. Ut ac erat tortor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla sodales quam sit amet tincidunt egestas. In et turpis at orci vestibulum ullamcorper. Aliquam sed ante libero. Sed hendrerit arcu lacus.
Some code (with a drop-shadow effect):
```js
(function() {
var quotes = document.getElementsByTagName('blockquote'), i, quote;
for (i = 0; i < quotes.length; i++) {
quote = quotes[i];
var n = quote.children.length;
if (n === 0) continue;
var el = quote.children[n - 1];
if (!el || el.nodeName !== 'P') continue;
// right-align a quote footer if it starts with ---
if (/^—/.test(el.textContent)) el.style.textAlign = 'right';
}
})();
```
A table (centered by default):
| Sepal.Length| Sepal.Width| Petal.Length| Petal.Width|Species |
|------------:|-----------:|------------:|-----------:|:-------|
| 5.1| 3.5| 1.4| 0.2|setosa |
| 4.9| 3.0| 1.4| 0.2|setosa |
| 4.7| 3.2| 1.3| 0.2|setosa |
| 4.6| 3.1| 1.5| 0.2|setosa |
| 5.0| 3.6| 1.4| 0.2|setosa |
| 5.4| 3.9| 1.7| 0.4|setosa |
An image (automatically centered when it is appropriate):
![Happy Elmo](https://slides.yihui.org/gif/happy-elmo.gif)
Looks good?

View file

@ -0,0 +1,4 @@
<script defer src="//yihui.org/js/math-code.js"></script>
<script defer src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<script defer src="//yihui.org/js/center-img.js"></script>

View file

@ -0,0 +1,16 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: knitr
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -0,0 +1,5 @@
{{ partial "header.html" . }}
404 NOT FOUND
{{ partial "footer.html" . }}

View file

@ -0,0 +1,21 @@
<!-- <head>
{{ if .IsTranslated }}
{{ range .Translations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
{{ end }}
{{ end }}
</head> -->
{{ partial "header.html" . }}
<!-- {{ if .IsTranslated }}
<nav class="LangNav">
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{ end}}
</nav>
{{ end }} -->
{{ .Content }}
{{ partial "footer.html" . }}

View file

@ -0,0 +1,20 @@
{{ partial "header.html" . }}
{{if not .IsHome }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}
{{ .Content }}
<ul>
{{ $pages := .Pages }}
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
{{ range (where $pages "Section" "!=" "") }}
<li>
<span class="date">{{ .Date.Format "02.01.06" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View file

@ -0,0 +1,12 @@
{{ partial "header.html" . }}
<div class="article-meta">
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "02.01.06" }}</h2>{{ end }}
</div>
<main>
{{ .Content }}
</main>
{{ partial "footer.html" . }}

View file

@ -0,0 +1,13 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<ul class="terms">
{{ range .Data.Terms }}
<li>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> ({{ .Count }})
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View file

@ -0,0 +1,2 @@
<hr>
<p>{{ i18n "footer" | safeHTML }}</p>

View file

@ -0,0 +1,9 @@
<footer>
{{ partial "foot_custom.html" . }}
{{ with .Site.Params.footer }}
<hr/>
{{ replace . "{Year}" now.Year | markdownify}}
{{ end }}
</footer>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if not .IsHome }}
<title>{{ .Title }} | {{ .Site.Title }}</title>
{{ end }}
<title>{{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}" />
<link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}" />
{{ partial "head_custom.html" . }}
</head>
<body>
<nav>
<ul class="menu">
{{ range .Site.Menus.main }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
<hr/>
</nav>

View file

@ -0,0 +1,7 @@
body {
font-family: Optima, Candara, Calibri, Arial, sans-serif;
}
code {
font-family: "Lucida Console", Monaco, monospace;
font-size: 85%;
}

View file

@ -0,0 +1,51 @@
body {
max-width: 800px;
margin: auto;
padding: 1em;
line-height: 1.5;
}
/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block; }
.article-meta, .menu a {
text-decoration: none;
background: #eee;
padding: 5px;
border-radius: 5px;
}
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
border-style: dashed;
color: #ddd;
}
/* code */
pre {
border: 1px solid #ddd;
box-shadow: 5px 5px 5px #eee;
padding: 1em;
overflow-x: auto;
}
code { background: #f9f9f9; }
pre code { background: none; }
/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
background: #f9f9f9;
border-left: 5px solid #ccc;
padding: 3px 1em 3px;
}
table {
margin: 0;
border-top: 1px solid #666;
border-bottom: 1px solid #666;
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }

View file

@ -0,0 +1,12 @@
name = "XMin"
license = "MIT"
licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md"
description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS"
homepage = "https://xmin.yihui.org"
tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"]
features = ["blog"]
min_version = "0.18"
[author]
name = "Yihui Xie"
homepage = "https://yihui.org"