Базовая инструкция по установке находится здесь

Инструменты для создания сайта

Будет рассмотрена установка для Linux Debian.

Git

система управления версиями

sudo apt install git-all -y

Чуть более развернуто написано тут

Hugo

фреймворк для создания веб-сайтов

sudo apt install hugo

Чуть более развернуто написано тут

Node.js & npm (Node Package Manager)

среда выполнения JavaScript для серверного программирования.

sudo apt install nodejs npm -y

Go

Язык программирования с открытым исходным кодом.

Скачать свежую версию с сайта. Распаковать архив. Удалить старую версию - удалив каталог /usr/local/go и скопировав разархивированный каталог go в папку /usr/local, удобным способом, естественно с правами root.

Тема HBS

Установка по старинке https://hbs.razonyang.com/v1/en/docs/getting-started/installation/git-submodule/

git clone https://github.com/razonyang/hugo-theme-bootstrap-skeleton wildserver.ru
cd wildserver.ru
git submodule add https://github.com/razonyang/hugo-theme-bootstrap themes/hugo-theme-bootstrap
sed -i "s/theme:.*/theme: hugo-theme-bootstrap/g" config/_default/config.yaml
rm go.mod go.sum
hugo mod npm pack
npm install
hugo server

Конфигурация сайта

Оригинал файла

Подправить файл конфигурации config/_default/config.yaml:

baseURL: https://wildserver.ru
title: Все что нужно для создания серверов для домашнего использования
theme: hugo-theme-bootstrap
copyright: Copyright © {year} WILDSERVER.RU. Все права защищены.
defaultContentLanguage: ru
# hasCJKLanguage: true # Uncomment it if your content contains Chinese/Japanese/Korean Languages.
# defaultContentLanguageInSubdir: true
disableLanguages:
  - en
#  - fr
#  - zh-cn
#  - zh-tw
paginate: 10
# paginatePath: page
enableRobotsTXT: true
enableEmoji: true
pygmentsUseClasses: true
# googleAnalytics: UA-123-45
# disqusShortname: yourdiscussshortname

blackfriday:
  hrefTargetBlank: true

taxonomies:
  category: category
  series: series
  tag: tags
  authors: authors

build:
  writeStats: true

permalinks:
  news: /news/:year/:month/:title/
  blog: /blog/:title/

# module:
  # proxy: https://goproxy.cn

baseURL:

Заменить на свой домен, где будет сайт.

В файле config/production/config.yaml то же заменить на свой адрес домена.

Так же заменить в файлe .github/workflows/gh-pages.yml в строке run: hugo --minify --gc --enableGitInfo -b https://projects.razonyang.com/hugo-theme-bootstrap-skeleton/ на свой адрес домена.

run: hugo --minify --gc --enableGitInfo -b https://wildserver.ru

title:

Название сайта

theme:

Указать имя темы, которая располагается в папке themes

Авторские права, заполнить своими данными.

defaultContentLanguage:

Язык сайта по умолчанию

disableLanguages:

Отключить языки, перечисленные ниже. Английский отключить, что бы не было его в списке переключения языков на сайте. И исчезли все хвосты, которые появляются на английском, не знаю даже почему они всплывают. Кеш браузера чистил, лишним не будет.

paginate:

Сколько превью постов располагается на одной странице.

taxonomies:

Список разделов располагающийся в боковой панели.

Адрес поста после сборки сайта.

news: /news/:year/:month/:title/ т.е. адрес страницы будет выглядеть так https://wildserver.ru/news/2022/07/more-image-processing-methods/

blog: /blog/:title/ - https://wildserver.ru/blog/установка-темы-hbs/

Настройка сайта под русский язык

Редактирование шаблона сайта только для поддержки русского языка.

Удалить все файлы не относящиеся к языку по умолчанию.

find . -type f -name "*.zh-hans.*" -delete
find . -type f -name "*.zh-hant.*" -delete
find . -type f -name "*.en.*" -delete

Установка основного языка

Оригинал файла

Отредактировать файл config/_default/languages.yaml

ru:
  languageName: Russia
  weight: 1

Перевод на русский

Файлы, которые нужно отредактировать и дополнить, что бы все было русифицировано:

Начнем с основного - themes/hugo-theme-bootstrap/i18n/ru.toml. Для того чтобы изменения сохранились при обновлении темы, нужно создать точно такой же файл в каталоге сайта (локально естественно) при сборке учитываются пользовательские файлы.

Создать каталог i18n удобным способом, я лично для редактирования и написания постов использую Virtual Studio Code. Скопировать туда файл themes/hugo-theme-bootstrap/i18n/ru.toml

mkdir i18n
cp themes/hugo-theme-bootstrap/i18n/ru.toml i18n/ru.toml

Сделал по другому: взял за основу themes/hugo-theme-bootstrap/i18n/en.toml и перевел на русский наиболее близко по значению и пониманию носителя языка 😀

Результат попробую передать автору через коммит, с которыми пока разбираюсь, как работает Git.

Обо мне

Открыть: content/about/index.md поменять на:

---
title: Обо мне
description: Скромное описание меня
reward: false
postDate: false
readingTime: false
---

Привет. Вы находитесь на моем официальном сайте.

Архив

Открыть: content/archives/_index.md поменять на:

---
title: Архив
menu:
  main:
    parent: Блог
    weight: 1
    params:
      icon: <i class="fas fa-fw fa-file-archive text-primary"></i>
---

Блог

Открыть: content/blog/_index.md поменять на:

---
title: Блог
menu:
  main:
    identifier: Блог
    params:
      icon: '<i class="fas fa-fw fa-blog"></i>'
      description: Меню блога
---

Категории

Открыть: content/category/_index.md поменять на:

---
title: Категории
menu:
  main:
    parent: Блог
    weight: 3
    params:
      icon: <i class="fas fa-fw fa-folder text-success"></i>
      description: Список категорий
---

Написать мне

Открыть: content/contact/index.md поменять на:

---
title: Написать мне
layout: contact
---

Документы

Открыть: content/docs/_index.md поменять на:

---
title: Документы
menu:
  main:
    weight: 1
    params:
      icon: '<i class="fas fa-fw fa-file"></i>'
---

Примеры документации и инструкций

Новости

Открыть: content/news/_index.md поменять на:

---
title: Новости
menu:
  main:
    weight: 2
    params:
      icon: '<i class="fas fa-fw fa-newspaper"></i>'
---

Вне сети

Открыть: content/offline/index.md поменять на:

---
title: Вне сети
layout: offline
---

Поиск

Открыть: content/search/_index.md поменять на:

---
title: Поиск
---

Серии

Открыть: content/series/_index.md поменять на:

---
title: Серии
menu:
  main:
    parent: Блог
    weight: 2
    params:
      icon: <i class="fas fa-fw fa-columns"></i>
      description: Список серий
---

Теги

Открыть: content/tags/_index.md поменять на:

---
title: Теги
menu:
  main:
    parent: Блог
    weight: 4
    params:
      icon: <i class="fas fa-fw fa-tags"></i>
      description: Список тегов
---

Владелец сайта

Изменить отображение владельца сайта в боковой панели.

Открыть: config/_default/author.yaml поменять на:

name: Мишаня
avatar: # Avatar image. Default to "images/profile.webp".
bio: 'Бахнбаум машинен'
company: <a href="https://wildserver.ru" target="_blank" rel="noopener noreferrer">WildServer</a> # HTML markup are supported, such as: <a href="https://example.com" target="_blank" rel="noopener noreferrer">Company</a>.
location: <a href="https://www.openstreetmap.org/relation/421007#map=10/59.9179/30.3053" target="_blank" rel="noopener noreferrer">Ленинград</a> # HTML markup are supported, such as: <a href='https://www.openstreetmap.org/search?query=Earth'>Earth</a>.
# about: https://razonyang.com # The external about page. The internal about page will be used if not set.
params: {
   layout: compact
}
# See https://hbs.razonyang.com/v1/en/docs/widgets/social-links/.
social:
  email: admin@wildserver.ru
  # github: razonyang/hugo-theme-bootstrap
  # twitter: razonyang
  # patreon: razonyang
  # paypal: razonyang
  rss: "" # Remove RSS

Логотип

Поменять изображение логотипа и профиля.

Заменить файлы в каталоге - static/images

Параметры сайта

Открыть: config/_default/params.yaml поменять на:

# Статьи из разделов отображаемые на главной странице
mainSections:
  - blog
  - posts
  - news
  - category

# titleSeparator: '|' # Title separator. Default to -.

description: Любое несанкционированное вторжение на сервер будет караться по беспределу.
#keywords: Hugo, Bootstrap, Blog Theme
# images:
#   - site-feature-image.jpg

# metaRobots: noindex, nofollow # Default value for Meta Tag robots
# metaRobots:  # disable Meta Tag robots

logo: images/logo.png # Logo image. Default to images/logo.webp.
# logo: false # Disable Logo
brand: WILDSERVER.RU

palette: blue # Default palette. Optional. You'll need to clear the browser cache after modifying this.
# Available palettes. Default to ALL. Empty array means disable.
# palettes:
#  - blue
#  - blue-gray
#  - brown
#  - cyan
#  - green
#  - indigo
#  - orange
#  - pink
#  - purple
#  - red
#  - teal
#  - yellow

color: dark # light, dark or auto. Default to auto.

# fullWidth: true # Full width.
# fixedHeader: false # Turn on/off fixed header.

dateFormat: ":date_long"

# Google Adsense
googleAdsense: 

# math: true # Enable math globally.
# toc: false # Disable TOC globally.
# tocPosition: content
# breadcrumb: false # Disable breadcrumb
# breadcrumbDivider: > # Breadcrumb divider
# diagram: true
# socialShare: false # disable social network sharing
# searchBar: false # disable search-bar

# poweredBy: false # Whether to show powered by.

# readingTime: false # Whether to display the reading time.
# postDate: false # Whether to display the post date in the post meta section.

# featuredPostCount: 10 # The number of featured posts shown in sidebar. Turn off by setting it to false.
# recentPostCount: 10 # The number of recent posts shown in sidebar. Turn off by setting it to false.
# relatedPostCount: 10 # The number of related posts. Turn off by setting it to false.
# categoryCount: 10 # The number of category shown in sidebar. Turn off by setting it to false.
# tagCount: 10 # The number of tags shown in sidebar. Turn off by setting it to false.
# seriesCount: 20 # The number of series shown in sidebar. Turn off by setting it to false.
# taxonomyPaginate: 5 # Default to 10.
taxonomyPostCount: 20 # The number of taxonomy's posts. Turn off by setting it to false.
countTaxonomyPosts: true # Count posts of taxonomy.

# sidebarTaxonomies: [category, tags, series] # The order of taxonomies on the sidebar.

# pinnedPost: false # Turn on/off pinned posts.
pinnedPostCount: 3 # The number of pinned posts.

# Custom CSS and JS
customCSS:
customJS:

tocWordCount: 1 # TOC is displayed only if the post's word count exceeds this value.

titleCase: false # Capitalized title.

viewer: true # Image Viewer

# backgroundImage: ['/images/bg-light.png', '/images/bg-dark.png']
# rss: home # link the RSS button to homepage all the times.

sidebar:
  # fixed: true
  # archives: true # Enable archives widget
  # taxonomiesToggle: false # Disable taxonomy toggle
  # category: true # Enable category widget
  # tags: true # Enable tags widget
  # series: true # Enable series widget
  # authors: true # Enable authors widget
  # postsToggle: false # Disable posts toggle
  # featuredPosts: true # Enable featured posts widget
  # recentPosts: true # Enable featured posts widget
  # collapsed: true # Collapse sidebar widgets by default on small screens.

codeBlock:
  # maxLines: 8
  lineNos: false # true/false represents that show/hide the line numbers by default.

post:
  # excerpt: description
  # excerptMaxLength: 120
  # copyright: false # Whether to display copyright section on each post.
  # plainifyExcerpt: false # Format excerpt in HTML if false.
  featuredImage: true # Show the featured image above the content.
  numberifyHeadings: true # Count headings automatically.
  # numberifyHeadingsEndLevel: 4 # The depth of headings to count. Default to 6.
  numberifyHeadingsSeparator: . # The separator between of number and headings.
  # tocStyleType: decimal # The TOC's CSS list-style-type property.
  # imageTitleAsCaption: true
  # panel: false # Disable the post panel.
  # nav: false # Disable post navigations.
  # The page position after clicking the read more button, read more from content if true. Default to the beginning of page.
  # It supports only of the manual summaries spliting via 
  # readMoreFromContent: true

archive:
  paginate: 20 # Archive pagination. Default to 100.
  # basePath = "/archiv" # The base path of archive pages.
  # dateFormat: 01-02 # Archive date format. Default to Jan 2.

analytics:
  # baidu:  # Baidu Analytics

# Site verification
siteVerification:
  google: 
  bing: 
  baidu: 
  baiduUnion:  # Baidu Union
  so: 
  sogou: 
  shenma: 

creativeCommons:
  # by: true # Credit must be given to you, the creator.
  # nc: true # Only noncommercial use of your work is permitted.
  # nd: true # No derivatives or adaptations of your work are permitted.
  # sa: true # Adaptations must be shared under the same terms.

# utterances:
  # repo: razonyang/hugo-theme-bootstrap-skeleton # Replace with your repository.
  #issueTerm: pathname # pathname, url, title, og:title
  # label: comment
  # By default, light and dark mode correspond to github-light and github-dark, respectively.
  # Optional values: github-light, github-dark, preferred-color-scheme, github-dark-orange, icy-dark, dark-blue, photon-dark.
  #theme:  

#staticman:
  #endpoint: https://yourstaticmaninstance # Required, replace with your own Staticman instance.
  #repo: user/repo # Required
  #service: github # or gitlab. Default to GitHub.
  #branch: main # Default to master.
  #property: comments # Default to comments.
  #sorting: desc # Default to asc.
  #reCaptchaKey: "" # The reCaptcha site key.
  #reCaptchaSecret: "" # The reCaptcha encrypted secret. You'll need to encrypt plain secret via https://yourstaticmaninstance/v3/encrypt/PLAINSECRET.
  #extraFields: # Extra fields. Available fiedls: url.
  #  - url
  #requiredFields: # Extra required fields. Available fields: email and the extra fields.
  #  - email
  #  - url
  #paginate: 5 # Default to 10.
  #moderation: false # Same as Staticman's moderation.

# See https://giscus.app
giscus:
  repo: "wildserver/comments.wildserver.ru" # required.
  repoId: "R_kgDOKlkYsA" # required.
  category: "General" # required.
  categoryId: "DIC_kwDOKlkYsM4CaeMe" # required.
  theme: "dark" # Default to auto.
  mapping: "title" # Default to pathname.
  inputPosition: "bottom" # Default to top.
  # reactions: false # Disable reactions.
  # metadata: true # Emit discussion metadata.
  # lang: "en" # Specify language, default to site language.
  # lazyLoading: false # Default to true.

search:
  paginate: 5 # Pagination. Default to 10.
  # resultContentWordCount: 240 # The maximum word count of result content for displaying.
  # Fuse.js options. See https://fusejs.io/api/options.html.
  fuse:
    # ignoreLocation: true
    # location: 0
    # isCaseSensitive: false
    # minMatchCharLength: 1
    threshold: 0.1
    # distance: 100
    # useExtendedSearch: true

#docsearch:
  # https://docsearch.algolia.com/docs/api
  # container: ".search-bar" # replace it if necessary, default to '.search-bar'.
  # appId: ""
  # apiKey: ""
  # indexName: ""
  # debug: true

reward:
  alipay: images/reward/alipay.png
  wechat: images/reward/wechat.png
  #paypal: images/reward/paypal.png
  #patreon: images/reward/patreon.png
  #liberapay: images/reward/liberapay.png

#share:
  #addThis:  # AddThis pubid.

#actionsPanel:
  # disabled: true

# Comment or remove this settings to disable font size switcher.
fontSize:
  # extraSmall: .8rem
  # small: .9rem
  # large: 1.1rem
  # extraLarge: 1.2rem

pwa:
  manifest:
    # name:  # Default to site title.
    short_name: HBS
    # display: fullscreen # Default to standalone.
    # description:  # Default to site description.
    # theme_color: 
    # background_color: 

    # Icons
    # [[pwa.manifest.icons]]
    #   sizes: 96x96
    #   src: /images/icons/icon-96x96.png
    # [[pwa.manifest.icons]]
    #   sizes: 144x144
    #   src: /images/icons/icon-144x144.png

contact:
  #endpoint: https://getform.io/f/56041c81-9e03-4c24-b9c5-61238854d4cd # Backend endpoint, remove this line if you're using Netlify.
  # file: true # Enable file upload
  # fileField: image # The name of file field.
  # reCaptcha:
    # siteKey: ""

repo:
  url: https://github.com/razonyang/hugo-theme-bootstrap-skeleton
  branch: main
  # subPath: exampleSite
  # dateFormat: 02/01/2006, 15:04:05 PM

topAppBar:
  # See https://hbs.razonyang.com/v1/en/docs/widgets/social-links/.
  social:
#    github: razonyang/hugo-theme-bootstrap
#    patreon: razonyang
#    paypal: razonyang
    email: admin@wildserver.ru
    website: wildserver.ru

#docs:
  # nav:
    # expand: true # Expand docs navigations.

#feeds:
  # content: true