Configured the theme

This commit is contained in:
Nicola Belluti 2024-04-15 13:50:42 +02:00
parent 817595b075
commit c27fea312f
12 changed files with 198 additions and 2 deletions

View File

@ -2,3 +2,31 @@
> My personal blog, powered by [Hugo](https://gohugo.io/) and the
> [Blowfish](https://blowfish.page/) theme
## Building
[Install Nix](https://nixos.org/), then run:
```shell
git clone --recursive https://git.nicolabelluti.me/nicolabelluti/blog.git
cd blog
nix develop # Enter the dev environment
hugo --minify --gc
```
You can find the source code of the website in the `public/` directory
If you want to start the dev server, you need to run:
```shell
hugo server --buildDrafts --buildFuture
```
## Create a new article
To create a new article using the default structure
(`posts/<year>/<month>/<article_name>`), use this command:
```shell
hugo new content/posts/$(date +%Y/%m)/<Article name>/index.md
```

View File

@ -1,5 +1,14 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
title = "{{ replace .File.ContentBaseName "-" " " | title }}"
summary = ""
date = "{{ dateFormat "2006-01-02" .Date }}"
tags = [""]
categories = [""]
# series = [""]
# series_order = 1
draft = true
+++
> Hello, world!

BIN
assets/img/avatar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
assets/img/home-bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -2,3 +2,10 @@ baseURL = "https://nicolabelluti.me/"
# https://github.com/nunocoracao/blowfish
theme = "blowfish"
[outputs]
home = [
"HTML", # Enable the website
"RSS", # Enable the RSS feed
"JSON", # Enable the search
]

View File

@ -1 +1,28 @@
title = "Nicola's Blog"
languageName = "English"
[params]
displayName = "EN"
isoCode = "en"
copyright = """ \
Made by **Nicola Belluti** with | \
[*GNU AGPLv3.0 license*](https://git.nicolabelluti.me/nicolabelluti/blog/src/branch/main/LICENSE) \
"""
[author]
name = "Nicola Belluti"
image = "/img/avatar.jpg"
headline = "Coding while listening to good music 🧑🏻‍💻"
bio = """ \
An IT guy in love with the open source world. \
[***About me...***](/about-me) \
"""
links = [
{ code = "https://git.nicolabelluti.me/nicolabelluti" },
{ email = "mailto:nicolabelluti@protonmail.com" },
{ telegram = "https://t.me/nicolabelluti" },
{ mug-hot = "https://buymeacoffee.com/nicolabelluti" },
{ rss = "/index.xml" },
]

View File

@ -0,0 +1,5 @@
[goldmark.renderer]
unsafe = true
[highlight]
noClasses = false

View File

@ -0,0 +1,32 @@
[[main]]
name = "Blog"
weight = 10
[[main]]
name = "Posts"
pageRef = "/posts"
weight = 11
parent = "Blog"
[[main]]
name = "Categories"
pageRef = "/categories"
weight = 12
parent = "Blog"
[[main]]
name = "Series"
pageRef = "/series"
weight = 13
parent = "Blog"
[[main]]
name = "About me"
pageRef = "/about-me"
weight = 20
[[main]]
identifier = "rss"
pre = "rss"
url = "/index.xml"
weight = 30

View File

@ -0,0 +1,69 @@
# Default article background image
# Credits: https://unsplash.com/photos/macbook-pro-JO_S6ewBqAk
defaultBackgroundImage = "/img/home-bg.jpg"
# Theme
colorScheme = "blowfish"
defaultAppearance = "dark"
autoSwitchAppearance = "false"
enableSearch = true
# Article settings
enableCodeCopy = true
smartTOC = true
smartTOCHideUnfocusedChildren = true
[header]
layout = "fixed"
[homepage]
# Show the background
# Credits: https://unsplash.com/photos/macbook-pro-JO_S6ewBqAk
layout = "background"
layoutBackgroundBlur = true
homepageImage = "/img/home-bg.jpg"
# Show recent posts
showRecent = true
cardView = true
showRecentItems = 9
showMoreLink = true
showMoreLinkDest = "/posts"
[article]
# Show the author
showAuthor = true
showAuthorBottom = true
# Show the background
showHero = true
heroStyle = "background"
layoutBackgroundBlur = true
layoutBackgroundHeaderSpace = true
# Show the button to see the source code
showEdit = true
editURL = "https://git.nicolabelluti.me/nicolabelluti/blog/src/branch/main/content"
# Show the sharing links
sharingLinks = [
"linkedin",
"twitter",
"reddit",
"whatsapp",
"telegram",
"pinterest",
"facebook",
"email",
]
# Misc
showHeadingAnchors = true
showPagination = true
showReadingTime = true
showTableOfContents = true
showTaxonomies = true
showZenMode = true
[list]
cardView = true

View File

@ -0,0 +1,3 @@
category = "categories"
series = "series"
tag = "tags"

0
content/_index.md Normal file
View File

16
content/about-me/index.md Normal file
View File

@ -0,0 +1,16 @@
+++
title = "A little bit about me..."
layoutBackgroundHeaderSpace = false
sharingLinks = false
showAuthor = false
showDate = false
showEdit = false
showPagination = false
showReadingTime = false
showTableOfContents = false
showTaxonomies = false
showWordCount = false
showZenMode = false
+++