diff --git a/code.md b/code.md new file mode 100644 index 0000000..c643eae --- /dev/null +++ b/code.md @@ -0,0 +1,48 @@ +## `heex` + +```heex +<.header> + Listing Posts + + +<.table id="posts" rows={@posts} row_click={&JS.navigate(~p"/posts/#{&1}")}> + <:col :let={post} label="id"><%= post.id %> + <:action :let={post}> +
+ <.link navigate={~p"/posts/#{post}"}>Show +
+ + +``` + +## `elixir` + +```elixir +if config_env() != :prod do + # Configure pandoc (the version is required) + config :pandoc, + version: "3.6.1", + hello: [ + args: fn extra_args -> + {_, [input_file], _} = OptionParser.parse(extra_args, switches: []) + ~w(--output=../priv/static/posts/#{Path.rootname(input_file)}.html) + end, + cd: Path.expand("../documents", __DIR__) + ] +end +``` + +## `moonscript` + +```moon +class Thing + name: "unknown" + +class Person extends Thing + say_name: => print "Hel#lo, I am #{@name}!" + +with Person! + .name = "MoonScript" + \say_name! +``` + diff --git a/html/.gitignore b/html/.gitignore index f45c541..295048a 100644 --- a/html/.gitignore +++ b/html/.gitignore @@ -1,16 +1,5 @@ app.css +code.html index.html moonscript.css -posts/build-a-neovim-qt-appimage-from-source.html -posts/build-static-website-generator-part-1.html -posts/deploy-elixir-generated-html-with-docker-on-digitalocean.html -posts/fix-distortion-introduced-when-transforming-multiview-projections-to-isometric.html -posts/index.html -posts/open-an-iex-shell-from-an-elixir-script.html -posts/publish-markdown-documents-as-static-web-pages-with-pandoc-and-phoenix.html -posts/recursively-list-all-files-in-a-directory-with-elixir.html -posts/resize-a-qemu-disk-image.html -posts/set-up-a-gitweb-server.html -posts/start-erlangs-dialyzer-with-gui-from-a-docker-container.html -posts/test-mix-task-file-modify.html pygments.css \ No newline at end of file diff --git a/index.html b/index.html index 7afb924..ec3575c 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,3 @@ -
- $render{"test"} -
- $render{"templates/wares"}

Posts

diff --git a/site.moon b/site.moon index 26cc5fd..b9f2f7c 100644 --- a/site.moon +++ b/site.moon @@ -120,8 +120,12 @@ sitegen.create => } for path in *files add "index.html", title: "Catalin Mititiuc" - add "blog.html", title: "Posts", target: "posts/index", template: "blog" - add_all files_from "docs" + -- add "blog.html", title: "Posts", target: "posts/index", template: "blog" + add "code.md", + template: "post" + title: "Code Syntax Highlight Samples" + publish_date: format_date date true + -- add_all files_from "docs" copy "app.css" copy "moonscript.css"