Compare commits

...

9 Commits

Author SHA1 Message Date
b2448de276 removed asciidoc support 2023-08-17 22:50:29 +02:00
23dd549367 removed 2023-08-17 21:54:33 +02:00
e29c65ee2d updated README 2023-08-17 21:54:03 +02:00
7e8d3e5086 changed name of flake project 2023-08-17 21:50:16 +02:00
957bf5ace7 changed menu 2023-08-17 21:46:58 +02:00
f1404c7061 moved to data 2023-08-17 21:46:43 +02:00
7aec8a83e7 added asciidoc support 2023-08-17 21:43:24 +02:00
a432bbfcf4 changed to publish 2023-08-17 20:07:30 +02:00
680fa49134 test 2023-08-17 19:58:37 +02:00
6 changed files with 65 additions and 111 deletions

View File

@ -1,24 +1,12 @@
# Deploying to nginx webserver
# Kristian's Reproducible Website
Adapted from [AveryanAlex's blog](https://averyan.ru/en/p/nix-flakes-hugo)
This project is my personal website, using Hugo with asciidoc as a static site generator.
The site is hosted on GitLab pages, using the supplied `.gitlab-ci.yaml` file, which just builds the `flake.nix` file.
```nix
{
inputs.blog.url = "git+https://git.krsnik.at/Kristian/blog"
}
```
## Development
Setup nginx virtualHost to serve your site:
To preview changes serve the website with `hugo serve` and set `draft: false` in your blogpost.
```nix
{ inputs, pkgs, ... }:
{
services.nginx.virtualHosts."blog.krsnik.at" = {
root = inputs.packages.default.${pkgs.hostPlatform.system};
ssl = {
enableACME = true;
forceSSL = true;
};
};
}
```
## Deployment
Just push the changes to GitLab and the automatic CI/CD will build and deploy the website.

View File

@ -1,9 +1,20 @@
baseURL = 'https://krezzlu.gitlab.io/blog'
baseURL = 'https://blog.krsnik.at'
languageCode = 'en-us'
title = "Kristian's Blog"
theme = 'nostyleplease'
[params]
[params.theme_config]
appearance = "auto"
back_home_text = "$HOME"
date_format = "2006-01-02"
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
[markup]
[markup.goldmark]
[markup.goldmark.parser]
@ -28,9 +39,3 @@ theme = 'nostyleplease'
startLevel = 2
endLevel = 3
ordered = false
[params]
[params.theme_config]
appearance = "auto"
back_home_text = "$HOME"
date_format = "2006-01-02"

View File

@ -1,7 +0,0 @@
---
title: "My First Post"
date: 2023-08-17T15:49:41+02:00
draft: true
---
## This is a test

21
data/menu.toml Normal file
View File

@ -0,0 +1,21 @@
[[entries]]
title = "me"
[[entries.entries]]
title = "email: <a href='mailto:contact@krsnik.at'>contact@krsnik.at</a>"
[[entries]]
title = "rss"
url = "index.xml"
[[entries]]
title = "posts"
[entries.post_list]
limit = 0
show_more = true
show_more_text = "See archive..."
show_more_url = "posts"
[[entries]]
title = "theme used: <a href='https://github.com/Masellum/hugo-theme-nostyleplease'>no style, please!</a>"

View File

@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "Kristian's Website";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";

View File

@ -1,53 +0,0 @@
[[entries]]
title = "info"
[[entries.entries]]
title = "Does this work <a href='https://github.com/riggraz/no-style-please'>riggraz/no-style-please</a>."
[[entries.entries]]
title = "github repo"
url = "https://github.com/riggraz/no-style-please"
[[entries.entries]]
title = "used by <a href='https://riggraz.dev'>riggraz.dev</a> and <a href='https://github.com/riggraz/no-style-please/network/dependents'>many others</a>"
[[entries]]
title = "all posts"
[entries.post_list]
limit = 5
show_more = true
show_more_text = "See archive..."
show_more_url = "posts"
[[entries]]
title = "posts by category"
[entries.post_list]
section = "posts"
show_more = true
show_more_text = "See more posts..."
show_more_url = "posts"
[[entries]]
title = "rss"
url = "index.xml"
[[entries]]
title = "another list"
[[entries.entries]]
title = "with subitems"
[[entries.entries.entries]]
title = "with subsubitems"
[[entries.entries.entries]]
title = "example page"
url = "about"
[[entries]]
title = "PRO TIP"
entries = [
{ title = "to edit this menu, edit data/menu.toml file" }
]