henry hugo
Release 2 2022.08.14

เฮนรี่เป็นธีม Hugo ที่มีประสบการณ์การอ่านที่งดงาม หากต้องการข้อมูลเพิ่มเติมเกี่ยวกับคุณสมบัติทั้งหมดลองดูโพสต์บล็อกนี้

นี่คือคำแนะนำสำหรับการตั้งค่าบล็อก Hugo ด้วยธีม Henry
# 1. Install Hugo
# https://gohugo.io/getting-started/installing/
brew install hugo
hugo new site blog-henry
cd blog-henry
# 2. clone Henry
git clone https://github.com/kaushikgopal/henry-hugo.git themes/henry
touch assets/css/{output,override,override-fonts}.css
# brew install node # if you don't have npm installed
cp themes/henry/tailwind.config.henry.js ./tailwind.config.js
npm install -D tailwindcss
npx tailwindcss -i themes/henry/assets/css/input.css -o ./assets/css/output.css
# 3. configure blog
# # add these lines to your hugo.toml config file
theme = " henry "
# 4. run Hugo!
# Option: use a single dev script
# See my blog post on this https://kau.sh/blog/tailwind-hugo#bonus-tip
./bin/dev
# open http://0.0.0.0:1313/
# sample posts are in henry's content folder : themes/henry/content
# if you want to see some samples, just mark them from draft true → falseคุณสบายดี บล็อกมีความสุข!
ตอนนี้เมื่อใดก็ตามที่คุณต้องการให้บล็อก Hugo ของคุณทำงานอีกครั้งเพียงแค่เรียกใช้ ./bin/dev dev
นี่คือการปรับแต่งที่แนะนำบางอย่างที่จะทำในไฟล์กำหนดค่า hugo.toml ของคุณนอกเหนือจากสิ่งที่กล่าวถึงข้างต้น
# # hugo.toml
# enable .json RSS feeds
[ outputFormats ]
# output formats
# https://gohugo.io/templates/output-formats/#output-format-definitions
[ outputFormats . rss ]
mediatype = " application/rss "
# change RSS path for default XML feed to /feed.xml (default index.xml)
baseName = " feed "
[ outputFormats . json ]
# change RSS path for JSON feed to /feed.json
baseName = " feed "
# configure RSS feeds for specific pages
[ outputs ]
# output format for pages
# https://gohugo.io/templates/output-formats/#output-formats-for-pages
page = [ " html " ]
home = [ " html " , " rss " , " json " ]
# sections = directories e.g. blog, letters, ppt
section = [ " html " , " rss " , " json " ]
# taxonomies = virtual tags/directories e.g. categories, tags (built-in)
# no rss for these as they're mostly "list" pages
taxonomy = [ " html " ]
# terms = values of taxonomies e.g. categories/programming
term = [ " html " , " rss " , " json " ] # # hugo.toml
[ related ]
includeNewer = true
threshold = 80
toLower = true
# weight index distribution tags > categories > title
[[ related . indices ]]
name = " tags "
weight = 80
[[ related . indices ]]
name = " categories "
weight = 20
[[ related . indices ]]
name = " title "
weight = 10นี่คือสองบล็อกที่ใช้ Henry:
ชุดรูปแบบมีให้เป็นโอเพ่นซอร์สภายใต้ข้อกำหนดของใบอนุญาต MIT
รายงานข้อผิดพลาดและคำขอดึงยินดีต้อนรับบน GitHub โครงการนี้มีจุดประสงค์เพื่อเป็นพื้นที่ที่ปลอดภัยและเป็นมิตรสำหรับการทำงานร่วมกันและผู้สนับสนุนคาดว่าจะปฏิบัติตามจรรยาบรรณของผู้สนับสนุน