Fix tags to make daniel happy

Inspired by http://longqian.me/2017/02/09/github-jekyll-tag/

Fixes #2
This commit is contained in:
R. Tyler Croy 2018-12-07 21:25:38 -08:00
parent 754baa849c
commit cfc1d29d13
No known key found for this signature in database
GPG Key ID: E5C92681BEF6CEA2
116 changed files with 728 additions and 8 deletions

View File

@ -2,9 +2,14 @@
all:
LANG="en_US.UTF-8" jekyll build
publish:
drafts: tags
LANG="en_US.UTF-8" jekyll serve --drafts
tags:
./generate-tags
publish: tags
find files -iname "*.png" -type f -exec pngcrush -ow -noforce -reduce {} \;
jekyll build
rsync -acvz --delete _site/ clam:www.unethicalblogger.com/htdocs/
.PHONY: all drafts tags publish

View File

@ -11,7 +11,7 @@ gems:
- jekyll-paginate
lsi: false
exclude: ['README.markdown', 'drupal.rb', 'sync.sh', 'Makefile']
exclude: ['README.markdown', 'drupal.rb', 'sync.sh', 'Makefile', 'generate-tags']
# Used for the RSS feed generator
url: 'https://brokenco.de/'

View File

@ -0,0 +1,19 @@
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign ttags = post.tags | join:'|' | append:'|' %}
{% assign rawtags = rawtags | append:ttags %}
{% endfor %}
{% assign rawtags = rawtags | split:'|' | sort %}
{% assign site.tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:'|' %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
{% endunless %}
{% endif %}
{% endfor %}

View File

@ -1,3 +1,7 @@
{% if site.tags != "" %}
{% include collect-tags.html %}
{% endif %}
<!DOCTYPE html>
<html lang="en">
<head>

36
generate-tags Executable file
View File

@ -0,0 +1,36 @@
#!/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
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:
tag_filename = tag_dir + tag + '.md'
with open(tag_filename, 'w+') as fd:
fd.write('---\nlayout: tag_page\ntitle: \"Tag: ' + tag + '\"\ntag: ' + tag + '\nrobots: noindex\n---\n')
print("Tags generated, count", total_tags.__len__())

View File

@ -1,4 +0,0 @@
#!/bin/sh
rsync -acvz --delete _site/ clam:www.unethicalblogger.com/htdocs/

6
tag/ada.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: ada"
tag: ada
robots: noindex
---

6
tag/aks.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: aks"
tag: aks
robots: noindex
---

6
tag/alc.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: alc"
tag: alc
robots: noindex
---

6
tag/amber.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: amber"
tag: amber
robots: noindex
---

6
tag/async.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: async"
tag: async
robots: noindex
---

6
tag/aviation.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: aviation"
tag: aviation
robots: noindex
---

6
tag/azure.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: azure"
tag: azure
robots: noindex
---

6
tag/california.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: california"
tag: california
robots: noindex
---

6
tag/cicd.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: cicd"
tag: cicd
robots: noindex
---

6
tag/clipper.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: clipper"
tag: clipper
robots: noindex
---

6
tag/compost.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: compost"
tag: compost
robots: noindex
---

View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: continuousdelivery"
tag: continuousdelivery
robots: noindex
---

6
tag/copyleft.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: copyleft"
tag: copyleft
robots: noindex
---

6
tag/croyfamilyfarms.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: croyfamilyfarms"
tag: croyfamilyfarms
robots: noindex
---

6
tag/ctags.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: ctags"
tag: ctags
robots: noindex
---

6
tag/cycling.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: cycling"
tag: cycling
robots: noindex
---

6
tag/devops.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: devops"
tag: devops
robots: noindex
---

6
tag/docker.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: docker"
tag: docker
robots: noindex
---

6
tag/documentation.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: documentation"
tag: documentation
robots: noindex
---

6
tag/elasticsearch.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: elasticsearch"
tag: elasticsearch
robots: noindex
---

6
tag/epoll.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: epoll"
tag: epoll
robots: noindex
---

6
tag/europe.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: europe"
tag: europe
robots: noindex
---

6
tag/evergreen.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: evergreen"
tag: evergreen
robots: noindex
---

6
tag/expressjs.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: expressjs"
tag: expressjs
robots: noindex
---

6
tag/facter.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: facter"
tag: facter
robots: noindex
---

6
tag/feathers.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: feathers"
tag: feathers
robots: noindex
---

6
tag/feathersjs.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: feathersjs"
tag: feathersjs
robots: noindex
---

6
tag/fire.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: fire"
tag: fire
robots: noindex
---

6
tag/flying.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: flying"
tag: flying
robots: noindex
---

6
tag/food.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: food"
tag: food
robots: noindex
---

6
tag/fosdem.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: fosdem"
tag: fosdem
robots: noindex
---

6
tag/fosdem2015.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: fosdem2015"
tag: fosdem2015
robots: noindex
---

6
tag/freebsd.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: freebsd"
tag: freebsd
robots: noindex
---

6
tag/garden.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: garden"
tag: garden
robots: noindex
---

6
tag/german.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: german"
tag: german
robots: noindex
---

6
tag/github.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: github"
tag: github
robots: noindex
---

6
tag/gitops.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gitops"
tag: gitops
robots: noindex
---

6
tag/glade.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: glade"
tag: glade
robots: noindex
---

6
tag/google.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: google"
tag: google
robots: noindex
---

6
tag/gradle.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gradle"
tag: gradle
robots: noindex
---

6
tag/gradlegoodness.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gradlegoodness"
tag: gradlegoodness
robots: noindex
---

6
tag/groovy.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: groovy"
tag: groovy
robots: noindex
---

6
tag/gsoc.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gsoc"
tag: gsoc
robots: noindex
---

6
tag/gtk.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gtk"
tag: gtk
robots: noindex
---

6
tag/gtkada.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: gtkada"
tag: gtkada
robots: noindex
---

6
tag/hacksgiving.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: hacksgiving"
tag: hacksgiving
robots: noindex
---

6
tag/homeowner.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: homeowner"
tag: homeowner
robots: noindex
---

6
tag/hubboard.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: hubboard"
tag: hubboard
robots: noindex
---

6
tag/infra.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: infra"
tag: infra
robots: noindex
---

6
tag/infrastructure.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: infrastructure"
tag: infrastructure
robots: noindex
---

6
tag/javaone.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: javaone"
tag: javaone
robots: noindex
---

6
tag/javascript.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: javascript"
tag: javascript
robots: noindex
---

6
tag/jenkins.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jenkins"
tag: jenkins
robots: noindex
---

6
tag/jenkinsworld.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jenkinsworld"
tag: jenkinsworld
robots: noindex
---

6
tag/jruby.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jruby"
tag: jruby
robots: noindex
---

6
tag/jrubyconfeu.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jrubyconfeu"
tag: jrubyconfeu
robots: noindex
---

6
tag/jrubygradle.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jrubygradle"
tag: jrubygradle
robots: noindex
---

6
tag/jvm.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: jvm"
tag: jvm
robots: noindex
---

6
tag/kafka.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: kafka"
tag: kafka
robots: noindex
---

6
tag/kubernetes.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: kubernetes"
tag: kubernetes
robots: noindex
---

6
tag/linux.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: linux"
tag: linux
robots: noindex
---

6
tag/lookout.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: lookout"
tag: lookout
robots: noindex
---

6
tag/lookouteng.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: lookouteng"
tag: lookouteng
robots: noindex
---

6
tag/management.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: management"
tag: management
robots: noindex
---

6
tag/masochism.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: masochism"
tag: masochism
robots: noindex
---

6
tag/maven.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: maven"
tag: maven
robots: noindex
---

6
tag/minikube.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: minikube"
tag: minikube
robots: noindex
---

6
tag/miscellaneous.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: miscellaneous"
tag: miscellaneous
robots: noindex
---

6
tag/opendev.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: opendev"
tag: opendev
robots: noindex
---

6
tag/openinfra.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: openinfra"
tag: openinfra
robots: noindex
---

6
tag/opensource.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: opensource"
tag: opensource
robots: noindex
---

6
tag/opinion.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: opinion"
tag: opinion
robots: noindex
---

6
tag/personal.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: personal"
tag: personal
robots: noindex
---

6
tag/pfsense.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: pfsense"
tag: pfsense
robots: noindex
---

6
tag/pipeline.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: pipeline"
tag: pipeline
robots: noindex
---

6
tag/postgresql.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: postgresql"
tag: postgresql
robots: noindex
---

6
tag/presentation.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: presentation"
tag: presentation
robots: noindex
---

6
tag/programming.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: programming"
tag: programming
robots: noindex
---

6
tag/puppet.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: puppet"
tag: puppet
robots: noindex
---

6
tag/puppetconf.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: puppetconf"
tag: puppetconf
robots: noindex
---

6
tag/puppetlabs.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: puppetlabs"
tag: puppetlabs
robots: noindex
---

6
tag/rain.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: rain"
tag: rain
robots: noindex
---

6
tag/resin.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: resin"
tag: resin
robots: noindex
---

6
tag/rspec.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: rspec"
tag: rspec
robots: noindex
---

6
tag/ruby.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: ruby"
tag: ruby
robots: noindex
---

6
tag/santarosa.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: santarosa"
tag: santarosa
robots: noindex
---

6
tag/software.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: software"
tag: software
robots: noindex
---

6
tag/sofware.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: sofware"
tag: sofware
robots: noindex
---

6
tag/solo.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: solo"
tag: solo
robots: noindex
---

6
tag/sonoma.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: sonoma"
tag: sonoma
robots: noindex
---

6
tag/sonomafireinfo.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: sonomafireinfo"
tag: sonomafireinfo
robots: noindex
---

6
tag/spi.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: spi"
tag: spi
robots: noindex
---

6
tag/ssh.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: ssh"
tag: ssh
robots: noindex
---

6
tag/startupsonomaco.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: tag_page
title: "Tag: startupsonomaco"
tag: startupsonomaco
robots: noindex
---

Some files were not shown because too many files have changed in this diff Show More