From af97cdcd4997186fccc955b78577407604fd10ac Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Sat, 11 Apr 2020 20:20:27 -0500 Subject: instrumental software --- .gitignore | 1 + build.py | 9 ++++----- posts/a.md | 8 -------- posts/hello-world.md | 6 ------ posts/instrumental-software.md | 10 ++++++++++ posts/meta.md | 26 ++++++++++++++++++++++++++ public/a/index.html | 28 ---------------------------- public/a/style.css | 35 ----------------------------------- public/hello-world/index.html | 2 +- public/index.html | 12 ++++++------ templates/index.html | 2 +- 11 files changed, 49 insertions(+), 90 deletions(-) create mode 100644 .gitignore delete mode 100644 posts/a.md delete mode 100644 posts/hello-world.md create mode 100644 posts/instrumental-software.md create mode 100644 posts/meta.md delete mode 100644 public/a/index.html delete mode 100644 public/a/style.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..364fdec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ diff --git a/build.py b/build.py index 6afa673..d38dbcd 100755 --- a/build.py +++ b/build.py @@ -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 @@ - - - - - why not - - - - -

-blaise/blog/why not -

- -
- -

Header:

-

Markdown content

-

a

- -
- - - - - \ 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 @@
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!
This page lists my blog entries in reverse chronological order.
You may also browse by tag (coming soon).
-You may be interested in my meta post (coming soon).
+You may be interested in my meta post.
Thanks for stopping by! —Blaise

- 2020-04-11 - Hello world! + 2020-04-12 + instrumental-software
- 2020-04-10 - why not + 2020-04-11 + meta

@@ -36,7 +36,7 @@ Thanks for stopping by! —Blaise
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!
This page lists my blog entries in reverse chronological order.
You may also browse by tag (coming soon).
-You may be interested in my meta post (coming soon).
+You may be interested in my meta post.
Thanks for stopping by! —Blaise

-- cgit v1.2.3