Compare commits

..

No commits in common. "b2448de2763f17173dac9abc7cf45055bdda396f" and "a542bde5e12b1a32fa4522637a86cf9dd80cf034" have entirely different histories.

6 changed files with 111 additions and 65 deletions

View File

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

View File

@ -1,41 +1,36 @@
baseURL = 'https://blog.krsnik.at' baseURL = 'https://krezzlu.gitlab.io/blog'
languageCode = 'en-us' languageCode = 'en-us'
title = "Kristian's Blog" title = "Kristian's Blog"
theme = 'nostyleplease' 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]
[markup.goldmark] [markup.goldmark]
[markup.goldmark.parser] [markup.goldmark.parser]
[markup.goldmark.parser.attribute] [markup.goldmark.parser.attribute]
block = true block = true
title = true title = true
[markup.highlight] [markup.highlight]
anchorLineNos = false anchorLineNos = false
codeFences = true codeFences = true
guessSyntax = true guessSyntax = true
hl_Lines = '' hl_Lines = ''
hl_inline = false hl_inline = false
lineAnchors = '' lineAnchors = ''
lineNoStart = 1 lineNoStart = 1
lineNos = true lineNos = true
lineNumbersInTable = true lineNumbersInTable = true
noClasses = true noClasses = true
noHl = false noHl = false
style = 'rtt' style = 'rtt'
tabWidth = 4 tabWidth = 4
[markup.tableOfContents] [markup.tableOfContents]
startLevel = 2 startLevel = 2
endLevel = 3 endLevel = 3
ordered = false ordered = false
[params]
[params.theme_config]
appearance = "auto"
back_home_text = "$HOME"
date_format = "2006-01-02"

View File

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

View File

@ -1,21 +0,0 @@
[[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 = "Kristian's Website"; description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";

53
menu.toml Normal file
View File

@ -0,0 +1,53 @@
[[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" }
]