This commit is contained in:
Kristian Krsnik 2023-08-17 17:07:46 +02:00
parent 0bda37b491
commit 56d3669da7
4 changed files with 109 additions and 5 deletions

View File

@ -1,5 +1,24 @@
# Deploying to nginx webserver
```nix
Adapted from [AveryanAlex's blog](https://averyan.ru/en/p/nix-flakes-hugo)
```nix
{
inputs.blog.url = "git+https://git.krsnik.at/Kristian/blog"
}
```
Setup nginx virtualHost to serve your site:
```nix
{ inputs, pkgs, ... }:
{
services.nginx.virtualHosts."blog.krsnik.at" = {
root = inputs.packages.default.${pkgs.hostPlatform.system};
ssl = {
enableACME = true;
forceSSL = true;
};
};
}
```

View File

@ -1,5 +1,36 @@
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
title = "Kristian's Blog"
theme = 'nostyleplease'
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"

View File

@ -38,7 +38,7 @@
buildPhase = ''
mkdir -p themes
ln -s ${nostyleplease} themes/nostyleplease
${pkgs.hugo}/bin/hugo --minify
${pkgs.hugo}/bin/hugo --gc --minify
'';
installPhase = ''
@ -51,7 +51,8 @@
# Link theme to themes folder
shellHook = ''
mkdir -p themes
ln -sf ${nostyleplease} themes/nostyleplease
unlink themes/nostyleplease
ln -s ${nostyleplease} themes/nostyleplease
'';
};
});

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" }
]