Установка темы ink-free
Что бы не забыть мало ли придется по новой или на другом сервере длать такие же манипуляции.
Как установить тему ink-free пошаговая инструкция:
cd ~/hugo
```bash
hugo new site sudakov.spb.ru
cd sudakov.spb.ru
git init
git submodule add https://github.com/chollinger93/ink-free themes/ink-free
Чтобы месяцы были по русски nano ~/hugo/sudakov.spb.ru/data/month.yaml
, потом настроил так чтобы не надо было делать такой файл, переделав тему на поддержку русского языка ну или какой установлен в локале:
1: "Янв"
2: "Фев"
3: "Мар"
4: "Апр"
5: "Май"
6: "Июн"
7: "Июл"
8: "Авг"
9: "Сен"
10: "Окт"
11: "Ноя"
12: "Дек"
Ctrl+O Enter сохранить Ctrl+X выйти
Тут в общих чертах написал, что сделал для локализации под русский язык Кастомизация темы Ink-Free
Скопировать файл конфигурации темы и отредактировать под свои пожелания cp ~/hugo/sudakov.spb.ru/themes/ink-free/exampleSite/config.toml .
nano ~/hugo/sudakov.spb.ru/config.toml
. Мой образец настроек:
baseURL = "https://sudakov.spb.ru"
languageCode = "ru-ru"
title = "sudakov.spb.ru"
theme = "ink-free"
[pagination]
pagerSize = 5
copyright = "© Copyright notice"
# Demo only
#ignoreErrors = ["error-missing-instagram-accesstoken"]
[permalinks]
posts = "/:year/:month/:title"
[params]
subtitle = "Персональный блог"
# Optional 64x64 avatar image.
#avatar = "https://image.freepik.com/free-vector/young-man-head-with-beard-avatar-character_24877-36786.jpg"
featherIconsCDN = false
mermaidCDN = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs"
# Site color - dark/light/auto
mode = "auto"
# Enable a table of contents:
# Either "static"/true, "floating", "both", or "none" (default: static)
# The floating TOC dissapears on mobile and adds 200px vertical space
toc = "floating"
# Whether to truncate everything but H1/H2 headings if the last element in a TOC isn't visible. Enabled by default
enableTocTrunate = true
# Max tags
maxTags = 7
# Define words per minute to approximate reading time
wpm = 75
# Stupid footers :)
footers = [
"What Tiger King can teach us about x86 Assembly",
"10 Reasons why gcc SHOULD be re-written in JavaScript - You won't believe #8!"
]
# Github base url
github = "https://github.com/chollinger93/ink-free"
# For statistics, we can compare the total word count against a book of your choice
statisticsEnabled = true
referenceBookWords = 11500.0
referenceBook = "The Metamorphosis"
referenceAuthor = "Franz Kafka"
# Nav.
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "All posts"
url = "/posts"
weight = 2
[[menu.main]]
name = "About"
url = "/about"
weight = 3
[[menu.main]]
name = "Tags & Stats"
url = "/tags"
weight = 4
[[params.social]]
name = "Mastodon"
icon = "fa-mastodon"
url = "https://i.wildserver.ru"
#[[params.social]]
#name = "Github"
#icon = "github"
#url = "https://github.com/chollinger93/"
#[[params.social]]
#name = "Twitter"
#icon = "twitter"
#url = "https://twitter.com/chollinger93/"
[[params.social]]
name = "RSS"
icon = "rss"
url = "/index.xml"
[taxonomies]
tag = "tags"
[markup]
[markup.highlight]
codeFences = true
guessSyntax = false
hl_Lines = ""
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
style = "dracula"
tabWidth = 4
[markup.tableOfContents]
endLevel = 3
ordered = false
startLevel = 2
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
Удалить rm hugo.toml
Отредактировать файл nano ~/hugo/sudakov.spb.ru/archetypes/default.md
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
Ctrl+O Enter сохранить Ctrl+X выйти
Создать первый пост hugo new content ~/hugo/sudakov.spb.ru/content/posts/ustanovka-temy-ink.md
nano ~/hugo/sudakov.spb.ru/content/posts/ustanovka-temy-ink.md