Add generated tag pages
Whenever new tags are added, the generate-tags script must be run and new tag page stubs committed Fixes #44
This commit is contained in:
parent
b6c7b874d6
commit
1841dfc232
|
@ -4,7 +4,7 @@
|
|||
<ul class="post-sidebar__tag-list">
|
||||
<li class="post-sidebar__tag-label fw-bold">Tag {%- if page.tags.size > 1 -%}s{%- endif -%}: </li>
|
||||
{% for tag in page.tags %}
|
||||
<li class="post-sidebar__tags">{{ tag }}</li>
|
||||
<li class="post-sidebar__tags"><a href="/tag/{{ tag }}/">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
layout: default
|
||||
---
|
||||
|
||||
<!-- Featured post hero -->
|
||||
{% include featured-post-hero.html %}
|
||||
{% unless page.url contains 'tag' %}
|
||||
<!-- Featured post hero -->
|
||||
{% include featured-post-hero.html %}
|
||||
{% endunless %}
|
||||
|
||||
<div class="post-index" id="{{ site.post-id | remove: "#" }}">
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
layout: post-index
|
||||
title: page.tag
|
||||
---
|
||||
|
||||
<ul class="post-list text-length-lg">
|
||||
{% for post in site.tags[page.tag] %}
|
||||
{% include post-list-item.html %}
|
||||
{% endfor %}
|
||||
</ul>
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
|
||||
post_dir = '_posts/'
|
||||
tag_dir = 'tag/'
|
||||
|
||||
total_tags = []
|
||||
for filename in glob.glob(post_dir + '*.md'):
|
||||
matcher = r'^tags:$'
|
||||
with open(filename, 'r') as fd:
|
||||
tagged_line = False
|
||||
for line in fd.xreadlines():
|
||||
if tagged_line:
|
||||
if line.startswith('---'):
|
||||
tagged_line = False
|
||||
elif not line.startswith('-'):
|
||||
tagged_line = False
|
||||
else:
|
||||
total_tags.append(line[1:].strip())
|
||||
if re.match(matcher, line):
|
||||
tagged_line = True
|
||||
|
||||
total_tags = set(total_tags)
|
||||
|
||||
for tag in glob.glob(tag_dir + '*.md'):
|
||||
os.remove(tag)
|
||||
|
||||
if not os.path.exists(tag_dir):
|
||||
os.makedirs(tag_dir)
|
||||
|
||||
for tag in total_tags:
|
||||
td = os.path.sep.join([tag_dir, tag])
|
||||
if not os.path.exists(td):
|
||||
os.makedirs(td)
|
||||
with open(os.path.sep.join([td, 'index.md']), 'w+') as fd:
|
||||
fd.write('---\nlayout: tag_page\ntitle: \"Tag: ' + tag + '\"\ntag: ' + tag + '\nrobots: noindex\n---\n')
|
||||
print("Tags generated, count", total_tags.__len__())
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: 2020"
|
||||
tag: 2020
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: abstraction"
|
||||
tag: abstraction
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: accessibility"
|
||||
tag: accessibility
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: airflow-series"
|
||||
tag: airflow-series
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: airflow"
|
||||
tag: airflow
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: aws"
|
||||
tag: aws
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: data"
|
||||
tag: data
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: dataeng"
|
||||
tag: dataeng
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: datapipe"
|
||||
tag: datapipe
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: dependency injection"
|
||||
tag: dependency injection
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: design"
|
||||
tag: design
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: di-series"
|
||||
tag: di-series
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: docker"
|
||||
tag: docker
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: ecr"
|
||||
tag: ecr
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: featured"
|
||||
tag: featured
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: frontend"
|
||||
tag: frontend
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: iam"
|
||||
tag: iam
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: incident response"
|
||||
tag: incident response
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: kafka"
|
||||
tag: kafka
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: lc-series"
|
||||
tag: lc-series
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: live-collections"
|
||||
tag: live-collections
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: ltr"
|
||||
tag: ltr
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: machinelearning"
|
||||
tag: machinelearning
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: meetup"
|
||||
tag: meetup
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: ml-platform-series"
|
||||
tag: ml-platform-series
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: mlflow"
|
||||
tag: mlflow
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: msk-series"
|
||||
tag: msk-series
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: msk"
|
||||
tag: msk
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: oncall"
|
||||
tag: oncall
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: pagerduty"
|
||||
tag: pagerduty
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: pytorch"
|
||||
tag: pytorch
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: react"
|
||||
tag: react
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: remote"
|
||||
tag: remote
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: scribd"
|
||||
tag: scribd
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: search"
|
||||
tag: search
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: security"
|
||||
tag: security
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: seo"
|
||||
tag: seo
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: seq2seq"
|
||||
tag: seq2seq
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: spark"
|
||||
tag: spark
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: swift"
|
||||
tag: swift
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: testing"
|
||||
tag: testing
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: toronto"
|
||||
tag: toronto
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: weaver"
|
||||
tag: weaver
|
||||
robots: noindex
|
||||
---
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: tag_page
|
||||
title: "Tag: webpack"
|
||||
tag: webpack
|
||||
robots: noindex
|
||||
---
|
Loading…
Reference in New Issue