Skip to content


Subversion checkout URL

You can clone with
Download ZIP
New format and content for
Awk CSS Ruby
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

README web-site restructuring

Directory Structure

 _posts/      - 'pages', after conversion to markdown
                Jekyll will compile those into posts.

 _config.yml  - Jekyll configuration, more options:

 _layout/     - Jekyll layout files (html)

 _plugins/    - Ruby/Jekyll plugins

 css          - Custom CSS files for the website.
                referenced by files in '_layout'.

 html_pages   - Original (not modified) HTML pages from
                Eventually, all files will be converted to markdown
                and moved to '_posts/'

 lib          - Containing downloadable AWK scripts,
                referenced from files in '_posts/' .
                Originally from

                See: ./_posts/
                and  ./lib/awk/eliza.awk

 Makefile     - Convenience trick to build website with 'make'

 README       - This file.

 _site/*      - Contains the compiled static HTML site.
                Will be generated when running 'make'.

Converting HTML Pages to Markdown Posts

1. Grab a file from './html_pages/'
2. Create a corresponding file in './_posts/' .
    1. The filename MUST be: `` .
       This is a Jekyll constraint.
       I use 1979-01-01 for unknown dates.
    2. The file MUST start with YAML-front-Matter
       Otherwise it will not be processed properly.
    3. Convert the HTML content to Markdown.
       WARNING: automatic conversion with PANDOC sometimes misses stuff.
    4. If needed, add corresponding AWK files in './lib/awk'.
3. Compile the website (run `make`).
4. Test the new post (the `index.html` page contains links to all pages).
5. Delete the old HTML page
6. Commit changes to git hub.


Perhaps agree upon list of TAGS (included in the YAML front-matter in each
post file) to represent content?

fun - 'fun' (as opposed to 'productive') content
working_example - has a working downloadable AWK example in the './lib/' directory.
                  (after testing that it works in recent GAWK).
anecdotal  - contains anecdotal stories, or history related to awk?
productive - 'productive' examples? (such that can help you in your daily work)
tutorial   - A tutorial (detailed examples / explanations)
TODO       - More work is required on this post.
posix      - The example is posix compliant
gawk_extension - The example is not posix compliant
dead_links - The post contains dead-links

others? suggestions are welcomed.

Including Examples in Posts

1. Store (hopefully a fully functioning) example file in ./lib/awk/XXX.awk
2. Use the 'insert_example' tag to include the example in the post.
   This saves the need to copy&paste the example code.
3. To add syntax-highlighting, put:
     {% highlight awk %}
     {% insert_example lib/awk/99_bottles_weske.awk %}
     {% endhighlight %}

4. Add a link to download the example file:
    (Download [99_bottles_weske.awk]({{site.baseurl}}/lib/awk/99_bottles_weske.awk))

5. Uses the './_plugins/insert_example.rb' plug-in.
   (Note: plugins won't work in github pages, only on locally run Jekylls).

6. See `_post/` for a working example.


For minimum effort and maximum results, I added CDN'd JQuery and Bootstrap
(included in `_layout/default.html`) . In the final website, we can change those
to whatever is needed.

Useful links

Jekyll Introduction:

Jekyll Template Data (=variables available in templates):

Liquid Template System (=commands usable in templates):
 full docs:
 quick ref:

Markdown syntax:

To re-build the static website, run 'jekyll' or 'make' .

The main page will be ./_site/index.html .

Something went wrong with that request. Please try again.