diff options
author | Blaise Thompson <blaise@untzag.com> | 2020-04-11 20:20:27 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2020-04-11 20:20:27 -0500 |
commit | af97cdcd4997186fccc955b78577407604fd10ac (patch) | |
tree | a37aabfff8c873bdf868c662eb2cd49b22e90358 | |
parent | 5e2a82641aab330f9a94a74b5fa4386dd684d7f1 (diff) |
instrumental software
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | build.py | 9 | ||||
-rw-r--r-- | posts/a.md | 8 | ||||
-rw-r--r-- | posts/hello-world.md | 6 | ||||
-rw-r--r-- | posts/instrumental-software.md | 10 | ||||
-rw-r--r-- | posts/meta.md | 26 | ||||
-rw-r--r-- | public/a/index.html | 28 | ||||
-rw-r--r-- | public/a/style.css | 35 | ||||
-rw-r--r-- | public/hello-world/index.html | 2 | ||||
-rw-r--r-- | public/index.html | 12 | ||||
-rw-r--r-- | templates/index.html | 2 |
11 files changed, 49 insertions, 90 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..364fdec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ @@ -1,5 +1,4 @@ import os -from pprint import pprint import jinja2 import markdown import pathlib @@ -13,7 +12,7 @@ __here__ = pathlib.Path(__file__).resolve().parent date = datetime.now().strftime('%Y-%m-%d %H:%M:%S') -md = markdown.Markdown(extensions=['meta']) +md = markdown.Markdown(extensions=['meta', "toc"]) env = jinja2.Environment(loader = jinja2.FileSystemLoader(str(__here__ / "templates"))) @@ -39,7 +38,6 @@ for post in os.listdir(__here__ / "posts"): kwargs["date"] = md.Meta["date"][0] kwargs["content"] = content kwargs["path"] = post[:-3] - print(kwargs) posts.append(Post(**kwargs)) posts.sort(key=lambda p: p.date, reverse=True) @@ -62,6 +60,7 @@ with open(__here__ / "public" / "index.html", "w") as f: template = env.get_template("post.html") for post in posts: + print(post.path) if not os.path.isdir(__here__ / "public" / post.path): os.mkdir(__here__ / "public" / post.path) with open(__here__ / "public" / post.path / "index.html", "w") as f: @@ -73,5 +72,5 @@ for post in posts: template = env.get_template('style.css') for d, _, _ in os.walk(__here__ / "public", topdown=False): - with open(os.path.join(d, "style.css"), 'w') as fh: - fh.write(template.render()) + with open(os.path.join(d, "style.css"), 'w') as f: + f.write(template.render()) diff --git a/posts/a.md b/posts/a.md deleted file mode 100644 index c18feb5..0000000 --- a/posts/a.md +++ /dev/null @@ -1,8 +0,0 @@ -title: why not -date: 2020-04-10 - -Header: -------- -*Markdown content* - -a diff --git a/posts/hello-world.md b/posts/hello-world.md deleted file mode 100644 index b419d8d..0000000 --- a/posts/hello-world.md +++ /dev/null @@ -1,6 +0,0 @@ -title: Hello world! -date: 2020-04-11 - -Header: -------- -*Markdown content* diff --git a/posts/instrumental-software.md b/posts/instrumental-software.md new file mode 100644 index 0000000..763ce6b --- /dev/null +++ b/posts/instrumental-software.md @@ -0,0 +1,10 @@ +title: instrumental-software +date: 2020-04-12 + +# table of contents + +[TOC] + +# bluesky + +test 12
\ No newline at end of file diff --git a/posts/meta.md b/posts/meta.md new file mode 100644 index 0000000..0e5bcb8 --- /dev/null +++ b/posts/meta.md @@ -0,0 +1,26 @@ +title: meta +date: 2020-04-11 + +What is a "blog" to me, and why have I decided to create one? +What technologies enable this blog? + +# table of contents + +[TOC] + +# what + +For several years, I have tried to maintain a "brain" of heirarchial information for my personal notes. +Frankly, that experiment failed. +There was too much of a barier to entry for throwing information into the "brain", because the heirarchy required too much thought about where the information should go. + +That said, this "blog" has roughly the same purpose---organizing my personal notes. +Why do I share my blog publicly? +Honestly, the biggest reason is that privacy is a hassle, and by sharing these pages publicly I personally will be able to access them as easily as possible. Privacy is hard, and not worth doing poorly. I see no reason for this information to be private, so I choose to make it public. + +# how + +- posts are written in markdown. +- git to store and sync files between machines +- python to format org into html +- nginx to serve html diff --git a/public/a/index.html b/public/a/index.html deleted file mode 100644 index b7d65ac..0000000 --- a/public/a/index.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> - <title>why not</title> - <link rel="stylesheet" href="style.css"> -</head> -<body> - -<h1> -<a href=http://blaise.zone>blaise</a>/<a href=../>blog</a>/why not -</h1> - -<hr> - -<h2>Header:</h2> -<p><em>Markdown content</em></p> -<p>a</p> - -<hr> - -<ul class="horizontal"> - <li>built 2020-04-11 15:56:23</li> - <li><a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>: no copyright</li> -</ul> - -</body> -</html>
\ No newline at end of file diff --git a/public/a/style.css b/public/a/style.css deleted file mode 100644 index f1b4927..0000000 --- a/public/a/style.css +++ /dev/null @@ -1,35 +0,0 @@ -a { - text-decoration: none; - color: #81a2be; -} - -body { - font-family: sans-serif; - margin: 40px auto; - max-width: 650px; - line-height: 1.5; - font-size: 16px; - background-color: #1d1f21; - color: #c5c8c6; - padding: 0 10px; - text-align: left; -} - -.singlespaced { - line-height: 1; -} - -.horizontal { - display: flex; - list-style-type: none; - padding: 0; - justify-content: space-between; -} - -.tab30 { - margin-left: 30px; -} - -.tab60 { - margin-left: 60px; -}
\ No newline at end of file diff --git a/public/hello-world/index.html b/public/hello-world/index.html index 40456d8..1c9534a 100644 --- a/public/hello-world/index.html +++ b/public/hello-world/index.html @@ -19,7 +19,7 @@ <hr> <ul class="horizontal"> - <li>built 2020-04-11 15:56:23</li> + <li>built 2020-04-11 19:49:01</li> <li><a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>: no copyright</li> </ul> diff --git a/public/index.html b/public/index.html index 337a173..d508836 100644 --- a/public/index.html +++ b/public/index.html @@ -17,18 +17,18 @@ Welcome to my personal blog! <br> This page lists my blog entries in reverse chronological order. <br> You may also browse by tag (coming soon). <br> -You may be interested in my meta post (coming soon). <br> +You may be interested in my <a href=./meta/>meta</a> post. <br> Thanks for stopping by! —Blaise </p> <p> - 2020-04-11 - <a href=./hello-world>Hello world!</a> + 2020-04-12 + <a href=./instrumental-software>instrumental-software</a> <br> - 2020-04-10 - <a href=./a>why not</a> + 2020-04-11 + <a href=./meta>meta</a> <br> </p> @@ -36,7 +36,7 @@ Thanks for stopping by! —Blaise <hr> <ul class="horizontal"> - <li>built 2020-04-11 15:56:23</li> + <li>built 2020-04-11 20:16:52</li> <li><a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>: no copyright</li> </ul> diff --git a/templates/index.html b/templates/index.html index dbd6bd4..96fe662 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,7 +10,7 @@ Welcome to my personal blog! <br> This page lists my blog entries in reverse chronological order. <br> You may also browse by tag (coming soon). <br> -You may be interested in my meta post (coming soon). <br> +You may be interested in my <a href=./meta/>meta</a> post. <br> Thanks for stopping by! —Blaise </p> |