From 56d3669da74b8c65512d89e317f682942fa3a0fc Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Thu, 17 Aug 2023 17:07:46 +0200 Subject: [PATCH] updated --- README.md | 21 ++++++++++++++++++++- config.toml | 35 +++++++++++++++++++++++++++++++++-- flake.nix | 5 +++-- menu.toml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 menu.toml diff --git a/README.md b/README.md index 5d99f1c..553fc31 100644 --- a/README.md +++ b/README.md @@ -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; + }; + }; +} ``` diff --git a/config.toml b/config.toml index b1fcc40..824a6b4 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,36 @@ baseURL = 'http://example.org/' languageCode = 'en-us' -title = 'My New Hugo Site' +title = "Kristian's Blog" -theme = 'nostyleplease' \ No newline at end of file +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" diff --git a/flake.nix b/flake.nix index 66577af..1ba70bc 100644 --- a/flake.nix +++ b/flake.nix @@ -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 ''; }; }); diff --git a/menu.toml b/menu.toml new file mode 100644 index 0000000..4077935 --- /dev/null +++ b/menu.toml @@ -0,0 +1,53 @@ +[[entries]] +title = "info" + + [[entries.entries]] + title = "Does this work riggraz/no-style-please." + + [[entries.entries]] + title = "github repo" + url = "https://github.com/riggraz/no-style-please" + + [[entries.entries]] + title = "used by riggraz.dev and many others" + +[[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" } + ] \ No newline at end of file