aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-07-24 20:34:09 +0200
committerAdrian Kummerlaender2014-07-24 20:34:09 +0200
commit776c0031c05c8660fee8d1b06a2371cbb43248f9 (patch)
tree882b3db0ba09f484325a8101c1408bcc1c1ee79f
parent305eb17cd2d70c2e922b8997ada86b29329d660e (diff)
downloadblog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar.gz
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar.bz2
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar.lz
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar.xz
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.tar.zst
blog.kummerlaender.eu-776c0031c05c8660fee8d1b06a2371cbb43248f9.zip
Implemented basic article tagging facility
* articles are tagged by symlinking them to the appropriate "tag" in the "tags" directory * tags are resolved by the article datasource transformation * added tags for the example articles
l---------source/00_content/tags/cpp/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md1
l---------source/00_content/tags/cpp/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md1
l---------source/00_content/tags/cpp/2013-10-06_notizen_zu_cpp_und_unicode.md1
l---------source/00_content/tags/cpp/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md1
l---------source/00_content/tags/cpp/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md1
l---------source/00_content/tags/english/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md1
l---------source/00_content/tags/english/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md1
l---------source/00_content/tags/english/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md1
l---------source/00_content/tags/english/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md1
l---------source/00_content/tags/german/2013-10-06_notizen_zu_cpp_und_unicode.md1
-rw-r--r--source/02_data/articles.xsl13
-rw-r--r--source/03_result/article/article.xsl8
12 files changed, 30 insertions, 1 deletions
diff --git a/source/00_content/tags/cpp/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md b/source/00_content/tags/cpp/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md
new file mode 120000
index 0000000..43b8cb6
--- /dev/null
+++ b/source/00_content/tags/cpp/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md
@@ -0,0 +1 @@
+../../articles/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md \ No newline at end of file
diff --git a/source/00_content/tags/cpp/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md b/source/00_content/tags/cpp/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md
new file mode 120000
index 0000000..4433d6b
--- /dev/null
+++ b/source/00_content/tags/cpp/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md
@@ -0,0 +1 @@
+../../articles/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md \ No newline at end of file
diff --git a/source/00_content/tags/cpp/2013-10-06_notizen_zu_cpp_und_unicode.md b/source/00_content/tags/cpp/2013-10-06_notizen_zu_cpp_und_unicode.md
new file mode 120000
index 0000000..d1d5ff6
--- /dev/null
+++ b/source/00_content/tags/cpp/2013-10-06_notizen_zu_cpp_und_unicode.md
@@ -0,0 +1 @@
+../../articles/2013-10-06_notizen_zu_cpp_und_unicode.md \ No newline at end of file
diff --git a/source/00_content/tags/cpp/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md b/source/00_content/tags/cpp/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md
new file mode 120000
index 0000000..244d443
--- /dev/null
+++ b/source/00_content/tags/cpp/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md
@@ -0,0 +1 @@
+../../articles/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md \ No newline at end of file
diff --git a/source/00_content/tags/cpp/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md b/source/00_content/tags/cpp/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md
new file mode 120000
index 0000000..aaa5f45
--- /dev/null
+++ b/source/00_content/tags/cpp/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md
@@ -0,0 +1 @@
+../../articles/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md \ No newline at end of file
diff --git a/source/00_content/tags/english/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md b/source/00_content/tags/english/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md
new file mode 120000
index 0000000..43b8cb6
--- /dev/null
+++ b/source/00_content/tags/english/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md
@@ -0,0 +1 @@
+../../articles/2013-03-01_introduction_to_expressing_and_controlling_object_ownership_in_cpp11.md \ No newline at end of file
diff --git a/source/00_content/tags/english/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md b/source/00_content/tags/english/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md
new file mode 120000
index 0000000..4433d6b
--- /dev/null
+++ b/source/00_content/tags/english/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md
@@ -0,0 +1 @@
+../../articles/2013-04-27_declaring_functions_local_to_a_translation_unit_in_cpp.md \ No newline at end of file
diff --git a/source/00_content/tags/english/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md b/source/00_content/tags/english/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md
new file mode 120000
index 0000000..244d443
--- /dev/null
+++ b/source/00_content/tags/english/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md
@@ -0,0 +1 @@
+../../articles/2013-11-03_mapping_binary_structures_as_tuples_using_template_metaprogramming.md \ No newline at end of file
diff --git a/source/00_content/tags/english/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md b/source/00_content/tags/english/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md
new file mode 120000
index 0000000..aaa5f45
--- /dev/null
+++ b/source/00_content/tags/english/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md
@@ -0,0 +1 @@
+../../articles/2014-01-05_disabling_methods_in_implicitly_instantiated_class_template_specializations_in_cpp.md \ No newline at end of file
diff --git a/source/00_content/tags/german/2013-10-06_notizen_zu_cpp_und_unicode.md b/source/00_content/tags/german/2013-10-06_notizen_zu_cpp_und_unicode.md
new file mode 120000
index 0000000..d1d5ff6
--- /dev/null
+++ b/source/00_content/tags/german/2013-10-06_notizen_zu_cpp_und_unicode.md
@@ -0,0 +1 @@
+../../articles/2013-10-06_notizen_zu_cpp_und_unicode.md \ No newline at end of file
diff --git a/source/02_data/articles.xsl b/source/02_data/articles.xsl
index 508f435..7547cc7 100644
--- a/source/02_data/articles.xsl
+++ b/source/02_data/articles.xsl
@@ -22,6 +22,14 @@
<target mode="plain" value="articles.xml"/>
</xsl:variable>
+<xsl:template name="list_tags">
+ <xsl:param name="path"/>
+
+ <xsl:for-each select="../../tags/*[./file/full = $path]">
+ <tag><xsl:value-of select="name()"/></tag>
+ </xsl:for-each>
+</xsl:template>
+
<xsl:template match="files/articles/file[./extension = '.md']">
<xsl:variable name="content">
<xsl:call-template name="formatter">
@@ -37,6 +45,11 @@
<date>
<xsl:value-of select="substring(./name, 0, 11)"/>
</date>
+ <tags>
+ <xsl:call-template name="list_tags">
+ <xsl:with-param name="path" select="./full"/>
+ </xsl:call-template>
+ </tags>
<content>
<xsl:copy-of select="xalan:nodeset($content)/*[name() != 'h1']"/>
</content>
diff --git a/source/03_result/article/article.xsl b/source/03_result/article/article.xsl
index fa54a85..69ddf09 100644
--- a/source/03_result/article/article.xsl
+++ b/source/03_result/article/article.xsl
@@ -36,7 +36,13 @@
<xsl:call-template name="format-date">
<xsl:with-param name="date" select="./date"/>
<xsl:with-param name="format" select="'x. M Y'"/>
- </xsl:call-template> | Adrian Kummerländer
+ </xsl:call-template>
+ | <xsl:for-each select="tags/tag">
+ <a href="{$url}/tag/{.}">
+ <xsl:value-of select="."/>
+ </a>
+ </xsl:for-each>
+ | Adrian Kummerländer
</p>
<xsl:copy-of select="./content/*"/>
</div>