From 058a73b15925ec2dbc2976789cd63fc08f09a3c9 Mon Sep 17 00:00:00 2001 From: Erik Grobecker Date: Thu, 3 Oct 2024 17:07:46 +0200 Subject: [PATCH] I dont know what Im doing --- .gitignore | 1 + TODO.md | 9 ++++ config.toml | 22 +++++---- content/_index.md | 6 +-- content/blog/_index.md | 4 +- content/blog/assets/cetz.typ | 21 +++++++++ content/blog/format-comparison.md | 75 +++++++++++++++++++++++++++++++ content/blog/test.md | 31 ++++++++++--- justfile | 11 +++++ 9 files changed, 161 insertions(+), 19 deletions(-) create mode 100644 .gitignore create mode 100644 TODO.md create mode 100644 content/blog/assets/cetz.typ create mode 100644 content/blog/format-comparison.md create mode 100644 justfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85a1daf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/public \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..e95f088 --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ + +- blog articels to write +- [ ] typst + - [ ] cetz + - [ ] common thing (guides, etc.) +- [ ] zola (the ssg) + +general task: +- [ ] writing a justfile (for `just`) \ No newline at end of file diff --git a/config.toml b/config.toml index 77b79e7..ea8847f 100644 --- a/config.toml +++ b/config.toml @@ -10,6 +10,8 @@ compile_sass = true # Whether to build a search index to be used later on by a JavaScript library build_search_index = true +author = "Erik" + # smart_punctuation = true # bottom_footnotes = true @@ -22,6 +24,7 @@ smart_punctuation = true bottom_footnotes = true extra_syntaxes_and_themes = ["syntaxes/"] + [extra] # Put all your custom variables here default_theme = "dark" @@ -32,13 +35,15 @@ katex = true accent_color = "#ff7800" # Ditto but for the dark theme. # If not set regular variant will be used. -accent_color_dark = "#ffa348" +accent_color_dark = "#380891" # Ditto but for the dark theme. fix_contrast_dark = true show_read_time = true +show_copy_button = true + [extra.nav] # Whether to show the Atom/RSS feed button in the nav show_feed = true @@ -51,12 +56,13 @@ show_repo = true # i.e. "@/blog/_index.md". # See https://www.getzola.org/documentation/content/linking/#internal-links links = [ - { name = "Links", menu = [ - { url = "@/blog/_index.md", name = "Blog" }, - # { url = "@/demo/index.md", name = "Demo" }, - # { url = "@/mods/index.md", name = "Mods" }, - ] }, - { url = "https://daudix.one/coffee/", name = "Coffee" }, + # { name = "Links", menu = [ + # { url = "@/blog/_index.md", name = "Blog" }, + # # { url = "@/demo/index.md", name = "Demo" }, + # # { url = "@/mods/index.md", name = "Mods" }, + # ] }, + { url = "@/blog/_index.md", name = "Blog"}, + # { url = "https://daudix.one/coffee/", name = "Coffee" }, ] [extra.footer] @@ -66,7 +72,7 @@ links = [ { url = "@/blog/_index.md", name = "Blog" }, # { url = "@/demo/index.md", name = "Demo" }, # { url = "@/mods/index.md", name = "Mods" }, - { url = "https://daudix.one/coffee/", name = "Coffee" }, + # { url = "https://daudix.one/coffee/", name = "Coffee" }, ] [extra.toc] diff --git a/content/_index.md b/content/_index.md index 37002b6..3927279 100644 --- a/content/_index.md +++ b/content/_index.md @@ -82,6 +82,6 @@ jgs~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~ ``` {% end %} -{% alert(note=true) %} -Although Duckquill is made based on the needs of [my website](https://daudix.one), I am very open to feature requests as long as they are somewhat useful to others, so if you need a feature/configuration that does not exist, feel free to open an issue, or better yet, a pull request! -{% end %} \ No newline at end of file +This blog is written using the wonderful engine [zola](https://www.getzola.org) and the [duckquill](https://duckquill.daudix.one) theme + +## asd \ No newline at end of file diff --git a/content/blog/_index.md b/content/blog/_index.md index 11a9f0b..87333a7 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,9 +1,9 @@ +++ -title = "Writings of Duck's Feet" +title = "Index of my blog" # sort_by = "date" template = "article_list.html" page_template = "article.html" paginate_by = 2 +++ -Welcome to my quack'in blog, I quack about various stuff, but mostly I'm a demo. \ No newline at end of file +Welcome to my blog, after this you can view my "beatiful" entries! \ No newline at end of file diff --git a/content/blog/assets/cetz.typ b/content/blog/assets/cetz.typ new file mode 100644 index 0000000..6d238e6 --- /dev/null +++ b/content/blog/assets/cetz.typ @@ -0,0 +1,21 @@ +#import "@preview/cetz:0.2.2" + +#cetz.canvas({ + import cetz.draw: * + import cetz.plot + plot.plot(size: (10, 4), x-tick-step: 2, y-tick-step: 50, + { + plot.add(domain: (-4, 4), + x => (x, calc.pow(x, 4) ), + label: $f(x)=x^4$ + ) + plot.add(domain: (-5, 6.34), + x => (x, calc.pow(x, 3)), + label: $f(x)=x^3$ + ) + plot.add(domain: (-10, 10), + x => (x, calc.pow(x, 2)), + label: $f(x) = x^2$ + ) + }) +}) \ No newline at end of file diff --git a/content/blog/format-comparison.md b/content/blog/format-comparison.md new file mode 100644 index 0000000..4bda3a6 --- /dev/null +++ b/content/blog/format-comparison.md @@ -0,0 +1,75 @@ ++++ +title = "Comparison of some formats" +draft = true +insert_anchor_links = "left" + +[extra] +hot = true +katex = true ++++ + +- [ ] comparison table +- [ ] markdown + - [ ] math + - [ ] exportability + - [ ] programmability +- [ ] typst + - [ ] math + - [ ] exportability + - [ ] programmability +- [ ] latex + - [ ] math + - [ ] exportability + - [ ] programmability + +| | Markdown | Typst | Latex | +| :--- | :---| :--- | :--- | +| Math support | only using latex| great | great with an enormous community behind it +| Exportability | +| Programmability[^1] + +[^1]: like plotting, etc. + +## Markdown + +## Typst + +### Math support + +

Typst

+ +In Typst we can plot using the `cetz` library like this: +```typst +#import "@preview/cetz:0.2.2" + +#cetz.canvas({ + import cetz.draw: * + import cetz.plot + plot.plot(size: (10, 4), x-tick-step: 2, y-tick-step: 50, + { + plot.add(domain: (-4, 4), + x => (x, calc.pow(x, 4) ), + label: $f(x)=x^4$ + ) + plot.add(domain: (-5, 6.34), + x => (x, calc.pow(x, 3)), + label: $f(x)=x^3$ + ) + plot.add(domain: (-10, 10), + x => (x, calc.pow(x, 2)), + label: $f(x) = x^2$ + ) + }) +}) +``` + +Which leads to this: + +
+ {{image(url="https://files.catbox.moe/tplzsb.png")}} + +
some standard functions
+
+ +## Latex + diff --git a/content/blog/test.md b/content/blog/test.md index 10220df..e048be0 100644 --- a/content/blog/test.md +++ b/content/blog/test.md @@ -1,10 +1,19 @@ ---- -title: "test" ---- ++++ +title = "test" +draft = true +insert_anchor_links = "left" +tags = [ "typst" ] +render = true -# asd +[extra] +# poor = true ++++ -```Typst + + +## Code block tests + +```typst #cetz.canvas({ import cetz.draw: * import cetz.plot @@ -18,4 +27,14 @@ title: "test" }) ``` -=> \ No newline at end of file + +- [x] create/fix copy button +
+ Fix + I had to activate `show_copy_button = true` in my `config.toml`\ + STRG + C & STRG + V saved my day again (along some STRG + F of course!) +
+ +## Typst renders + + diff --git a/justfile b/justfile new file mode 100644 index 0000000..fa0e549 --- /dev/null +++ b/justfile @@ -0,0 +1,11 @@ +# use PowerShell instead of sh: +set shell := ["powershell.exe", "-c"] + + +# view the blog as it would be published in a browser +view: + zola serve + +# view the blog with drafts in a browser +view-drafts: + zola serve --drafts \ No newline at end of file