Compare commits
9 Commits
a542bde5e1
...
b2448de276
Author | SHA1 | Date | |
---|---|---|---|
b2448de276 | |||
23dd549367 | |||
e29c65ee2d | |||
7e8d3e5086 | |||
957bf5ace7 | |||
f1404c7061 | |||
7aec8a83e7 | |||
a432bbfcf4 | |||
680fa49134 |
28
README.md
28
README.md
@ -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.
|
||||
|
65
config.toml
65
config.toml
@ -1,36 +1,41 @@
|
||||
baseURL = 'https://krezzlu.gitlab.io/blog'
|
||||
baseURL = 'https://blog.krsnik.at'
|
||||
languageCode = 'en-us'
|
||||
title = "Kristian's Blog"
|
||||
|
||||
theme = 'nostyleplease'
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.parser]
|
||||
[markup.goldmark.parser.attribute]
|
||||
block = true
|
||||
title = true
|
||||
[markup.highlight]
|
||||
anchorLineNos = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
hl_Lines = ''
|
||||
hl_inline = false
|
||||
lineAnchors = ''
|
||||
lineNoStart = 1
|
||||
lineNos = true
|
||||
lineNumbersInTable = true
|
||||
noClasses = true
|
||||
noHl = false
|
||||
style = 'rtt'
|
||||
tabWidth = 4
|
||||
[markup.tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 3
|
||||
ordered = false
|
||||
|
||||
[params]
|
||||
[params.theme_config]
|
||||
appearance = "auto"
|
||||
back_home_text = "$HOME"
|
||||
date_format = "2006-01-02"
|
||||
|
||||
[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]
|
||||
[markup.goldmark.parser.attribute]
|
||||
block = true
|
||||
title = true
|
||||
[markup.highlight]
|
||||
anchorLineNos = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
hl_Lines = ''
|
||||
hl_inline = false
|
||||
lineAnchors = ''
|
||||
lineNoStart = 1
|
||||
lineNos = true
|
||||
lineNumbersInTable = true
|
||||
noClasses = true
|
||||
noHl = false
|
||||
style = 'rtt'
|
||||
tabWidth = 4
|
||||
[markup.tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 3
|
||||
ordered = false
|
||||
|
@ -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
21
data/menu.toml
Normal 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>"
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
description = "Kristian's Website";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
|
53
menu.toml
53
menu.toml
@ -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" }
|
||||
]
|
Loading…
Reference in New Issue
Block a user