From 89edfd2d8c09a37a0fff07be45036aa40bbb096c Mon Sep 17 00:00:00 2001 From: dennisbrookner Date: Wed, 18 Jan 2023 15:56:56 -0500 Subject: [PATCH 1/3] simple blog page for writing markdown articles --- _data/navbar.yml | 2 ++ _layouts/base_page.html | 2 +- _layouts/post.html | 8 ++++++++ _posts/2023-01-18-Example-Post.md | 14 ++++++++++++++ blog.html | 16 ++++++++++++++++ publications.md | 2 +- 6 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 _layouts/post.html create mode 100644 _posts/2023-01-18-Example-Post.md create mode 100644 blog.html diff --git a/_data/navbar.yml b/_data/navbar.yml index 4482f04..ddc2d5f 100644 --- a/_data/navbar.yml +++ b/_data/navbar.yml @@ -6,3 +6,5 @@ link: /contact.html - name: Publications link: /publications.html +- name: Blog + link: /blog.html diff --git a/_layouts/base_page.html b/_layouts/base_page.html index 2ea6195..a160c6f 100644 --- a/_layouts/base_page.html +++ b/_layouts/base_page.html @@ -33,7 +33,7 @@ - + diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..2ee6a1a --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,8 @@ +--- +layout: content_page +--- +

{{ page.title }}

+

{{ page.subtitle }}

+

{{ page.date | date_to_string }}

+ +{{ content }} \ No newline at end of file diff --git a/_posts/2023-01-18-Example-Post.md b/_posts/2023-01-18-Example-Post.md new file mode 100644 index 0000000..5fa19af --- /dev/null +++ b/_posts/2023-01-18-Example-Post.md @@ -0,0 +1,14 @@ +--- +layout: post +title: Example post +subtitle: Subtitle should also render underneath, on the page and on the article list +--- + +This is the post itself, written in markdown. **Bold** and *italics* text are supported, as is `inline code`. +Even code blocks! +```python +import numpy as np + +np.zeros((5,5)) + +``` \ No newline at end of file diff --git a/blog.html b/blog.html new file mode 100644 index 0000000..911a80f --- /dev/null +++ b/blog.html @@ -0,0 +1,16 @@ +--- +layout: content_page +title: Blog +--- + +

Reciprocal Space Station Blog

+A place for explanations and elaborations from the RS-station astronauts. + +
+ +{% for post in site.posts %} +

{{ post.title }}

+{{ post.subtitle }} +
+
+{% endfor %} \ No newline at end of file diff --git a/publications.md b/publications.md index 021f67b..49f518b 100644 --- a/publications.md +++ b/publications.md @@ -9,7 +9,7 @@ The following publications make use of RSS packages. If there's a paper we're mi {% for pub in site.data.publications %} - [{{ pub.title }}]({{ pub.url}}). {{ pub.authors }}. *{{ pub.info }}* {% endfor %} - +--- ## How to cite If you're making use of any RSS packages, amazing! Please cite them as follows: From b8b350797085b7c59b5647d4c5f54e40f7994b22 Mon Sep 17 00:00:00 2001 From: dennisbrookner Date: Wed, 18 Jan 2023 16:20:31 -0500 Subject: [PATCH 2/3] add support for mathjax --- _layouts/base_page.html | 7 +++++++ _posts/2023-01-18-Example-Post.md | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/_layouts/base_page.html b/_layouts/base_page.html index a160c6f..f9dea9d 100644 --- a/_layouts/base_page.html +++ b/_layouts/base_page.html @@ -34,6 +34,13 @@ + + + {% if page.usemathjax %} + + {% endif %} diff --git a/_posts/2023-01-18-Example-Post.md b/_posts/2023-01-18-Example-Post.md index 5fa19af..f04cd72 100644 --- a/_posts/2023-01-18-Example-Post.md +++ b/_posts/2023-01-18-Example-Post.md @@ -2,6 +2,7 @@ layout: post title: Example post subtitle: Subtitle should also render underneath, on the page and on the article list +usemathjax: true --- This is the post itself, written in markdown. **Bold** and *italics* text are supported, as is `inline code`. @@ -11,4 +12,6 @@ import numpy as np np.zeros((5,5)) -``` \ No newline at end of file +``` +mathjax works! +$$\Sigma \sim \mathrm{Normal}\left(\mu, \sigma\right)$$ \ No newline at end of file From fb21eaaec308a99479be3f4c7bfc828c8a243b92 Mon Sep 17 00:00:00 2001 From: dennisbrookner Date: Wed, 18 Jan 2023 16:22:11 -0500 Subject: [PATCH 3/3] async mathjax script --- _layouts/base_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/base_page.html b/_layouts/base_page.html index f9dea9d..b6f08f1 100644 --- a/_layouts/base_page.html +++ b/_layouts/base_page.html @@ -37,7 +37,7 @@ {% if page.usemathjax %} - {% endif %}