Hugo Tips & Tricks
←Hugo
Чтобы локальный веб-сервер Apache корректно отдавал 404 страницу Hugo, нужно указать ему на её стандартное имя:
sudo vim /etc/apache2/sites-enabled/000-default.conf
и добавить строку:
ErrorDocument 404 /404.html
Инструкция: How To Configure Apache to Use Custom Error Pages on Ubuntu 14.04
Hugo может тормозить, если в сайте используется большое количество статичных файлов (из папки static) — просто потому, что процесс копирования большого количества файлов занимает время. Пример обсуждения проблемы.
Решение: держать файлы отдельно — например, создать субдомен cdn.example.com и подключать статичные файлы оттуда: <img src="http://cdn.example.com/images/pic.jpg">
Hugo plays with menus:
- Готовое решение для JSON breadcrumbs: zdenekpribyla/hugo-breadcrumblist-structured-data
См. в конце:
Custom headers should be written to the file \data\titles.yaml. They should look like this:
lib: "Библиотека" book: "Книга" book1: "Книга 1"
If you have the folders structure lib/book/article/, it will look like: Библиотека > Книга.
- Flipping Go Date Format
- Creating a minimal working template
- Hugo Skeleton Site
- Automatically build, deploy, and host Hugo sites in Bitbucket
- Tips and tricks for building a theme in Hugo
- Load multiple content files in a single template
- Best practices for i18n
- Hugo + Nginx Config
- Howto: Delimiter separated tags
- How To Pre-Compress Files Generated By Hugo And Serve Them With Nginx
- How To Have Comments In Hugo Without An External Service · Saimiri.io