diff options
| -rw-r--r-- | config.toml | 6 | ||||
| -rw-r--r-- | content/blog/no-ssh-to-prod.md | 10 | ||||
| -rw-r--r-- | templates/index.html | 6 | ||||
| -rw-r--r-- | templates/page.html | 8 | ||||
| -rw-r--r-- | templates/tags/list.html | 12 | ||||
| -rw-r--r-- | templates/tags/single.html | 12 |
6 files changed, 49 insertions, 5 deletions
diff --git a/config.toml b/config.toml index 88f9a3e..fd294a2 100644 --- a/config.toml +++ b/config.toml @@ -11,9 +11,13 @@ default_language = "en" generate_feeds = true feed_filenames = ["feed.xml"] +taxonomies = [ + {name = "tags", feed = false}, +] + [markdown] highlight_code = true -highlight_theme = "zenburn" +highlight_theme = "one-dark" render_emoji = true smart_punctuation = true diff --git a/content/blog/no-ssh-to-prod.md b/content/blog/no-ssh-to-prod.md index 71ad595..9c2d20a 100644 --- a/content/blog/no-ssh-to-prod.md +++ b/content/blog/no-ssh-to-prod.md @@ -1,7 +1,9 @@ ---- -title: No SSH to production -date: 2022-11-28 ---- ++++ +title = "No SSH to production" +date = 2022-11-28 +[taxonomies] +tags = ["practices"] ++++ It's not uncommon to hear talk about preventing engineers to SSH to production machines. While I think it's a noble goal, I think most organizations are not ready for it in the short or even medium term. diff --git a/templates/index.html b/templates/index.html index 9c8f98d..f1a8cbe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,4 +6,10 @@ {{ section.content | safe }} {% endif %} +<h2>Tags</h2> +{% set blogtags = get_taxonomy(kind="tags") %} +{% for tag in blogtags.items %} +<a href="{{ get_taxonomy_url(kind="tags", name=tag.name) }}">#{{ tag.name }}</a> +{% endfor %} + {%- endblock content -%} diff --git a/templates/page.html b/templates/page.html index ab19904..3474a07 100644 --- a/templates/page.html +++ b/templates/page.html @@ -5,6 +5,14 @@ {% block content -%} <h1>{{ page.title }}</h1> +{% if page.taxonomies.tags %} +<div class="tags"> + {% for tag in page.taxonomies.tags %} + <a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">#{{ tag }}</a> + {% endfor %} +</div> +{% endif %} + {{ page.content | safe -}} <p class="date">{{ page.date | date(format="%B %d, %Y") }}</p> diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..b7f904a --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +<h1>Tags</h1> +<ul> + {% for term in terms %} + <li> + <a href="{{ term.permalink }}">{{ term.name }}</a> ({{ term.pages | length }} posts) + </li> + {% endfor %} +</ul> +{% endblock content %} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..b276f93 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +<h1>Tag: {{ term.name }}</h1> +<ul> + {% for page in term.pages %} + <li> + <a href="{{ page.permalink }}">{{ page.title }}</a> - {{ page.date }} + </li> + {% endfor %} +</ul> +{% endblock content %} |
