Code Monkey home page Code Monkey logo

awestruct's Introduction

Awestruct

Gem Gem

Requirements

Ruby 2.4 or later

Getting started

Install Awestruct using gem install awestruct. Then you can initialize an Awestruct project by running awestruct --init. To generate the static site use awestruct generate.

For more information

Please see the complete site at https://awestruct.github.io/.

License

Copyright (c) 2010-2024 Bob McWhirter and contributors (see git log)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

It also uses code from the Sequel project under the same license.

awestruct's People

Contributors

aslakknutsen avatar bbrowning avatar bleathem avatar bobmcwhirter avatar codylerum avatar davided avatar edgibbs avatar emmanuelbernard avatar fmendez avatar ge0ffrey avatar ggrossetie avatar goldmann avatar gruis avatar jmesnil avatar lance avatar lightguard avatar maxandersen avatar mojavelinux avatar pdudits avatar pmuir avatar qmx avatar rhauch avatar statonjr avatar tcurdt avatar tobias avatar tombentley avatar trustin avatar unibrew avatar xcoulon avatar zbynek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awestruct's Issues

Add all posts per time period pages to pagination extension

Create pages for all posts per time period in the paginator extension.

For example, create these pages:

  • /blog/#{year}/index.html
  • /blog/#{year}/#{month}/index.html
  • /blog/#{year}/#{month}/{#day}/index.html

Which time periods to create should be configurable.

extension Awestruct::Extensions::Paginator.new(:posts, '/blog/index', [:per_page => 5, :by_period => [:year, :month]])

If necessary, create a separate extension for this functionality.

Invalid location for compass images

When you build the site with sass changes, it cannot find the images:

cd /tmp
awestruct -i -f blueprint


rendering /tmp/stylesheets/ie.scss -> /stylesheets/ie.css
rendering /tmp/stylesheets/print.scss -> /stylesheets/print.css
rendering /tmp/stylesheets/screen.scss -> /stylesheets/screen.css
WARNING: 'grid.png' was not found (or cannot be read) in /tmp/tmp/images

The compass / sass config is not correct. How do we fix it (config.rb?) or is there a better solution?

optimizations and minifications

I am still not quite sure how weave this into awestruct best.

I have a way to combine js files into a single one and to do minifications for e.g. js, png, jpg ...but I can't say I am happy with it.
Maybe these optimizations should only be run in the production profile.

How is everyone else handling this?

gem fails to install

seems to be a mongrel problem though

$ gem install awestruct
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
ERROR:  Error installing awestruct:
    ERROR: Failed to build gem native extension.

/Users/tcurdt/.rvm/rubies/ruby-1.9.1-p376/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/Users/tcurdt/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1/i386-darwin10.2.0 -I/Users/tcurdt/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1/ruby/backward -I/Users/tcurdt/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -O2 -g -Wall -Wno-parentheses -pipe -fno-common  -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:70: warning: format not a string literal and no format arguments
http11.c:71: warning: format not a string literal and no format arguments
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c: In function ‘request_uri’:
http11.c:102: warning: format not a string literal and no format arguments
http11.c: In function ‘fragment’:
http11.c:113: warning: format not a string literal and no format arguments
http11.c: In function ‘request_path’:
http11.c:124: warning: format not a string literal and no format arguments
http11.c: In function ‘query_string’:
http11.c:135: warning: format not a string literal and no format arguments
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
http11.c:307: warning: format not a string literal and no format arguments
make: *** [http11.o] Error 1


Gem files will remain installed in /Users/tcurdt/.rvm/gems/ruby-1.9.1-p376/gems/mongrel-1.1.5 for inspection.
Results logged to /Users/tcurdt/.rvm/gems/ruby-1.9.1-p376/gems/mongrel-1.1.5/ext/http11/gem_make.out
shodan:~ tcurdt$ ruby -version
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)
shodan:~ tcurdt$ 

Setup an awestruct-dev mailinglist

I think it's time to setup a mailinglist. There are several issues that warrant discussion and I think we have lots of experiences to share. Let's open the doors!

Move awestruct projects to a github organization such as https://github.com/organizations/awestruct/

I think it's time we move awestruct to a github organization that, for starters contains https://github.com/bobmcwhirter/awestruct https://github.com/bobmcwhirter/awestruct.org and maybe a third repository for contributed extensions. In the long run, it will be easier to manage things like pull requests, releases, and issue management if we can broaden the scope of the project just a little bit.

I'd be thrilled to make this happen, and Bob and I have talked a little about it. I haven't done it yet, because I don't know how to best handle current and historical issues. Any ideas?

Cannot install 0.2.12 (0.2.11 is fine)

On Linux (RHEL)

[emmanuel@redhat-jboss01 ~]$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

[emmanuel@redhat-jboss01 ~]$ sudo gem install awestruct -v 0.2.11
Successfully installed awestruct-0.2.11
1 gem installed
Installing ri documentation for awestruct-0.2.11...
Installing RDoc documentation for awestruct-0.2.11...

[emmanuel@redhat-jboss01 ~]$ sudo gem install awestruct -v 0.2.12
ERROR:  While executing gem ... (NoMethodError)
    undefined method `call' for nil:NilClass
[emmanuel@redhat-jboss01 ~]$ 

Provide data structure for creating posts archive page

Provide a data structure in the posts extension that creates a data structure for creating an archive page for posts.

An archive page is typically laid out with titles and broken into calendar sections. See example here: http://scottmuc.com/blog/archives/

Perhaps something like:

post_archives:

  • year: 2012
    • month: 1
      posts: [...]
    • month: 3
      posts: [...]
  • year: 2011
    • month: 5
      posts: [...]

and so forth. The idea is to make it easy to iterate on year, then month, then posts.

If this is as easy as just providing an example of how to do this currently, I'm find with that to.

Issue with Compass

I get an error creating a new application. I found this link, saying it's an issue with the newest version of Compass:

https://github.com/bobmcwhirter/awestruct/issues/15

However, the gemspec now specifies compass 0.11.5. I'm on Ubuntu 11.10.

dan@themullins:~/Code/myproj$ awestruct --init --framework blueprint
FSSM -> An optimized backend is available for this platform!
FSSM -> gem install rb-inotify
Exists: /home/dan/Code/myproj/_config
Exists: /home/dan/Code/myproj/_layouts
Exists: /home/dan/Code/myproj/_ext
Exists: /home/dan/Code/myproj/_ext/pipeline.rb
Exists: /home/dan/Code/myproj/stylesheets
identical stylesheets/screen.scss
identical stylesheets/partials/_base.scss
identical stylesheets/print.scss
identical stylesheets/ie.scss
identical images/grid.png
uninitialized constant Sass::Plugin
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.5/lib/compass/compiler.rb:18:in initialize' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.5/lib/compass/commands/update_project.rb:68:innew'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.5/lib/compass/commands/update_project.rb:68:in new_compiler_instance' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.5/lib/compass/commands/update_project.rb:34:inperform'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.5/lib/compass/commands/stamp_pattern.rb:76:in perform' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/lib/awestruct/commands/manifest.rb:195:inperform'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/lib/awestruct/commands/manifest.rb:65:in block in perform' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/lib/awestruct/commands/manifest.rb:63:ineach'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/lib/awestruct/commands/manifest.rb:63:in perform' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/lib/awestruct/commands/init.rb:31:inrun'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.5/bin/awestruct:131:in <top (required)>' /usr/share/ruby-rvm/gems/ruby-1.9.2-p180/bin/awestruct:19:inload'
/usr/share/ruby-rvm/gems/ruby-1.9.2-p180/bin/awestruct:19:in `

'
Exists: /home/dan/Code/myproj/_layouts/base.html.haml
Exists: /home/dan/Code/myproj/index.html.haml

Awestruct not working with JRuby on RHEL 6

I'm trying to get awestruct working with JRuby on RHEL6. I'm getting following:

[kpiwko@kapy-ntb arquillian.github.com]$ rvm use jruby-1.6.7
Using /home/kpiwko/.rvm/gems/jruby-1.6.7
[kpiwko@kapy-ntb arquillian.github.com]$ awestruct -D
LoadError: load error: rdiscount -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/kpiwko/.rvm/rubies/jruby-1.6.7/lib/native/x86_64-Linux/libjruby-cext.so)
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/rdiscount-1.6.8/lib/rdiscount.rb:96
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/rdiscount-1.6.8/lib/rdiscount.rb:1
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct/markdownable.rb:3
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct/markdown_file.rb:14
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct/engine.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct.rb:2
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct/commands/init.rb:1
  require at org/jruby/RubyKernel.java:1033
  require at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/lib/awestruct/commands/init.rb:36
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/gems/awestruct-0.2.13/bin/awestruct:8
     load at org/jruby/RubyKernel.java:1058
   (root) at /home/kpiwko/.rvm/gems/jruby-1.6.7/bin/awestruct:19
[kpiwko@kapy-ntb arquillian.github.com]$ 

So far, I've tried jruby-1.6.6, jruby-1.6.7, both from original download page and rvm. I've tried installing awestruct gem via both gem and jgem.

I've also tried to compile my own C extension from jruby git repository via ant ext, but it didn't help either.

switch to rdiscount

Since we have no other means of discussing this... :)

I would like to have multimarkdown support.
So I tried kramdown - works fine but is GPL.

Then hooked up rdiscount. Didn't know it was also multimarkdown.
It seems to work fine. But because the implementation of the md engine is changed via "include" I didn't want to just switch. Maybe there was a good reason rdiscount wasn't used in the first place? If there isn't I would like to switch.

Opinions?

cheers,
Torsten

what frameworks are supported?

In the documentation it says

Create a new empty directory, and run awestruct with the --init parameter. Optionally pick a supported Compass framework with the --framework option.

but it should also list what frameworks are available as options.

Should we allow atom entry id/url to remove extra html

In ceylon-lang.org/blog and emmanuelbernard.com/blog I have added the following fix in template.atmo.haml

     %link{:rel=>"alternate", :type=>"text/html",            :href=>"#{page.blog_id}/" }
     - for entry in page.entries
       %entry
-        %id #{site.base_url}#{entry.url}
+        %id #{site.base_url}#{entry.url.sub(/\.html$/,'')}
         %title= escape_once( entry.title )
         %published= entry.date.xmlschema
         %updated= entry.date.xmlschema
-        %link{:rel=>"alternate", :type=>"text/html", :href=>"#{site.base_url}#{entry.url}" }
+        %link{:rel=>"alternate", :type=>"text/html", :href=>"#{site.base_url}#{entry.url.sub(/\.html$/,'')}" }
         - if ( defined?( entry.author ) )
           %author
             - if ( defined?( entry.author.name ) )

The reason for it is that I use Indexifier and the URL becomes wrong if I don't do that.

helper for generating tag links for a post

Generating links to the tags of a post is very verbose, especially in haml. Additionally, there is a shortcoming in haml that makes it difficult to put a delimiter after a tag with the proper spacing.

Here's the haml that I currently use for a post:

- post.tags.each do |tag|
  %a{:href=>tag.primary_page.url}>= tag
  - if not tag == post.tags.last
    = ',&#32;'

That's just plain nasty to read. (Btw, the entity after the comma represents a normal space. It's required because otherwise haml would strip the space after the comma).

Here's the helper that I'm proposing:

def tag_links(delimiter = ', ', style_class = nil)
  class_attr = style_class ? ' class="' + style_class + '"' : ''
  tags.map{|tag| %Q{<a#{class_attr} href="#{tag.primary_page.url}">#{tag}</a>}}.join(delimiter)
end

Then the haml would simply be:

= post.tag_links

I'm just not sure where to stick it. It seems it should go in the Tagger extension. It could be a module named TagLinker, and all post pages would extend it.

module TagLinker
  attr_accessor :tags
  def tag_links(delimiter = ', ', style_class = nil)
    ...
  end

  def execute(site)
    ...
    all.each do |page|
      page.tags = (page.tags||[]).collect{|t| @tags[t]}
      page.extend( TagLinker )
    end
  end

Shorten URL extension

It would be nice if Awestruct generates a simple index.html page that redirects to a pre-defined URL. For example:

/ --- go/ --- cla.redirect

cla.redirect contains a URL such as:

https://docs.google.com/spreadsheet/viewform?hl=en_US&formkey=dHBjc1YzdWhsZERUQnhlSklsbG1KT1E6MQ#gid=0

If a user navigates to http://example.com/go/cla, he or she could be redirected to a longer URL.

Instead of using .redirect files, specifying all URLs in a yaml file would also be an option.

Use desktop notifications for rendering errors in dev mode

Integrate with something like libnotify to provide growl-like notifications when a rendering error occurs to give the developer some clue that something went wrong during generation.

This feature is especially useful for designers, who may not be as accustomed to looking at the console for errors...and get easily frustrated when they don't see their stylesheet change, for instance, taking effect.

Here's an example that would be put in the rescue clause of the renderable impls:

Libnotify.show(:summary => "Error rendering #{self.relative_source_path}", :body => e.to_s, :timeout => 1.5)

The exception catching code should be at a higher level so a change like this only has to be done once.

File change detection does not work properly on vanilla Mac OS X Snow Leopard

Environment

Mac OS X 10.6.8
Regular provided Ruby interpreter

sudo gem install awestruct

Symptoms

File change detection and regeneration is not picked up when running 0.2.7 for html.haml files. Tried on awestruct.org.

I also tried the latest awestruct (master) and no change is detected either (even on .md files).

It might be related to a warning I see when starting Awestruct

../awestruct/bin/awestruct:209: Ruby threads cannot be used in RubyCocoa without patches to the Ruby interpreter
../awestruct/bin/awestruct:251: Ruby threads cannot be used in RubyCocoa without patches to the Ruby interpreter

Expose RedCloth configuration option no_span_caps

Textile places `span' tags around capitalized words by default, but in most cases it's just garbage and messes up source code. This behavior can be suppressed using the accessor no_span_caps in RedCloth::TextileDoc.

I can't find a way to set this option on the RedCloth::TextileDoc object since it's created inline in lib/awestruct/textilable.rb long after Awestruct bootstraps. Please provide a way to set this configuration option in the Awestruct pipeline.

One idea is to have the pipeline accept an array of restrictions that are passed to the RedCloth constructor.

http://redcloth.org/textile/writing-paragraph-text/#uppercase
http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html

Disqus Docs?

Hey--

Could you whip up some Disqus docs for awestruct.org?

regression in haml indentation

this is not critical but I noticed that applying a layout now adds additional whitespace that should not really be there.

before

    <div class='2011-06-28-modulo-of-negative-numbers' id='content'>
      <article class='full'>
        <header>
          <h1>

now

    <div class='2011-06-28-modulo-of-negative-numbers' id='content'>
      <article class='full'>
                      <header>
                        <h1>

not sure whether this comes from an upgrade in the haml engine.

Duplicate ID attributes generated when same heading text used multiple times

Duplicate ID attributes generated when same heading text used multiple times. This causes invalid HTML to be generated.

Example:

  ## BoxGrinder Build

  ### 0.10.0 (end of June 2011)

  ....

  ## BoxGrinder Build

  ![BoxGrinder Build][bgbuild_medium]

  BoxGirinder Build source code is spread across three repositories.

Produces two:

BoxGrinder Build

Possible solutions:

  • change to class, but you lose anchor links
  • in the case of ambiguity change the ID to something else boxgrinder_build_h2_1, boxgrinder_build_h2_2.
  • or it is an error to have the same title maybe?

Example as of now:
https://gist.github.com/1085333

Too much CPU consumption monitoring file changes

Netty web site holds all Javadocs and Xref reports in itself and such many directories to monitor seem to make Awestruct real busy. Actually some of them are not modified at all, so copying only once is just enough. It would be awesome if there is an way to exclude some directories (hopefully using a set of glob patterns) from monitoring via a configuration file.

To aid the situation, I installed rb-fsevent, but it simply doesn't seem to catch any file changes.

Adopt TomDoc for documentation

According to my own observations and the ohloh analyzer, Awestruct has a low number of comments. I think we can do better, especially in the extensions. Besides, it's not that much extra work thanks to TomDoc.

The developers at GitHub have found a way to make code documentation much more lightweight. Details are here:

http://tom.preston-werner.com/2010/05/11/tomdoc-reasonable-ruby-documentation.html

TomDoc works because it answers the "why" instead of the "what". Why do you have this code instead of what does this code do. That helps answer the question of "Should I document an attribute accessor?" The answer would be something like "Yes it's an accessor, we get that part. Why is it being exposed?"

Zach Holdman provides some nice advice on code documentation in his blog:

http://zachholman.com/posts/documentation/

By adopting TomDoc, and a commitment to do better at documentation, I think we can get a reputation for having thorough documentation.

I want to avoid a meta-issue like "add more code documentation", so by adopting a model, hopefully the rest will just happen (or we can file separate issues for specific files).

Allow extensions to have run modes

With the recent realization that fixing the Disqus extension will cause existing comments to go awol, I think we need to allow extensions to have more than a single execute() mode.

For instance, it'd be nice to have

awestruct --mode update

Which would "run" the generation, but instead of calling execute() on each extension, might call update() if it had one. This may allow us to perform an alternate pipeline that munges the source files, adding a post_id: or other prolog header, to avoid breakage. Then the actual Disqus plugin would use the post_id: if present, otherwise generate one. This would allow historic comments to be carried forward, perhaps, in light of changing the URL. (I'm not familiar with Disqus, but IntenseDebate supports a post_id: to identify the blog post, regardless of URL).

Extensions without support for a given mode (such as paginator, which wouldn't need to support update()) would be skipped.

Ignore files

emacs backup files keep breaking awestruct, so it would be nice to be able to specify files to ignore (.gitignore style would be my suggestion).

Simplify Engine

I'm thinking that the Engine could be responsible for simply loading the filesystem bits per our usual rules, into an input collection, such as site.input_files, let's say.

Everything, including Sass, Markdown, OrgMode, would be simply extensions that process site.input_files into site.pages.

Additionaly, maintaining links between a site.page and all elements of site.input_files that contributed to the resulting page could be cool. With some magic, I think we could even track that page X used _data/foo/bar.md in its creation or that the homepage iterates over site.posts, etc.

By removing the actual page templating from the engine into a default set of extensions we would make it even easier to add other template or data-dir types of things, without feeling like we're working on the edges or poking too much in the core.

The Engine could also use some filesystem-watching gem to reduce our busy loop checking mtimes.

I'd basically like to make re-generation more surgical and reactive, instead of a constant complete-input poll/compare, which results in slow builds for torquebox.org, since we have a ton of pages.

I have some designs rambling in my skull for this this.

configuration of Config@ignore breakage

commit: bobmcwhirter@04709a2

trace:

ArgumentError: wrong number of arguments (0 for 1)
initialize at /home/bpm/.rvm/gems/jruby-1.6.5/gems/awestruct-0.2.11/lib/awestruct/config.rb:24
(root) at /home/bpm/.rvm/gems/jruby-1.6.5/gems/awestruct-0.2.11/bin/awestruct:130
load at org/jruby/RubyKernel.java:1073
(root) at /home/bpm/.rvm/gems/jruby-1.6.5/bin/awestruct:19

My project does not include a '.awestruct_ignore' file. awestruct/config.rb:23 returns an empty array. JRuby throws an exception at Dir[ [] ].

simplify --force

I keep remove the _site folder myself because --force sometimes is just not good enough.

Why don't we just remove the _site folder when --force is used and remove "force" handling from the engine?
Am I missing something there?
Any objections?

Make awestruct an organization

This goofy little project is growing, perhaps we should make it an organization, instead of a personal repository of mine.

release 0.2.15

I think we should cut a new release. lance, could you take care of it? I am no gem owner.

Sass/Compass Plugin Error

When I run:

$ awestruct --init --framework blueprint

I get the following error:

Create directory: /Users/bkelly1271/Dropbox/Projects/Awestruck/notes/_config
Create directory: /Users/bkelly1271/Dropbox/Projects/Awestruck/notes/_layouts
Create directory: /Users/bkelly1271/Dropbox/Projects/Awestruck/notes/_ext
Create file: /Users/bkelly1271/Dropbox/Projects/Awestruck/notes/_ext/pipeline.rb
Create directory: /Users/bkelly1271/Dropbox/Projects/Awestruck/notes/stylesheets
directory _site/stylesheets/ 
directory images/ 
directory stylesheets/partials/ 
   create stylesheets/screen.scss 
   create stylesheets/partials/_base.scss 
   create stylesheets/print.scss 
   create stylesheets/ie.scss 
   create images/grid.png 
uninitialized constant Sass::Plugin
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.4/lib/compass/compiler.rb:18:in `initialize'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.4/lib/compass/commands/update_project.rb:68:in `new'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.4/lib/compass/commands/update_project.rb:68:in `new_compiler_instance'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.4/lib/compass/commands/update_project.rb:34:in `perform'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/compass-0.11.4/lib/compass/commands/stamp_pattern.rb:76:in `perform'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/lib/awestruct/commands/manifest.rb:195:in `perform'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/lib/awestruct/commands/manifest.rb:65:in `block in perform'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/lib/awestruct/commands/manifest.rb:63:in `each'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/lib/awestruct/commands/manifest.rb:63:in `perform'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/lib/awestruct/commands/init.rb:31:in `run'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/gems/awestruct-0.2.1/bin/awestruct:130:in `<top (required)>'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/bin/awestruct:19:in `load'
/Users/brian/.rvm/gems/ruby-1.9.2-p180/bin/awestruct:19:in `<main>'
Create file: /Users/brian/Dropbox/Projects/Awestruck/notes/_layouts/base.html.haml
Create file: /Users/brian/Dropbox/Projects/Awestruck/notes/index.html.haml

I ended up with a page that definitely looks like it's missing some CSS definitions.

Here are the gems that were installed when I installed awestruct:

$ gem install awestruct
Fetching: hpricot-0.8.4.gem (100%)
Building native extensions.  This could take a while...
Fetching: haml-3.1.2.gem (100%)
Fetching: hashery-1.4.0.gem (100%)
Fetching: RedCloth-4.2.5.gem (100%)
Building native extensions.  This could take a while...
Fetching: syntax-1.0.0.gem (100%)
Fetching: maruku-0.6.0.gem (100%)
Fetching: sass-3.1.4.gem (100%)
Fetching: chunky_png-1.2.0.gem (100%)
Fetching: fssm-0.2.7.gem (100%)
Fetching: compass-0.11.4.gem (100%)
Fetching: compass-960-plugin-0.10.4.gem (100%)
Fetching: rubypants-0.2.0.gem (100%)
Fetching: org-ruby-0.5.3.gem (100%)
Fetching: awestruct-0.2.1.gem (100%)
Successfully installed hpricot-0.8.4
Successfully installed haml-3.1.2
Successfully installed hashery-1.4.0
Successfully installed RedCloth-4.2.5
Successfully installed syntax-1.0.0
Successfully installed maruku-0.6.0
Successfully installed sass-3.1.4
Successfully installed chunky_png-1.2.0
Successfully installed fssm-0.2.7
Successfully installed compass-0.11.4
Successfully installed compass-960-plugin-0.10.4
Successfully installed rubypants-0.2.0
Successfully installed org-ruby-0.5.3
Successfully installed awestruct-0.2.1
14 gems installed

I'm aware that this looks like a problem with Compass and/or Sass but I'm also curious as to why I can't find anybody else having this problem. I tried this on two different machines as well. Both Mac.

Invalid location for compass images

When you build the site with sass changes, it cannot find the images:

cd /tmp
awestruct -i -f blueprint
awestruct --server
...
rendering /tmp/stylesheets/ie.scss -> /stylesheets/ie.css
rendering /tmp/stylesheets/print.scss -> /stylesheets/print.css
rendering /tmp/stylesheets/screen.scss -> /stylesheets/screen.css
WARNING: 'grid.png' was not found (or cannot be read) in /tmp/tmp/images

The compass / sass config is not correct. How do we fix it (config.rb?) or is there a better solution?

Output file not generated upon subsequent change to a file

The first time a file is changed when running in development mode, the output file is generated as expected. However, subsequent changes to that file do not trigger regeneration, even though the file monitor is reporting that the file changed.

Follow these steps to duplicate this issue:

  1. run the awestruct.org website in development mode
  2. change the file extensions/disqus.md
  3. see that the output file is generated
  4. change the file extensions/disqus.md
  5. see that the change is detected, but the output file is not generated

Ideally, the file monitor should be connected to the generator. The change to the file is detected immediately by the file monitor. Especially when quick feedback is needed, it would be nice if the generator worked on that file first...then moved on to a more general scan.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.