Hugo 主题
黑胶唱片收藏主题
一个旨在向世界展示您的黑胶唱片收藏的 Hugo 主题。
如果此主题是为黑胶唱片收藏而设计的,它也适用于任何其他经过一些自定义的音乐库。
在线演示
https://vinyl.zedas.fr
快速开始
创建您的新 Hugo 站点。
hugo new site my-vinyl-records-collection
将此主题添加到您的项目中
## Clone directly
git clone https://github.com/Wivik/vinyl-records-collection-theme themes/vinyl-records-collection-theme
## Or use as a sub module
git submodule add https://github.com/Wivik/vinyl-records-collection-theme themes/vinyl-records-collection-theme
此主题使用特定的原型,因此请删除或重命名默认原型。
rm <your hugo site folder>/archetypes/default.md
更新配置文件
baseurl: <your site URL>
languageCode: 'en-us'
title: 'My Vinyl Records Collection'
author: <Your Name>
theme: vinyl-records-collection-theme
taxonomies:
artist: artist
genres: genres
label: label
year: year
format: format
或者如果您使用 Toml 格式
baseurl = '<your site URL>'
languageCode = 'en-us'
title = 'My Vinyl Records Collection'
author = '<Your Name>'
theme = 'vinyl-records-collection-theme'
[taxonomies]
artist = 'artist'
genres = 'genres'
label = 'label'
year = 'year'
format = 'format'
创建您的第一张唱片
使用 Hugo 创建一个新的内容文件
hugo new an-album-name.md
打开新创建的文件,原型将基本告诉您需要做什么才能完成工作。
示例
---
# Mandatory parts :
title: "Disc7"
date: 2023-08-19T23:31:17+02:00
draft: true
# Optional parts that you still should fill in order to sort your collection
## Label : name of the label that published the record
label: Record's Label
## The band's name
band: Record's Band
## The genres this record is classified into
genres:
- To sort
## Cover image : will be displayed in the album list and top page.
## Display a default one unless you change this value.
cover:
# More optional details you can use for your collection.
## A quick description of your record. Markdown is supported
# description: |
# This is a great album.
## Disc format : 45rpm, 33rpm, 78rpm or size if you prefer.
# format: 33rpm
## Any supplementary pictures you want to display.
## These pictures should be in the site asset folder :
## <your hugo site>/assets
## If you put them into a sub-folder, don't forget it in the path !
# pictures:
# - this-album/pict.jpg
## The publish year
# year: 1990
## Below the metadata block, you can write some content such as a review or anything else you want. It'll be displayed in the album page.
---
文档
对支持内容最全面的文档直接编写在原型中。
自定义主题
自定义颜色
CSS 文件主要是可变的,可以使用 custom.css
文件进行覆盖,该文件将在默认样式之后加载。
├── assets
│ └── css
│ └── custom.css # 2. customize the color there
└── themes
└── vinyl-records-collection-theme
├── assets
│ ├── css
│ │ ├── custom.css ## 1. copy this file to the site assets folder, in a 'css' sub-folder
│ │ └── style.css
自定义图像
您可以通过在站点的 assets
文件夹中添加自己的图像来更改页眉和页脚的背景图像,以及默认的唱片图像。
├── assets
│ └── img
│ └── back-header.jpg # will have the priority over the one in the template
└── themes
└── vinyl-records-collection-theme
├── assets
│ └── img
│ ├── back-footer.jpg
│ ├── back-header.jpg
│ └── default.png
主题期望页眉和页脚为 jpg
格式,而默认的唱片图像则期望为 png
格式。
许可证
黑胶唱片收藏主题是在 MIT 许可下获得许可的。
sample/
文件夹中的图片来自 https://www.publicdomainpictures.net
维护和贡献
此主题由原作者 Seb 维护。
如果您希望贡献,请 fork 此存储库并打开一个 pull-request。 欢迎任何贡献!
支持
如果您喜欢这个项目并且它对您有用,请考虑支持其开发。 这个主题是由一位咖啡爱好者制作的,所以你可以直接