Skip to content
Browse files

Utils: Add the helper script used for nav snippets

This is really only valuable for the comments, which describe what's
going on with all the {% comment %} blocks in all those nav snippets.
  • Loading branch information...
1 parent 996d137 commit 8b9b043a8700694118b56b9738219cf79c22dd9e @nfagerlund nfagerlund committed Nov 6, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 util/nav-snippet-iflink-helper.pl
View
22 util/nav-snippet-iflink-helper.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl -n
+
+# NF: My hacky {% iflink %} tags are hard to read, so I like to put together nav snippets as something like this inside a {% comment %} block:
+
+# ## Hiera 1
+#
+# - `"Overview", "./index.html"`
+# - `"Complete Example", "./complete_example.html"`
+# - `"Installation", "./installing.html"`
+# - `"Configuration and hiera.yaml", "./configuring.html"`
+# - `"Hierarchies", "./hierarchy.html"`
+# - `"Writing Data Sources", "./data_sources.html"`
+# - `"Variables and Interpolation", "./variables.html"`
+# - `"Usage with Puppet", "./puppet.html"`
+# - `"Usage on the Command Line", "./command_line.html"`
+# - `"Writing New Backends", "./custom_backends.html"`
+
+# Then I convert it to HTML and replace the code spans using the script below.
+
+s/<code>/{% iflink /g;
+s/<\/code>/ %}/g;
+print;

0 comments on commit 8b9b043

Please sign in to comment.
Something went wrong with that request. Please try again.