From dd8e3a95fcd837938c6c20a4603cd9492d0980d5 Mon Sep 17 00:00:00 2001
From: Catalin Constantin Mititiuc spacing guild
@@ -11,11 +9,6 @@ $([[elixir
or the iex
command. Both will execute the code, but the second command opens an interactive IEx shell afterward. What if, we won't know until runtime whether we want a shell or not? How can we start an IEx session even when we use elixir
, instead of iex
, to run our script?"
...
-{
- id: "open-an-iex-shell-from-an-elixir-script"
-}
-
## Method 1
Here's a quick test script:
diff --git a/docs/2023-10-08-start-erlangs-dialyzer-with-gui-from-a-docker-container.md b/docs/2023-10-08-start-erlangs-dialyzer-with-gui-from-a-docker-container.md
index 36ee86c..76079d4 100644
--- a/docs/2023-10-08-start-erlangs-dialyzer-with-gui-from-a-docker-container.md
+++ b/docs/2023-10-08-start-erlangs-dialyzer-with-gui-from-a-docker-container.md
@@ -1,12 +1,12 @@
+{
+ id: "start-erlangs-dialyzer-with-gui-from-a-docker-container"
+}
+
---
title: "Start Erlang's Dialyzer With GUI From A Docker Container"
blurb: "Everything in OTP is command-line driven, so using containers during development has been without issue. But, Dialyzer, Erlang's static analysis tool, actually has a Graphical User Interface. How can we still use Dialyzer and its GUI even though Elixir is running inside a container?"
...
-{
- id: "start-erlangs-dialyzer-with-gui-from-a-docker-container"
-}
-
I use Docker mostly when working on software projects and I figured out how to get Erlang's Dialyzer GUI working in a Docker container.
1. Start a container with X11 forwarding:
diff --git a/docs/2023-10-16-fix-distortion-introduced-when-transforming-multiview-projections-to-isometric.md b/docs/2023-10-16-fix-distortion-introduced-when-transforming-multiview-projections-to-isometric.md
index d95bcfa..5f26c52 100644
--- a/docs/2023-10-16-fix-distortion-introduced-when-transforming-multiview-projections-to-isometric.md
+++ b/docs/2023-10-16-fix-distortion-introduced-when-transforming-multiview-projections-to-isometric.md
@@ -1,11 +1,11 @@
----
-blurb: "One thing we learned from a week of trying to make isometric vector drawings."
-...
-
{
id: "fix-distortion-introduced-when-transforming-multiview-projections-to-isometric"
}
+---
+blurb: "One thing we learned from a week of trying to make isometric vector drawings."
+...
+
## Objective
Construct an isometric vector image of an object from top, front, and side view projections (like [this](https://workforce.libretexts.org/Bookshelves/Drafting_and_Design_Technology/Introduction_to_Drafting_and_AutoCAD_3D_(Baumback)/02%3A_Part_2/2.01%3A_Module_7-_Visualizing_Multiview_Drawings), but using Inkscape instead of AutoCAD).
diff --git a/docs/2023-11-01-deploy-elixir-generated-html-with-docker-on-digitalocean.md b/docs/2023-11-01-deploy-elixir-generated-html-with-docker-on-digitalocean.md
index 249b0f1..e7e69ad 100644
--- a/docs/2023-11-01-deploy-elixir-generated-html-with-docker-on-digitalocean.md
+++ b/docs/2023-11-01-deploy-elixir-generated-html-with-docker-on-digitalocean.md
@@ -1,12 +1,12 @@
+{
+ id: "deploy-elixir-generated-html-with-docker-on-digitalocean"
+}
+
---
title: "Deploy Elixir-Generated HTML With Docker On DigitalOcean"
blurb: "This is a simple proof of concept where we create a boilerplate HTML file with Elixir, containerize our build process with Docker, and deploy our markup live with DigitalOcean's hosting service."
...
-{
- id: "deploy-elixir-generated-html-with-docker-on-digitalocean"
-}
-
## Introduction
DigitalOcean has this [App Platform](https://www.digitalocean.com/products/app-platform) service that can host a static website, as well as build it from a Docker image, if provided a `Dockerfile`. We thought a static website built by an Elixir app could be an instructive project. To explore if the idea is viable, we wrote a small Elixir application that generates a simple `index.html` file and deployed it live on DigitalOcean's service.
diff --git a/docs/2023-11-15-test-mix-task-file-modify.md b/docs/2023-11-15-test-mix-task-file-modify.md
index fc4a5d4..c3720d7 100644
--- a/docs/2023-11-15-test-mix-task-file-modify.md
+++ b/docs/2023-11-15-test-mix-task-file-modify.md
@@ -1,12 +1,12 @@
+{
+ id: "test-mix-task-file-modify"
+}
+
---
title: "Temporary Directories For Testing Mix Tasks That Modify Files"
blurb: "Writing a test for a simple Mix task gets surprisingly complex. Application environment variables, temporary test directories, and IO capture are all involved."
...
-{
- id: "test-mix-task-file-modify"
-}
-
## Intro
Last time, we added a Mix task to our project that writes an HTML file to a directory `/public` in the container's filesystem. Today, we will write a test for that task.
diff --git a/docs/2023-12-01-build-static-website-generator-part-1.md b/docs/2023-12-01-build-static-website-generator-part-1.md
index 5b75a2e..3d76a1a 100644
--- a/docs/2023-12-01-build-static-website-generator-part-1.md
+++ b/docs/2023-12-01-build-static-website-generator-part-1.md
@@ -1,12 +1,12 @@
+{
+ id: "build-static-website-generator-part-1"
+}
+
---
title: "Build A Static-Website Generator With Elixir, Part 1"
blurb: "We take the first steps in designing and implementing the \"world's simplest static-website generator\". Building on tools and knowledge we acquired previously, and utilizing an incremental and iterative development process, we go through the entire software life-cycle from creating the initial project files to deploying to production. We spare nothing, from spelling out every command, to ensuring application integrity with tests, and even updating the README file. Grab a drink and some snacks, and dive right in!"
...
-{
- id: "build-static-website-generator-part-1"
-}
-
::: info
This post was originally intended to be the first in a multi-part series.
However, the deeper we got into this project, the more we realized we were
diff --git a/index.html b/index.html
index 8dc0ba8..a03fad9 100644
--- a/index.html
+++ b/index.html
@@ -7,30 +7,7 @@
$render{"templates/wares"}
-
-$render{"moon-test"}
-
-
-$render{"home"}
-
Posts
-$each{posts, "post"}[[
-
-
- $post
-
-
-
-
- — blurb here
-
- Read post →
-
-asdfasdf
)
-
-$markdown{[[
-- this is markdown
-- also, sparta
-]]}
-
-$if{"val"}[[just some straight up text
]]
-
-$render{"templates/wares"}
-
-$render{"moon-test"}
-
-## Posts
-
-- [recursive]($root/posts/2023-08-03-recursively-list-all-files-in-a-directory-with-elixir.html)
-
-#### [View more posts]($root/posts/)
diff --git a/posts.moon b/posts.moon
new file mode 100644
index 0000000..3e24b13
--- /dev/null
+++ b/posts.moon
@@ -0,0 +1,80 @@
+-- html ->
+--
+-- posts = [{
+-- id: p.meta.id
+-- target: p.meta.target
+-- source: p.source
+-- } for _, p in pairs site.pages when p.meta.template == "blog"]
+--
+-- require("moon").p posts
+-- div { "this is a post" }
+-- div { "this anoter post" }
+
+-- date = require "date"
+-- return {
+-- format: "markdown"
+-- title: "My Site's Title"
+-- {
+-- title: "The First Post"
+-- date: date 2011, 11, 26
+-- link: "/my-post"
+-- description: [[
+-- The things I did.
+--
+-- * ordered pizza
+-- * ate it
+-- ]]
+-- }
+-- }
+
+--
+--
+-- Publish Markdown Documents As Static Web Pages with Pandoc and Phoenix
+--
+--
+--
+--
+-- — We thought we wanted a static website generator. It turns out what we really wanted was Phoenix, with an option to convert markdown to HTML. Here is our implementation of a solution, using our very own, recently-released, Pandoc Hex package!
+--
+-- Read post →
+--
+--
+
$wrap{"root"}
-templates/index.html
hi
]])
-
Hi, I'm Catalin Mititiuc
hi
]])
Hiring? Reach me by email.
- -$markdown{[[ -**We can embed markdown directly into an HTML file!** -]]} - $body diff --git a/templates/root.html b/templates/root.html index 1a4131b..1bccef3 100644 --- a/templates/root.html +++ b/templates/root.html @@ -14,6 +14,7 @@ +templates/root.html
templates/wares.html