Permalink
Commits on Sep 24, 2015
  1. Add support for DevMode Debug/Tracer

    aslakknutsen committed Apr 5, 2015
    Enable by adding ?debug to any URL
Commits on Apr 6, 2015
  1. Remove CSS framework version dependencies from Awestruct

    aslakknutsen committed Apr 6, 2015
    Move selection of CSS framework to Gemfile created during
    initialization of a new site.
    
    It should be up to each site to determine given version of e.g.
    bootstrap.
  2. Add regenerate on Page HTTP Request access

    aslakknutsen committed Mar 29, 2015
    Add support for triggering generation of output on
    page access via WebServer instead of on page save.
    
    The reverse lookup allow us to regenerate only the requested page
    and not all the dependent pages or pages that use the given changed
    layout.
    
    Note: Only intended in development mode
    
    Enabled by default in dev mode:
    
        awstruct -d -P development
    
    Diabled via: --no-generate-on-access
    
    Can be used in combination with LiveReload, where backend will
    send updated URL's to LiveReload on Page save and normal LiveReload
    update Request will trigger regeneration.
    
    If Guard/LiveReload is disabled, --no-livereload, generate-on-access
    will be disabled and page and dependency generation will happen on save.
    
    Generate on access can be used without a connected LiveReload client,
    but then requires manual refresh.
    
    Generate on access will disable the full site generation on startup. To
    regenerate the complete site after dev is done one should use:
    
        awestruct -g
Commits on Dec 17, 2014
  1. Allow to turn off LiveReload integration

    aslakknutsen committed Dec 17, 2014
    Use cli argument --no-livereload
Commits on Aug 21, 2014
  1. Update bootstrap initial generation to use Bootstrap 3

    aslakknutsen committed Aug 21, 2014
    fixes #430
Commits on Oct 22, 2013
  1. Only attempt to render content with Tilt if delegate has any content

    aslakknutsen committed Oct 22, 2013
    Calling Tilt with a empty Textile doc cause error on JRuby. This can
    happend when a file only contain front matter metadata and has no
    real content to render on it's own.
    
    Simply check if delegate has any content, if it does call the tilt template.
Commits on Oct 10, 2013
  1. Lock down Listen API to < 2.0

    aslakknutsen committed Oct 10, 2013
    Listen API has changed from the use of listen.change &block
    to Listen.to() &block.
Commits on Mar 9, 2013
  1. Add FrontMatterHandler to AsciiDoc Chain to void duplication

    aslakknutsen committed Mar 9, 2013
    Fixes issue with AsciiDoc rendering the front matter as
    if it was part of the source. content_line_offset handled by
    the front matter handler and delegated down
Commits on Mar 8, 2013
  1. Do not fail on loading optional extensions

    aslakknutsen committed Mar 8, 2013
    htmlcompressor, coffee-script and uglifier are optional
    dependencies, but required by the minfiy and coffeescripttransformer.
  2. Add bidirectional front matter <-> header AsciiDoc mapping

    aslakknutsen committed Mar 8, 2013
    This allows Awstruct to consume AsciiDoc's Headers as
    Page variables and AsciiDoc to use Awestuct's Page variables
    as Header values.
Commits on Feb 25, 2013
  1. Update Spec to match new OrgMod output

    aslakknutsen committed Feb 25, 2013
    CI is failing due to changes in OrgMod's rendered output.
    
    <h1 class="title"> is now rendered as <h1>
Commits on Feb 6, 2013
  1. Move template rendering to use Tilt

    aslakknutsen committed Jan 30, 2013
    All engines supported by Tilt are now rendered by the Tilt Template.
    The Engines supported by Awestruct but not Tilt has been rewritten to
    use the Tilt Template interface (except cli based ones).
    
    Add support for default-site.yml, loaded as default values for a site.
    
    Adding special options to Tilt backing Engines can be done by either:
     * defining options based on file extension under site
        e.g. site.haml.value: aa
     * definind options based on engine name
        e.g. Tilt::RedClothTemplate, site.redcloth.value: aa
    
    Moved xx_handler_spec.rb over to use a common shared base handler.
    
    content_syntax mapping for file extensions where input_extesion !=
    content_syntax can be found in default-site.yml. input_extension
    will be looked up in site['content_syntax'][input_extension].
    The found value will be used as a symbol if found, else input_extesion
    as a symbol will be used.
Commits on Nov 1, 2012
  1. Move :html, :js and :css compression from using cmd to ruby gems

    aslakknutsen committed Nov 1, 2012
    The minfiy extension rely on calling yuicompressor and htmlcompressor on
    the command line with no control if they are installed or not. Change Minify
    to use the htmlcompressor and yui-compressor ruby gems to control the
    dependencies.
    
    pngcrush is untouched and still rely on calling the cmd.
    
    Includes :html, :css and :js compression spec tests.
Commits on Aug 8, 2012
  1. Add individual tracking of content and variables

    aslakknutsen committed Aug 7, 2012
    Changes to Front Matter variables are only read once and updates are
    never reflected to the Page object as they can be changed by the pipline
    which only run during startup. Tracking dependencies between Page objects
    for both content and variables as one is wastefull in this scenario as
    a lot of Pages will depend on each others variables, but very few on their
    content. Regenerating a Page because a dependency has changed Front Matter
    has no effect on the output (the old variables are used).
    
    Instead track content and variable dependencies individually, but only
    trigger regeneration of dependent Pages if content has changed.
    The content and Variables are hashed using SHA256 which allow us to detect
    a real change, and not just the a file has changed modify time.
    
    When a change event occure, the following steps are taken:
    
    * Locate the Page for the given Change event Path
    * Trigger regeneration of that Page
    * If that Page's Content has changed
        * Find all dependent Pages and trigger regeneration
    * If that Page's variables have changed
        * Warn that a restart is required for the change to take effect
    
    The corresponding Page to a changed path will always be generated first,
    before its depending pages. The depending pages are sorted by last modified
    time. This allow the regeneration process to start with 'the most interesting'
    pages first to give the user a quick feedback on change, while updating
    the complete dependent tree in the 'background'.
    
    > Page variable dependencies are still tracked, but not currently used.
    > A possible usecase could be to display a Page's dependencies as debug info.
  2. Spawn regeneration thread in Dev mode

    aslakknutsen committed Aug 7, 2012
    Spawn a new thread when the Guard listener detect a change on a monitored file.
    The new thread will perform the normal site regeneration, but the Guard listener
    is now free to receive new events.
    
    If a new change event on the same path as currently running is detected, the running
    thread(if any) will be killed, and a new thread is spawned that starts the
    regeneration again. If a different path is changed, the started regeneration is
    allowed to finish before the new path is regenerated.
    
    This allow the user to make multiple rapid changes to the same template without having
    to wait for the re-generation of all the dependent pages to finish before the
    current working template is regenerated.
Commits on Aug 2, 2012
  1. Add support for GitHub Pages deploy target Repository

    aslakknutsen committed Aug 2, 2012
    Property: repository (default: origin)
    
        The "remote" repository that is the destination of the push operation.
        This parameter can be either a URL or the name of a remote.
        (ref: git help push)
    
    Example:
    
        deploy:
          host: github_pages
          branch: master
          repository: upstream
Commits on Jun 26, 2012
Commits on Jun 16, 2012
Commits on Jun 14, 2012
  1. Rescue and print page generation errors in auto mode

    aslakknutsen committed Jun 14, 2012
    Guard will unregister the listener if a error occure, any changes to the file after that will simply be ignored.
Commits on Apr 14, 2012
  1. Add support for CoffeeScript compilation

    aslakknutsen committed Apr 14, 2012
    Compile files of type x.coffee to javascript x.js
    
    Adding CoffeeScriptTransformer to the pipeline will give you  inline html script tag coffeescript compilation.
    The transformer will scan html files for script[type='text/coffeescript'] and compile the inner_html or rename the src if the script is refering to a .coffee file
    
    transformer Awestruct::Extensions::CoffeeScriptTransform.new
Commits on Oct 23, 2011
Commits on Oct 22, 2011
  1. Add support for Extensions to define Transformers

    aslakknutsen committed Oct 16, 2011
    A Extension can register it's own Transformers without involving the user.
    
    e.g. The extension need to change the rendered output based on internal state.
    
    '''ruby
    class MyExtension
    
      def execute(site)
        # do.stuff
      end
    
      def transform(transformers)
        transformers << MyTransformer.new
      end
    end
    
    class MyTransformer
      def transform(site, page, rendered)
        # do.stuff
      end
    end
    '''
  2. Add FSSM support to development mode

    aslakknutsen committed Oct 16, 2011
    Replaced wild loop with File monitor (hooks into OS file monitors e.g. inotify)
    
    Will add a monitor to all subdirectories and files that does not match:
      /^(_site|_tmp|\.git|\.gitignore|\.sass-cache|\.|\.\.).*/
    
    A CREATE or UPDATE will cause run on the Generation command to be called.
    
    Note:
    
    No CREATE events will be caught in the root directory it self, since the directory is not watched, but the individual files. Could not find a way to exclude a directory via glob in root monitor, e.g. '**/*^_site'
Commits on Oct 16, 2011
Commits on Oct 7, 2011
  1. Add support in Posts to read page.date as a alternative to relative_s…

    aslakknutsen committed Oct 7, 2011
    …ource_path to extract year/month/day information.
    
    e.g. files named:
    
    2011-01-01-name.xx
    
    are handled the same as
    
    name.xx
      ---
      date: 2011-01-01
      ---