diff --git a/build.zig b/build.zig index ba4fee6..679e0a4 100644 --- a/build.zig +++ b/build.zig @@ -10,7 +10,8 @@ pub fn build(b: *std.Build) !void { "sass", "--no-source-map", "--no-color", - "style/index.scss", + "--load-path=./style", + "./style/index.scss", }); const compile_stylesheet_cmd = b.addWriteFile("altagos.css", compile_stylesheet_cmd_out); const install_stylesheet = b.addInstallDirectory(.{ @@ -31,6 +32,7 @@ pub fn build(b: *std.Build) !void { const website = zine.website(b, .{ .output_path = "website", .build_assets = &.{stylesheet}, + .force = true, }); website.step.dependOn(compile_stylesheet); b.getInstallStep().dependOn(&website.step); diff --git a/build.zig.zon b/build.zig.zon index 215d9bf..10fab4e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,8 +5,8 @@ .minimum_zig_version = "0.15.0-dev.1149+4e6a04929", .dependencies = .{ .zine = .{ - .url = "git+https://github.com/kristoff-it/zine?ref=v0.11.0#50f35be00e33ea91c9c62c4579616602228c7137", - .hash = "zine-0.11.0-ou6nIBuYFgBXdDp2FtTSMZdFHSrLdlgOuXOWLaEQwNgo", + .url = "git+https://github.com/kristoff-it/zine?ref=main#d87290eff8d42580f92444334a1de3640fb67bda", + .hash = "zine-0.11.0-ou6nIAqaFgACa6oCBi9kCQGBHKfw6X6qBMANoZxBBtUW", }, }, .paths = .{ diff --git a/build.zig.zon.nix b/build.zig.zon.nix new file mode 100644 index 0000000..a86aa73 --- /dev/null +++ b/build.zig.zon.nix @@ -0,0 +1,286 @@ +# generated by zon2nix (https://github.com/Cloudef/zig2nix) + +{ + lib, + linkFarm, + fetchurl, + fetchgit, + runCommandLocal, + zig, + name ? "zig-packages", +}: + +with builtins; +with lib; + +let + unpackZigArtifact = + { name, artifact }: + runCommandLocal name { nativeBuildInputs = [ zig ]; } '' + hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})" + mv "$TMPDIR/p/$hash" "$out" + chmod 755 "$out" + ''; + + fetchZig = + { + name, + url, + hash, + }: + let + artifact = fetchurl { inherit url hash; }; + in + unpackZigArtifact { inherit name artifact; }; + + fetchGitZig = + { + name, + url, + hash, + rev ? throw "rev is required, remove and regenerate the zon2json-lock file", + }: + let + parts = splitString "#" url; + url_base = elemAt parts 0; + url_without_query = elemAt (splitString "?" url_base) 0; + in + fetchgit { + inherit name rev hash; + url = url_without_query; + deepClone = false; + }; + + fetchZigArtifact = + { + name, + url, + hash, + ... + }@args: + let + parts = splitString "://" url; + proto = elemAt parts 0; + path = elemAt parts 1; + fetcher = { + "git+http" = fetchGitZig ( + args + // { + url = "http://${path}"; + } + ); + "git+https" = fetchGitZig ( + args + // { + url = "https://${path}"; + } + ); + http = fetchZig { + inherit name hash; + url = "http://${path}"; + }; + https = fetchZig { + inherit name hash; + url = "https://${path}"; + }; + }; + in + fetcher.${proto}; +in +linkFarm name [ + { + name = "zine-0.11.0-ou6nIAqaFgACa6oCBi9kCQGBHKfw6X6qBMANoZxBBtUW"; + path = fetchZigArtifact { + name = "zine"; + url = "git+https://github.com/kristoff-it/zine?ref=main#d87290eff8d42580f92444334a1de3640fb67bda"; + hash = "sha256-nlRIXZWjprQlvRjnCMSu3JO1cZMPfr8S0fw2Z8UH9mw="; + rev = "d87290eff8d42580f92444334a1de3640fb67bda"; + }; + } + { + name = "afl_kit-0.1.0-NdJ3cvscAACLEvjZTB017IAks_Uq5ux1qpA-klDe384Y"; + path = fetchZigArtifact { + name = "afl_kit"; + url = "git+https://github.com/kristoff-it/zig-afl-kit#8ef04d1db48650345dca68da1e1b8f2615125c40"; + hash = "sha256-J0xbmsokjlhOav9KLlH2y4qiSgBit4nS+x6Q10L2OSA="; + rev = "8ef04d1db48650345dca68da1e1b8f2615125c40"; + }; + } + { + name = "AFLplusplus-4.21.0-aA1y4UtxAABpnSIF7ARSYDMRyqNcI-2Rwa5UeSsuw70v"; + path = fetchZigArtifact { + name = "AFLplusplus"; + url = "git+https://github.com/allyourcodebase/AFLplusplus#a52f1376e2d49720c39e4abf4aa4944afbf82191"; + hash = "sha256-AlkULC20/RTGMTPk2xWcdXCQlWn3sY3VrD0NRRoTZqY="; + rev = "a52f1376e2d49720c39e4abf4aa4944afbf82191"; + }; + } + { + name = "N-V-__8AAKE4uAAJZgEcPdaXnWqoj-IwYf3G2h9YSm-x92gg"; + path = fetchZigArtifact { + name = "AFLplusplus"; + url = "https://github.com/AFLplusplus/AFLplusplus/archive/v4.21c.tar.gz"; + hash = "sha256-EffHfTfP9uf2WsfMVbq3kB4MYgjoRaOHZDlNBO1WezA="; + }; + } + { + name = "lsp_kit-0.1.0-bi_PL18tCgAMyrZ0tgn_0PXnGEvxGWeNkkRygfe9pX9u"; + path = fetchZigArtifact { + name = "lsp_kit"; + url = "git+https://github.com/zigtools/lsp-kit#4835b9d3d3cf732fe1830189d81f331c68fb3e77"; + hash = "sha256-PqTlZcOow9vGLzI40zvqDI18OhJKzMg8RFLxB4x88/c="; + rev = "4835b9d3d3cf732fe1830189d81f331c68fb3e77"; + }; + } + { + name = "scripty-0.1.0-LKK5O2zEAADkO2rJa_QbMWwC_YmFnUKC384wwMeBGOQv"; + path = fetchZigArtifact { + name = "scripty"; + url = "git+https://github.com/kristoff-it/scripty#3d56bb62a1aec0b07b634aea42ec46e72e017e33"; + hash = "sha256-4BAcj6UU1BpKrcmM3zGwyV5Lxah9wL8esUSucfmlHzs="; + rev = "3d56bb62a1aec0b07b634aea42ec46e72e017e33"; + }; + } + { + name = "tracy-0.0.0-4Xw-1pwwAABTfMgoDP1unCbZDZhJEfict7XCBGF6IdIn"; + path = fetchZigArtifact { + name = "tracy"; + url = "git+https://github.com/kristoff-it/tracy#67d2d89e351048c76fc6d161e0ac09d8a831dc60"; + hash = "sha256-BKo1bhua/u+f5Z//ailur5aSHZWp3GiC0iwmVLrGZkE="; + rev = "67d2d89e351048c76fc6d161e0ac09d8a831dc60"; + }; + } + { + name = "mime-3.0.0-zwmL--0gAAByELrj57sRm2EFBRzjKLFrMgHQcs7sFZev"; + path = fetchZigArtifact { + name = "mime"; + url = "git+https://github.com/kristoff-it/mime#a2ed0cba3b1463217168034ffed8c1604e72598d"; + hash = "sha256-j/O/6pJg0hj3ytAMVBQwGjCRtaR+GYy8X7oqfIpuRi8="; + rev = "a2ed0cba3b1463217168034ffed8c1604e72598d"; + }; + } + { + name = "wuffs-0.4.0-alpha.9+3837.20240914-3CHJgcMFAACyPvxsC7b48pJv9dPkPa4pSrB2VFbCXTfK"; + path = fetchZigArtifact { + name = "wuffs"; + url = "git+https://github.com/allyourcodebase/wuffs#5822dc06c75b30d53082debf68c90193cb2b2608"; + hash = "sha256-Ung7shyFg+/I5Po393tWMp6Jb0Ia14pRJOUF36fr71c="; + rev = "5822dc06c75b30d53082debf68c90193cb2b2608"; + }; + } + { + name = "N-V-__8AANEmUgA6aZZZKbfNMv6DSs5In7CDFU6nInu_Y6aY"; + path = fetchZigArtifact { + name = "wuffs"; + url = "https://github.com/google/wuffs-mirror-release-c/archive/90e4d81a6a8b7b601e8e568da32a105d7f7705e5.tar.gz"; + hash = "sha256-3b68j7dAXnqRd+/fvfDfGK0CtgcxHZ5gSVnHwPYjavQ="; + }; + } + { + name = "N-V-__8AALShqgXkvqYU6f__FrA22SMWmi2TXCJjNTO1m8XJ"; + path = fetchZigArtifact { + name = "frameworks"; + url = "git+https://github.com/hexops/xcode-frameworks.git#8a1cfb373587ea4c9bb1468b7c986462d8d4e10e"; + hash = "sha256-b1Ay3GfBHwubnrGi4lflPiaqGfzWtABEbEiE8+ZTL90="; + rev = "8a1cfb373587ea4c9bb1468b7c986462d8d4e10e"; + }; + } + { + name = "superhtml-0.4.0-Y7MdPIiGDQCtVmQuV56farDTjm2AB_GyzQbM9gwJhNTL"; + path = fetchZigArtifact { + name = "superhtml"; + url = "git+https://github.com/kristoff-it/superhtml#8bb212b1044b4740c14bc73b649adab58a0cb481"; + hash = "sha256-G7yC+YmDZsIvLW6EmeaqQlpLWhcQuHg/DiljxB2vV4Q="; + rev = "8bb212b1044b4740c14bc73b649adab58a0cb481"; + }; + } + { + name = "known_folders-0.0.0-Fy-PJtLDAADGDOwYwMkVydMSTp_aN-nfjCZw6qPQ2ECL"; + path = fetchZigArtifact { + name = "known_folders"; + url = "git+https://github.com/ziglibs/known-folders#aa24df42183ad415d10bc0a33e6238c437fc0f59"; + hash = "sha256-YiJ2lfG1xsGFMO6flk/BMhCqJ3kB3MnOX5fnfDEcmMY="; + rev = "aa24df42183ad415d10bc0a33e6238c437fc0f59"; + }; + } + { + name = "zeit-0.6.0-5I6bkyJ8AgAS1_0NDvfxmFsBDTOxkZXtLUHrmPjcmt-K"; + path = fetchZigArtifact { + name = "zeit"; + url = "git+https://github.com/kristoff-it/zeit?ref=writergate#06ec40445cc477fea5a8369f1ba3881e2a3c00eb"; + hash = "sha256-3zhZrL1g7sIox+7+trc7dVs4Cf7SBmJM0zJy861aYuw="; + rev = "06ec40445cc477fea5a8369f1ba3881e2a3c00eb"; + }; + } + { + name = "flow_syntax-0.1.0-X8jOoSUNAQD_lAmm4kWMCsqYGQNUBP6qGldpxR_6D7GC"; + path = fetchZigArtifact { + name = "flow_syntax"; + url = "git+https://github.com/kristoff-it/flow-syntax?ref=writergate#727dfa247d6cfe99939c98e5bcb440dfeefc261d"; + hash = "sha256-x/z/xey2RAd6n3uqlBWuoAtpzR9Fkkh9jhhK+ijJ4h0="; + rev = "727dfa247d6cfe99939c98e5bcb440dfeefc261d"; + }; + } + { + name = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyN88UicDHlr22vQnOZ3DW9NWN1gOhDwLuCRXvrh2"; + path = fetchZigArtifact { + name = "tree_sitter"; + url = "https://github.com/neurocyte/tree-sitter/releases/download/master-f1f032d24f621e2ee4deab1c424d3bf9fb809f6e/source.tar.gz"; + hash = "sha256-w0164ZvB2jHRRlumkwGsROZHInHj5z+Ny4e/x0tPrtU="; + }; + } + { + name = "cbor-1.0.0-RcQE_N3yAADXjbyvhsmTQ6lf22l1nYgePq5FT8NaC4ic"; + path = fetchZigArtifact { + name = "cbor"; + url = "git+https://github.com/neurocyte/cbor#6eccce0b984296e7d05c20d83933cb31530e4fac"; + hash = "sha256-bEaRaqXT4bhVp4XV1DLRwUVVo9NesKpi8qGEF1nEMO4="; + rev = "6eccce0b984296e7d05c20d83933cb31530e4fac"; + }; + } + { + name = "ziggy-0.1.0-kTg8v0NABgAXpvuVY5f4frwE7xvH44KnARR0q6QB1_1a"; + path = fetchZigArtifact { + name = "ziggy"; + url = "git+https://github.com/kristoff-it/ziggy#e95c85cb58773c43e9d94c0b9422ae84697e68a1"; + hash = "sha256-6vqUPY/fpGuM1K4HfgpL/dRy7Na6fJ/t+Pe/12b1wqE="; + rev = "e95c85cb58773c43e9d94c0b9422ae84697e68a1"; + }; + } + { + name = "supermd-0.1.0-3Mco3GeSWACjTJjWf3XRGAUOHVS-MZPei9wAXY4c1KNI"; + path = fetchZigArtifact { + name = "supermd"; + url = "git+https://github.com/kristoff-it/supermd#a2e77c355df79c6991d13cd56904d2b7562597ef"; + hash = "sha256-Yd1JxCDXdOvGG8hSOfzz/BZYPcCrQDsyoEbGjv9HypY="; + rev = "a2e77c355df79c6991d13cd56904d2b7562597ef"; + }; + } + { + name = "cmark_gfm-0.1.0-uQgTK6WZFwCG9y7_Z0IkCINtmMTwvEZTyVh_6nsaMVPq"; + path = fetchZigArtifact { + name = "gfm"; + url = "git+https://github.com/kristoff-it/cmark-gfm#b96c27a5152b9124d657dee7fb1186d0a13c1fe4"; + hash = "sha256-NlTZ5if3h1zZjJs0JTMB8SsvTQM+4OSsScvFUbfq9nQ="; + rev = "b96c27a5152b9124d657dee7fb1186d0a13c1fe4"; + }; + } + { + name = "ziggy-0.1.0-kTg8v9g9BgB0Tdid89m2yC7a-LtZB8sD3v4pWzHCp7MO"; + path = fetchZigArtifact { + name = "ziggy"; + url = "git+https://github.com/kristoff-it/ziggy#f3dcc37beab34478a67aa9680f581edb0bc4d482"; + hash = "sha256-7vfUkgaPdM3GNaQ6Sy6PC4P/AOyBncTJC1v0p46f0is="; + rev = "f3dcc37beab34478a67aa9680f581edb0bc4d482"; + }; + } + { + name = "lsp_kit-0.1.0-bi_PL5IyCgCh6ZNq1VaDklFqV0u23xNSXONjfDpYceJr"; + path = fetchZigArtifact { + name = "lsp_kit"; + url = "git+https://github.com/zigtools/lsp-kit#e58d398b4058eea09d984d5d039eddd243e535ad"; + hash = "sha256-0q1l1zAUC/9/bSvj0ziheVMQmsTVUPPYR3RHS+FeEs0="; + rev = "e58d398b4058eea09d984d5d039eddd243e535ad"; + }; + } +] diff --git a/build.zig.zon2json-lock b/build.zig.zon2json-lock new file mode 100644 index 0000000..abe7b0c --- /dev/null +++ b/build.zig.zon2json-lock @@ -0,0 +1,131 @@ +{ + "zine-0.11.0-ou6nIAqaFgACa6oCBi9kCQGBHKfw6X6qBMANoZxBBtUW": { + "name": "zine", + "url": "git+https://github.com/kristoff-it/zine?ref=main#d87290eff8d42580f92444334a1de3640fb67bda", + "hash": "sha256-nlRIXZWjprQlvRjnCMSu3JO1cZMPfr8S0fw2Z8UH9mw=", + "rev": "d87290eff8d42580f92444334a1de3640fb67bda" + }, + "afl_kit-0.1.0-NdJ3cvscAACLEvjZTB017IAks_Uq5ux1qpA-klDe384Y": { + "name": "afl_kit", + "url": "git+https://github.com/kristoff-it/zig-afl-kit#8ef04d1db48650345dca68da1e1b8f2615125c40", + "hash": "sha256-J0xbmsokjlhOav9KLlH2y4qiSgBit4nS+x6Q10L2OSA=", + "rev": "8ef04d1db48650345dca68da1e1b8f2615125c40" + }, + "AFLplusplus-4.21.0-aA1y4UtxAABpnSIF7ARSYDMRyqNcI-2Rwa5UeSsuw70v": { + "name": "AFLplusplus", + "url": "git+https://github.com/allyourcodebase/AFLplusplus#a52f1376e2d49720c39e4abf4aa4944afbf82191", + "hash": "sha256-AlkULC20/RTGMTPk2xWcdXCQlWn3sY3VrD0NRRoTZqY=", + "rev": "a52f1376e2d49720c39e4abf4aa4944afbf82191" + }, + "N-V-__8AAKE4uAAJZgEcPdaXnWqoj-IwYf3G2h9YSm-x92gg": { + "name": "AFLplusplus", + "url": "https://github.com/AFLplusplus/AFLplusplus/archive/v4.21c.tar.gz", + "hash": "sha256-EffHfTfP9uf2WsfMVbq3kB4MYgjoRaOHZDlNBO1WezA=" + }, + "lsp_kit-0.1.0-bi_PL18tCgAMyrZ0tgn_0PXnGEvxGWeNkkRygfe9pX9u": { + "name": "lsp_kit", + "url": "git+https://github.com/zigtools/lsp-kit#4835b9d3d3cf732fe1830189d81f331c68fb3e77", + "hash": "sha256-PqTlZcOow9vGLzI40zvqDI18OhJKzMg8RFLxB4x88/c=", + "rev": "4835b9d3d3cf732fe1830189d81f331c68fb3e77" + }, + "scripty-0.1.0-LKK5O2zEAADkO2rJa_QbMWwC_YmFnUKC384wwMeBGOQv": { + "name": "scripty", + "url": "git+https://github.com/kristoff-it/scripty#3d56bb62a1aec0b07b634aea42ec46e72e017e33", + "hash": "sha256-4BAcj6UU1BpKrcmM3zGwyV5Lxah9wL8esUSucfmlHzs=", + "rev": "3d56bb62a1aec0b07b634aea42ec46e72e017e33" + }, + "tracy-0.0.0-4Xw-1pwwAABTfMgoDP1unCbZDZhJEfict7XCBGF6IdIn": { + "name": "tracy", + "url": "git+https://github.com/kristoff-it/tracy#67d2d89e351048c76fc6d161e0ac09d8a831dc60", + "hash": "sha256-BKo1bhua/u+f5Z//ailur5aSHZWp3GiC0iwmVLrGZkE=", + "rev": "67d2d89e351048c76fc6d161e0ac09d8a831dc60" + }, + "mime-3.0.0-zwmL--0gAAByELrj57sRm2EFBRzjKLFrMgHQcs7sFZev": { + "name": "mime", + "url": "git+https://github.com/kristoff-it/mime#a2ed0cba3b1463217168034ffed8c1604e72598d", + "hash": "sha256-j/O/6pJg0hj3ytAMVBQwGjCRtaR+GYy8X7oqfIpuRi8=", + "rev": "a2ed0cba3b1463217168034ffed8c1604e72598d" + }, + "wuffs-0.4.0-alpha.9+3837.20240914-3CHJgcMFAACyPvxsC7b48pJv9dPkPa4pSrB2VFbCXTfK": { + "name": "wuffs", + "url": "git+https://github.com/allyourcodebase/wuffs#5822dc06c75b30d53082debf68c90193cb2b2608", + "hash": "sha256-Ung7shyFg+/I5Po393tWMp6Jb0Ia14pRJOUF36fr71c=", + "rev": "5822dc06c75b30d53082debf68c90193cb2b2608" + }, + "N-V-__8AANEmUgA6aZZZKbfNMv6DSs5In7CDFU6nInu_Y6aY": { + "name": "wuffs", + "url": "https://github.com/google/wuffs-mirror-release-c/archive/90e4d81a6a8b7b601e8e568da32a105d7f7705e5.tar.gz", + "hash": "sha256-3b68j7dAXnqRd+/fvfDfGK0CtgcxHZ5gSVnHwPYjavQ=" + }, + "N-V-__8AALShqgXkvqYU6f__FrA22SMWmi2TXCJjNTO1m8XJ": { + "name": "frameworks", + "url": "git+https://github.com/hexops/xcode-frameworks.git#8a1cfb373587ea4c9bb1468b7c986462d8d4e10e", + "hash": "sha256-b1Ay3GfBHwubnrGi4lflPiaqGfzWtABEbEiE8+ZTL90=", + "rev": "8a1cfb373587ea4c9bb1468b7c986462d8d4e10e" + }, + "superhtml-0.4.0-Y7MdPIiGDQCtVmQuV56farDTjm2AB_GyzQbM9gwJhNTL": { + "name": "superhtml", + "url": "git+https://github.com/kristoff-it/superhtml#8bb212b1044b4740c14bc73b649adab58a0cb481", + "hash": "sha256-G7yC+YmDZsIvLW6EmeaqQlpLWhcQuHg/DiljxB2vV4Q=", + "rev": "8bb212b1044b4740c14bc73b649adab58a0cb481" + }, + "known_folders-0.0.0-Fy-PJtLDAADGDOwYwMkVydMSTp_aN-nfjCZw6qPQ2ECL": { + "name": "known_folders", + "url": "git+https://github.com/ziglibs/known-folders#aa24df42183ad415d10bc0a33e6238c437fc0f59", + "hash": "sha256-YiJ2lfG1xsGFMO6flk/BMhCqJ3kB3MnOX5fnfDEcmMY=", + "rev": "aa24df42183ad415d10bc0a33e6238c437fc0f59" + }, + "zeit-0.6.0-5I6bkyJ8AgAS1_0NDvfxmFsBDTOxkZXtLUHrmPjcmt-K": { + "name": "zeit", + "url": "git+https://github.com/kristoff-it/zeit?ref=writergate#06ec40445cc477fea5a8369f1ba3881e2a3c00eb", + "hash": "sha256-3zhZrL1g7sIox+7+trc7dVs4Cf7SBmJM0zJy861aYuw=", + "rev": "06ec40445cc477fea5a8369f1ba3881e2a3c00eb" + }, + "flow_syntax-0.1.0-X8jOoSUNAQD_lAmm4kWMCsqYGQNUBP6qGldpxR_6D7GC": { + "name": "flow_syntax", + "url": "git+https://github.com/kristoff-it/flow-syntax?ref=writergate#727dfa247d6cfe99939c98e5bcb440dfeefc261d", + "hash": "sha256-x/z/xey2RAd6n3uqlBWuoAtpzR9Fkkh9jhhK+ijJ4h0=", + "rev": "727dfa247d6cfe99939c98e5bcb440dfeefc261d" + }, + "tree_sitter-0.22.4-150-g7e3f5726-z0LhyN88UicDHlr22vQnOZ3DW9NWN1gOhDwLuCRXvrh2": { + "name": "tree_sitter", + "url": "https://github.com/neurocyte/tree-sitter/releases/download/master-f1f032d24f621e2ee4deab1c424d3bf9fb809f6e/source.tar.gz", + "hash": "sha256-w0164ZvB2jHRRlumkwGsROZHInHj5z+Ny4e/x0tPrtU=" + }, + "cbor-1.0.0-RcQE_N3yAADXjbyvhsmTQ6lf22l1nYgePq5FT8NaC4ic": { + "name": "cbor", + "url": "git+https://github.com/neurocyte/cbor#6eccce0b984296e7d05c20d83933cb31530e4fac", + "hash": "sha256-bEaRaqXT4bhVp4XV1DLRwUVVo9NesKpi8qGEF1nEMO4=", + "rev": "6eccce0b984296e7d05c20d83933cb31530e4fac" + }, + "ziggy-0.1.0-kTg8v0NABgAXpvuVY5f4frwE7xvH44KnARR0q6QB1_1a": { + "name": "ziggy", + "url": "git+https://github.com/kristoff-it/ziggy#e95c85cb58773c43e9d94c0b9422ae84697e68a1", + "hash": "sha256-6vqUPY/fpGuM1K4HfgpL/dRy7Na6fJ/t+Pe/12b1wqE=", + "rev": "e95c85cb58773c43e9d94c0b9422ae84697e68a1" + }, + "supermd-0.1.0-3Mco3GeSWACjTJjWf3XRGAUOHVS-MZPei9wAXY4c1KNI": { + "name": "supermd", + "url": "git+https://github.com/kristoff-it/supermd#a2e77c355df79c6991d13cd56904d2b7562597ef", + "hash": "sha256-Yd1JxCDXdOvGG8hSOfzz/BZYPcCrQDsyoEbGjv9HypY=", + "rev": "a2e77c355df79c6991d13cd56904d2b7562597ef" + }, + "cmark_gfm-0.1.0-uQgTK6WZFwCG9y7_Z0IkCINtmMTwvEZTyVh_6nsaMVPq": { + "name": "gfm", + "url": "git+https://github.com/kristoff-it/cmark-gfm#b96c27a5152b9124d657dee7fb1186d0a13c1fe4", + "hash": "sha256-NlTZ5if3h1zZjJs0JTMB8SsvTQM+4OSsScvFUbfq9nQ=", + "rev": "b96c27a5152b9124d657dee7fb1186d0a13c1fe4" + }, + "ziggy-0.1.0-kTg8v9g9BgB0Tdid89m2yC7a-LtZB8sD3v4pWzHCp7MO": { + "name": "ziggy", + "url": "git+https://github.com/kristoff-it/ziggy#f3dcc37beab34478a67aa9680f581edb0bc4d482", + "hash": "sha256-7vfUkgaPdM3GNaQ6Sy6PC4P/AOyBncTJC1v0p46f0is=", + "rev": "f3dcc37beab34478a67aa9680f581edb0bc4d482" + }, + "lsp_kit-0.1.0-bi_PL5IyCgCh6ZNq1VaDklFqV0u23xNSXONjfDpYceJr": { + "name": "lsp_kit", + "url": "git+https://github.com/zigtools/lsp-kit#e58d398b4058eea09d984d5d039eddd243e535ad", + "hash": "sha256-0q1l1zAUC/9/bSvj0ziheVMQmsTVUPPYR3RHS+FeEs0=", + "rev": "e58d398b4058eea09d984d5d039eddd243e535ad" + } +} \ No newline at end of file diff --git a/content/index.smd b/content/index.smd index eea6e96..5b9cb18 100644 --- a/content/index.smd +++ b/content/index.smd @@ -19,7 +19,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec malesuada sit ame Donec nibh risus, porta ut turpis quis, maximus ornare neque. Integer elementum, libero nec venenatis egestas, ante neque accumsan dolor, non semper dui augue sit amet sem. Mauris faucibus, orci at pellentesque mollis, nunc dolor dapibus lacus, id iaculis est lectus a urna. Maecenas rutrum cursus lectus sit amet hendrerit. Duis purus quam, scelerisque in eros ut, egestas iaculis nunc. Nam consequat nisl non mauris bibendum, vitae consequat odio sodales. Vestibulum porttitor, mi a interdum tristique, turpis augue faucibus tortor, sed tincidunt ligula eros at urna. -Etiam porttitor, lorem quis consectetur cursus, urna sem molestie ipsum, sit amet condimentum magna sapien eu leo. Sed vel consequat felis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet odio id augue finibus molestie. Vivamus ut odio luctus, pharetra purus sed, venenatis enim. Nam laoreet leo vel sollicitudin lacinia. Praesent mollis dignissim justo ac aliquam. Suspendisse volutpat nisl eget blandit tincidunt. Praesent hendrerit quis tellus sodales condimentum. Morbi rhoncus, felis vitae sollicitudin sodales, nisi justo fringilla nibh, a ultrices arcu enim non leo. Maecenas mollis neque nec odio malesuada suscipit. In vel quam turpis. Quisque a nisi urna. Nunc ut tellus sit amet mauris condimentum ultricies quis in nulla. +Etiam porttitor, lorem quis consectetur cursus, urna sem molestie ipsum, `sit amet condimentum magna sapien` eu leo. Sed vel consequat felis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet odio id augue finibus molestie. Vivamus ut odio luctus, pharetra purus sed, venenatis enim. Nam laoreet leo vel sollicitudin lacinia. Praesent mollis dignissim justo ac aliquam. Suspendisse volutpat nisl eget blandit tincidunt. Praesent hendrerit quis tellus sodales condimentum. Morbi rhoncus, felis vitae sollicitudin sodales, nisi justo fringilla nibh, a ultrices arcu enim non leo. Maecenas mollis neque nec odio malesuada suscipit. In vel quam turpis. Quisque a nisi urna. Nunc ut tellus sit amet mauris condimentum ultricies quis in nulla. Donec eu consequat elit, sed vehicula lorem. Integer vel leo eget sem auctor ultricies. Etiam consequat ultrices ultricies. Quisque nec risus nulla. In molestie, ligula nec fringilla tincidunt, dui magna consequat sapien, non interdum felis nulla in odio. Etiam non dolor semper, feugiat ante pretium, varius elit. Nam a tortor at lorem ultrices tincidunt. Suspendisse neque quam, luctus et diam sed, viverra accumsan leo. Cras eu lacus blandit, vulputate leo porta, pellentesque quam. Aenean ullamcorper ex ac finibus tincidunt. Etiam sit amet massa cursus metus bibendum aliquam. Quisque pulvinar tincidunt nisi, et ornare ligula dictum at. diff --git a/content/notes/markdown-overview.smd b/content/notes/markdown-overview.smd new file mode 100644 index 0000000..d7941d0 --- /dev/null +++ b/content/notes/markdown-overview.smd @@ -0,0 +1,497 @@ +--- +.title = "Markdown Overview", +.author = "Jakob Speer", +.date = @date("2025-07-22"), +.layout = "root.shtml", +.draft = false, +.description = "A small overview of Markdown features supported by this site" +--- + +Learn how to apply basic formatting to your notes, using [Markdown](https://daringfireball.net/projects/markdown/). For more advanced formatting syntax, refer to [Advanced formatting syntax](https://help.obsidian.md/advanced-syntax). + +## Paragraphs + +To create paragraphs in Markdown, use a **blank line** to separate blocks of text. Each block of text separated by a blank line is treated as a distinct paragraph. + +```md +This is a paragraph. + +This is another paragraph. +``` + +This is a paragraph. + +This is another paragraph. + +A blank line between lines of text creates separate paragraphs. This is the default behavior in Markdown. + +Multiple blank spaces + +Multiple adjacent blank spaces within and between paragraphs collapse into a single space when displayed in [Reading view](https://help.obsidian.md/edit-and-read#Reading%20view) or on [Obsidian Publish](https://help.obsidian.md/publish) sites. + +```md +Multiple adjacent spaces + +and multiple newlines between paragraphs. +``` + +> Multiple adjacent spaces +> +> and multiple newlines between paragraphs. + +If you want to prevent spaces from collapsing or add multiple blank spaces, you can use the ` ` (non-breaking space) or `
` (line break) HTML tags. + +### Line breaks + +By default in Obsidian, pressing `Enter`  once will create a new line in your note, but this is treated as a  *continuation*  of the same paragraph in the rendered output, following typical Markdown behavior. To insert a line break  *within* a paragraph without starting a new paragraph, you can either: + +- Add **two spaces**  at the end of a line before pressing  `Enter`, or +- Use the shortcut `Shift + Enter` to directly insert a line break. + +Why don't multiple `Enter` presses create more line breaks in reading view? + +Obsidian includes a **Strict Line Breaks** setting, which makes Obsidian follow the standard Markdown specification for line breaks. + +To enable this feature: + +1. Open **Settings**. +2. Go to the **Editor** tab. +3. Enable **Strict Line Breaks**. + +When **Strict Line Breaks** is enabled in Obsidian, line breaks have three distinct behaviors depending on how the lines are separated: + +**Single return with no spaces**: A single  `Enter` with no trailing spaces will combine the two separate lines into a single line when rendered. + +```md +line one +line two +``` + +Renders as: + +line one line two + +**Single return with two or more trailing spaces**: If you add two or more spaces at the end of the first line before pressing  `Enter`, the two lines remain part of the same paragraph, but are broken by a line break (HTML `
` element). We'll use two underscores to stand in for spaces in this example. + +```md +line three__ +line four +``` + +Renders as: + +line three + +line four + +**Double return (with or without trailing spaces)**: Pressing `Enter` twice (or more) separates the lines into two distinct paragraphs (HTML `

` elements), regardless of whether you add spaces at the end of the first line. + +```md +line five + +line six +``` + +Renders as: + +line five + +line six + +## Headings + +To create a heading, add up to six `#` symbols before your heading text. The number of `#` symbols determines the size of the heading. + +```md +# This is a heading 1 +## This is a heading 2 +### This is a heading 3 +#### This is a heading 4 +##### This is a heading 5 +###### This is a heading 6 +``` + +## This is a heading 1 + +## This is a heading 2 + +### This is a heading 3 + +#### This is a heading 4 + +##### This is a heading 5 + +###### This is a heading 6 + +## Bold, italics, highlights + +Text formatting can also be applied using [Editing shortcuts](https://help.obsidian.md/editing-shortcuts). + +| Style | Syntax | Example | Output | +| --- | --- | --- | --- | +| Bold | `** **` or `__ __` | `**Bold text**` | **Bold text** | +| Italic | `* *` or `_ _` | `*Italic text*` | *Italic text* | +| Strikethrough | `~~ ~~` | `~~Striked out text~~` | ~~Striked out text~~ | +| Highlight | `== ==` | `==Highlighted text==` | ==Highlighted text== | +| Bold and nested italic | `** **` and `_ _` | `**Bold text and _nested italic_ text**` | **Bold text and *nested italic* text** | +| Bold and italic | `*** ***` or `___ ___` | `***Bold and italic text***` | ***Bold and italic text*** | + +Formatting can be forced to display in plain text by adding a backslash `\` in front of it. + +\*\*This line will not be bold\*\* + +```markdown +\*\*This line will not be bold\*\* +``` + +\* *This line will be italic and show the asterisks* \* + +```markdown +This line will be italic and show the asterisks +``` + +## Internal links + +Obsidian supports two formats for [internal links](https://help.obsidian.md/links) between notes: + +- Wikilink: `[[Three laws of motion]]` +- Markdown: `[Three laws of motion](Three%20laws%20of%20motion.md)` + +## External links + +If you want to link to an external URL, you can create an inline link by surrounding the link text in brackets (`[ ]`), and then the URL in parentheses (`( )`). + +```md +[Obsidian Help](https://help.obsidian.md) +``` + +[Obsidian Help](https://help.obsidian.md/) + +You can also create external links to files in other vaults, by linking to an [Obsidian URI](https://help.obsidian.md/Extending+Obsidian/Obsidian+URI). + +```md +[Note](obsidian://open?vault=MainVault&file=Note.md) +``` + +### Escape blank spaces in links + +If your URL contains blank spaces, you must escape them by replacing them with `%20`. + +```md +[My Note](obsidian://open?vault=MainVault&file=My%20Note.md) +``` + +You can also escape the URL by wrapping it with angled brackets (`< >`). + +```md +[My Note]() +``` + +## External images + +You can add images with external URLs, by adding a `!` symbol before an [external link](https://help.obsidian.md/syntax#External%20links). + +```md +![Engelbart](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +![Engelbart](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) + +You can change the image dimensions, by adding `|640x480` to the link destination, where 640 is the width and 480 is the height. + +```md +![Engelbart|100x145](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +If you only specify the width, the image scales according to its original aspect ratio. For example: + +```md +![Engelbart|100](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +> # [Tip]($block) +> If you want to add an image from inside your vault, you can also [embed an image in a note](https://help.obsidian.md/embeds#Embed%20an%20image%20in%20a%20note). + +## Quotes + +You can quote text by adding a `>` symbols before the text. + +```md +> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society. + +\- Doug Engelbart, 1961 +``` + +> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society. + +\- Doug Engelbart, 1961 + +Tip + +You can turn your quote into a [callout](https://help.obsidian.md/callouts) by adding `[!info]` as the first line in a quote. + +## Lists + +You can create an unordered list by adding a `-`, `*`, or `+` before the text. + +```md +- First list item +- Second list item +- Third list item +``` + +- First list item +- Second list item +- Third list item + +To create an ordered list, start each line with a number followed by a `.` or `)` symbol. + +```md +1. First list item +2. Second list item +3. Third list item +``` + +1. First list item +2. Second list item +3. Third list item + +```md +1) First list item +2) Second list item +3) Third list item +``` + +1. First list item +2. Second list item +3. Third list item + +You can use `shift + enter` to insert a [line break](https://help.obsidian.md/syntax#Line%20breaks) within an ordered list without altering the numbering. + +```md +1. First list item + +2. Second list item +3. Third list item + +4. Fourth list item +5. Fifth list item +6. Sixth list item +``` + +### Task lists + +To create a task list, start each list item with a hyphen and space followed by `[ ]`. + +```md +- [x] This is a completed task. +- [ ] This is an incomplete task. +``` + +- This is a completed task. +- This is an incomplete task. + +You can toggle a task in Reading view by selecting the checkbox. + +Tip + +You can use any character inside the brackets to mark it as complete. + +```md +- [x] Milk +- [?] Eggs +- [-] Eggs +``` +- Milk +- Eggs +- Eggs + +### Nesting lists + +You can nest any type of list—ordered, unordered, or task lists—under any other type of list. + +To create a nested list, indent one or more list items. You can mix list types within a nested structure: + +```md +1. First list item + 1. Ordered nested list item +2. Second list item + - Unordered nested list item +``` + +1. First list item + 1. Ordered nested list item +2. Second list item + - Unordered nested list item + +Similarly, you can create a nested task list by indenting one or more list items: + +```md +- [ ] Task item 1 + - [ ] Subtask 1 +- [ ] Task item 2 + - [ ] Subtask 1 +``` + +- Task item 1 + - Subtask 1 +- Task item 2 + - Subtask 1 + +Use `Tab`  or  `Shift+Tab` to indent or unindent selected list items to easily organize them. + +## Horizontal rule + +You can use three or more stars `***`, hyphens `---`, or underscore `___` on its own line to add a horizontal bar. You can also separate symbols using spaces. + +--- + +## Code + +You can format code both inline within a sentence, or in its own block. + +### Inline code + +You can format code within a sentence using single backticks. + +```md +\`backticks\` +``` + +Text inside `backticks` on a line will be formatted like code. + +If you want to put backticks in an inline code block, surround it with double backticks like so: inline ``code with a backtick ` inside``. + +### Code blocks + +To format code as a block, enclose it with three backticks or three tildes. + +```md +\`\`\` +cd ~/Desktop +\`\`\` +``` + +```md +~~~ +cd ~/Desktop +~~~ +``` + +```md +cd ~/Desktop +``` + +You can also create a code block by indenting the text using `Tab` or 4 blank spaces. + +```md +cd ~/Desktop +``` + +You can add syntax highlighting to a code block, by adding a language code after the first set of backticks. + +```md +\`\`\`js +function fancyAlert(arg) { + if(arg) { + $.facebox({div:'#foo'}) + } +} +\`\`\` +``` + +```js +function fancyAlert(arg) { + if(arg) { + $.facebox({div:'#foo'}) + } +} +``` + +Obsidian uses Prism for syntax highlighting. For more information, refer to [Supported languages](https://prismjs.com/#supported-languages). + +Note + +[Source mode](https://help.obsidian.md/edit-and-read#Source%20mode) and [Live Preview](https://help.obsidian.md/edit-and-read#Live%20Preview) do not support PrismJS, and may render syntax highlighting differently. + +## Footnotes + +You can add footnotes[^1] to your notes using the following syntax: + +```md +This is a simple footnote[^1]. + +[^1]: This is the referenced text. +[^2]: Add 2 spaces at the start of each new line. + This lets you write footnotes that span multiple lines. +[^note]: Named footnotes still appear as numbers, but can make it easier to identify and link references. +``` + +You can also inline footnotes in a sentence. Note that the caret goes outside the brackets. [^This is an inline footnote.][^2] + +```md +You can also use inline footnotes. [^This is an inline footnote.] +``` + +Note + +Inline footnotes only work in reading view, not in Live Preview. + +## Comments + +```md +This is an %%inline%% comment. + +%% +This is a block comment. + +Block comments can span multiple lines. +%% +``` + +## Escaping Markdown Syntax + +In some cases, you may need to display special characters in Markdown, such as `*`, `_`, or `#`, without triggering their formatting. To display these characters literally, place a backslash (`\`) before them. + +Common characters to escape + +- Asterisk: `\*` +- Underscore: `\_` +- Hashtag: `\#` +- Backtick: `` \` `` +- Pipe (used in tables): `\|` +- Tilde: `\~` + +```md +\*This text will not be italicized\*. +``` + +\*This text will not be italicized\*. + +When working with numbered lists, you may need to escape the period after the number to prevent automatic list formatting. Place the backslash (`\`) before the period, **not** before the number. + +```md +1\. This won't be a list item. +``` + +1\. This won't be a list item. + +## Learn more + +To learn more advanced formatting syntax, such as tables, diagrams, and math expressions, refer to [Advanced formatting syntax](https://help.obsidian.md/advanced-syntax). + +To learn more about how Obsidian parses Markdown, refer to [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown). + +--- + +[^1]: This is a footnote with math and code. + + ```=mathtex + x+\sqrt{1-x^2} + ``` + + ```md + [^1]: This is a footnote. + ``` + +[^2]: Not supported by supermd diff --git a/content/notes/markdown-overview/foo.zig b/content/notes/markdown-overview/foo.zig new file mode 100644 index 0000000..47f3715 --- /dev/null +++ b/content/notes/markdown-overview/foo.zig @@ -0,0 +1,45 @@ +const std = @import("std"); +const zine = @import("zine"); + +pub fn build(b: *std.Build) !void { + const compile_stylesheet = b.step("stylesheet", "Compile altagos.css stylesheet from scss files"); + compile_stylesheet.result_cached = false; + std.debug.assert(try compile_stylesheet.addDirectoryWatchInput(b.path("style"))); + + const compile_stylesheet_cmd_out = b.run(&.{ + "sass", + "--no-source-map", + "--no-color", + "style/index.scss", + }); + const compile_stylesheet_cmd = b.addWriteFile("altagos.css", compile_stylesheet_cmd_out); + const install_stylesheet = b.addInstallDirectory(.{ + .source_dir = compile_stylesheet_cmd.getDirectory(), + .install_dir = .prefix, + .install_subdir = "style", + }); + install_stylesheet.step.dependOn(&compile_stylesheet_cmd.step); + + const stylesheet = zine.BuildAsset{ + .name = "altagos.css", + .lp = b.path("zig-out/style/altagos.css"), + .install_path = "altagos.css", + .install_always = true, + }; + compile_stylesheet.dependOn(&install_stylesheet.step); + + const website = zine.website(b, .{ + .install_path = "website", + .build_assets = &.{stylesheet}, + }); + website.step.dependOn(compile_stylesheet); + b.getInstallStep().dependOn(&website.step); + + const serve = b.step("serve", "Start the Zine dev server"); + const run_zine = zine.serve(b, .{ + .build_assets = &.{stylesheet}, + // .debug = .{ .scopes = &.{"serve"} }, + }); + run_zine.step.dependOn(&install_stylesheet.step); + serve.dependOn(&run_zine.step); +} diff --git a/flake.lock b/flake.lock index 5aae912..025c1f7 100644 --- a/flake.lock +++ b/flake.lock @@ -36,11 +36,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754531935, - "narHash": "sha256-Y9qoYxg7waoMhiRhEmG+mDs6Jx2yk5eB7MlGDPMNs8E=", + "lastModified": 1754616465, + "narHash": "sha256-uOOXepnXGHCv4203sHEqKGipoiWvMmmw1NGN7+tZ5sQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "41752cc1a38a8c993cf4e92ab8df640803554c7a", + "rev": "53befe95a9700fa9bb6b93e913c02a8d7f0cd22e", "type": "github" }, "original": { @@ -76,11 +76,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1754532129, - "narHash": "sha256-nScPs0Hzm71rXe6H6jVy9Gp+t7MEOQcm3gjAj/L0Qvg=", + "lastModified": 1754618516, + "narHash": "sha256-sksfQlGgYfKIpa0iZ6lxNIunPUbolF8Jgp/toS1MlJ0=", "owner": "Cloudef", "repo": "zig2nix", - "rev": "f656a4a84e2182fb0c99132b214d136ebc087388", + "rev": "873604c1af7c1a91936ef97377804d91d8fb5c0f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index bf21e38..48581db 100644 --- a/flake.nix +++ b/flake.nix @@ -52,10 +52,10 @@ # For bundling with nix bundle for running outside of nix # example: https://github.com/ralismark/nix-appimage - # apps.bundle = { - # type = "app"; - # program = "${packages.foreign}/bin/master"; - # }; + apps.bundle = { + type = "app"; + program = "${packages.foreign}/bin/master"; + }; # nix run . apps.default = env.app [] "zig build serve -- \"$@\""; @@ -64,7 +64,7 @@ apps.build = env.app [] "zig build \"$@\""; # nix run .#stylesheet - apps.test = env.app [] "zig build stylesheet -- \"$@\""; + apps.stylesheet = env.app [] "zig build stylesheet -- \"$@\""; # nix run .#zig2nix apps.zig2nix = env.app [] "zig2nix \"$@\""; diff --git a/layouts/root.shtml b/layouts/root.shtml index c76d513..5961a55 100644 --- a/layouts/root.shtml +++ b/layouts/root.shtml @@ -13,6 +13,11 @@ + + + + + @@ -25,6 +30,20 @@

+ +
+
    +
  1. +
    + +
    + Back +
    +
    +
  2. +
+
+