* rm-js-req TODOs

** Goals
*** WAIT Have SPA functionality when javascript is enabled
    - State "WAIT"       from "TODO"       [2015-08-13 Thu 05:22] \\
      Does have SPA functionality when javascript is enabled but still suffers from a [[link issue]]
*** Complete
**** DONE Remove the javascipt requirement (so that all urls can be viewed without javascript)
     CLOSED: [2015-08-10 Mon 22:57]
**** DONE Only generate one version of the site
     CLOSED: [2015-08-10 Mon 22:57]

** Benefits
   This refactor will have a couple added benefits. Namely:

   - The RSS feed which is currently slightly broken for the js version of the site will now
     function properly with no modification. The current issue with the RSS feed is that the
     links to the posts are to the snippets instead of the virtual address (Eg.
     /posts/some-post.html instead of /#/posts/some-post.html).
   - Having two files for every post is bad for search engines (SEO).

** Implementation
   In order to implement this, a reasonable size refactor needs to take place. Below is a list
   of things to be completed in order to successfully achieve the aforementioned goals.

*** TODO Fix issue with tag and pagination page generation <<link issue>>
    Currently URLs to paginated pages (which includes the blog and tag pages) are broken. They
    generate "/tags/*.html" instead of "/tags/*1.html".

    When the blog page and tag pages are paginated an extra file is generated that is not
    expected. For example, for the paginated blog, "/blog1.html through "/blogN.html" and
    "/blog.html" are generated. "/blog.html" is not expected to be generated and seems to be an
    artifact of pagination. It contains all blog posts (contained in "/blog1.html" through
    "/blogN.html").

*** Complete
**** CANCELED Modify nav URLs using javascript once page is loaded
     CLOSED: [2015-08-13 Thu 01:47]
     - State "CANCELED"   from "WAIT"       [2015-08-13 Thu 01:47] \\
       As virtual urls are no longer used and normal urls can be set using the HTML5 history api (via history.pushState), all URLs on the page will always be valid. So no modification to the links of any kind needs to take place.
     - State "WAIT"       from "TODO"       [2015-08-12 Wed 02:54] \\
       This hasn't been done and doesn't need to be, as the rel attributes on the anchor tags
       within the nav are 'picked up' by jquery-address and treated correctly (using the
       clientside router).

     If it is indeed enabled then the user can benefit from the SPA functionality of the site.
     Otherwise they will be able to browse the site using the original, unmodified links. This is
     similar to how the link withing the page-content div work currently, and mainly would have to
     be adapted for the navigation.
**** DONE Fix ajax page loading
     CLOSED: [2015-08-12 Wed 02:41]
     Pages don't load properly when javascript is enabled.
**** DONE Generate nav with href pointing to normal urls, not virtual ones
     CLOSED: [2015-08-10 Mon 22:55]
     (Eg. /pages/blog.html instead of #/blog.html)
     Note: must be relative urls (via relativizeUrls)
**** DONE Generate pages/* to /
     CLOSED: [2015-08-10 Mon 22:56]
     Instead of having the default version
**** DONE Generate complete pages (no snippets)
     CLOSED: [2015-08-10 Mon 22:57]
     The enhanced javascipt additions to the site will then have to extract the page-content div
     before loading it into the page.
**** DONE Replace jquery-address with use of window.history.pushState
     CLOSED: [2015-08-13 Thu 05:21]
     window.history.pushState(object, title, url) can be used to set the browsers url without
     relading the page and without breaking browser history. It also doesn't use hashes in the
     url and thus urls appear 'normal' and thus will work without modification with or without
     javascript.

     This will fix the issue where if the initial landing page is any other page besides "/"
     like "/blog.html" for example, and then a link is clicked, like for example the 'contact'
     navigation link, then the url will be "/blog.html#/contact.html" which will indeed load
     properly but is ugly and worse, means there are many different ways to get to the 'same
     page'.

     See: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
