diff --git a/.gitignore b/.gitignore index c779352..a320f7b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,9 @@ # Ignore the build directory /build -# Ignore Sass' cache +# Ignore cache /.sass-cache +/.cache # Ignore .DS_store file .DS_Store diff --git a/config.rb b/config.rb index 69dc8cc..3b13975 100644 --- a/config.rb +++ b/config.rb @@ -1,21 +1,99 @@ +### +# Blog settings +### -set :css_dir, 'css' +# Time.zone = "UTC" -set :js_dir, 'js' +activate :blog do |blog| + # This will add a prefix to all links, template references and source paths + # blog.prefix = "blog" -set :images_dir, 'img' + # blog.permalink = "{year}/{month}/{day}/{title}.html" + # Matcher for blog source files + # blog.sources = "{year}-{month}-{day}-{title}.html" + # blog.taglink = "tags/{tag}.html" + # blog.layout = "layout" + # blog.summary_separator = /(READMORE)/ + # blog.summary_length = 250 + # blog.year_link = "{year}.html" + # blog.month_link = "{year}/{month}.html" + # blog.day_link = "{year}/{month}/{day}.html" + # blog.default_extension = ".markdown" + blog.tag_template = "tag.html" + blog.calendar_template = "calendar.html" + + # Enable pagination + # blog.paginate = true + # blog.per_page = 10 + # blog.page_link = "page/{num}" +end + +page "/feed.xml", layout: false + +### +# Compass +### + +# Change Compass configuration +# compass_config do |config| +# config.output_style = :compact +# end + +### +# Page options, layouts, aliases and proxies +### + +# Per-page layout changes: +# +# With no layout +# page "/path/to/file.html", layout: false +# +# With alternative layout +# page "/path/to/file.html", layout: :otherlayout +# +# A path which all have the same layout +# with_layout :admin do +# page "/admin/*" +# end + +# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/) +# proxy "/this-page-has-no-template.html", "/template-file.html", locals: { +# which_fake_page: "Rendering a fake page with a local variable" } + +### +# Helpers +### + +# Automatic image dimensions on image_tag helper +# activate :automatic_image_sizes + +# Reload the browser automatically whenever files change +# activate :livereload + +# Methods defined in the helpers block are available in templates +# helpers do +# def some_helper +# "Helping" +# end +# end + +set :css_dir, 'stylesheets' + +set :js_dir, 'javascripts' + +set :images_dir, 'images' # Build-specific configuration configure :build do # For example, change the Compass output style for deployment - activate :minify_css + # activate :minify_css # Minify Javascript on build - activate :minify_javascript + # activate :minify_javascript # Enable cache buster - activate :asset_hash + # activate :asset_hash # Use relative URLs # activate :relative_assets @@ -23,8 +101,3 @@ # Or use a different image path # set :http_prefix, "/Content/images/" end - -activate :deploy do |deploy| - deploy.method = :git - deploy.branch = "master" -end diff --git a/source/2012-01-01-example-article.html.markdown b/source/2012-01-01-example-article.html.markdown new file mode 100644 index 0000000..618d7f3 --- /dev/null +++ b/source/2012-01-01-example-article.html.markdown @@ -0,0 +1,7 @@ +--- +title: Example Article +date: 2012-01-01 +tags: example +--- + +This is an example article. You probably want to delete it and write your own articles! diff --git a/source/calendar.html.erb b/source/calendar.html.erb new file mode 100644 index 0000000..4cdfdf9 --- /dev/null +++ b/source/calendar.html.erb @@ -0,0 +1,33 @@ +--- +pageable: true +--- +
Page <%= page_number %> of <%= num_pages %>
+ + <% if prev_page %> +<%= link_to 'Previous page', prev_page %>
+ <% end %> +<% end %> + +<%= link_to 'Next page', next_page %>
+ <% end %> +<% end %> diff --git a/source/feed.xml.builder b/source/feed.xml.builder new file mode 100644 index 0000000..6fa9c08 --- /dev/null +++ b/source/feed.xml.builder @@ -0,0 +1,24 @@ +xml.instruct! +xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do + site_url = "http://blog.url.com/" + xml.title "Blog Name" + xml.subtitle "Blog subtitle" + xml.id URI.join(site_url, blog.options.prefix.to_s) + xml.link "href" => URI.join(site_url, blog.options.prefix.to_s) + xml.link "href" => URI.join(site_url, current_page.path), "rel" => "self" + xml.updated(blog.articles.first.date.to_time.iso8601) unless blog.articles.empty? + xml.author { xml.name "Blog Author" } + + blog.articles[0..5].each do |article| + xml.entry do + xml.title article.title + xml.link "rel" => "alternate", "href" => URI.join(site_url, article.url) + xml.id URI.join(site_url, article.url) + xml.published article.date.to_time.iso8601 + xml.updated File.mtime(article.source_file).iso8601 + xml.author { xml.name "Article Author" } + # xml.summary article.summary, "type" => "html" + xml.content article.body, "type" => "html" + end + end +end diff --git a/source/index.html.erb b/source/index.html.erb index c239e34..0fae27e 100644 --- a/source/index.html.erb +++ b/source/index.html.erb @@ -1,59 +1,24 @@ --- -title: Ruby Meetup Resources +pageable: true +per_page: 10 --- +<% if paginate && num_pages > 1 %> +Page <%= page_number %> of <%= num_pages %>
-Help for running a ruby meetup.
-<%= link_to 'Previous page', prev_page %>
+ <% end %> +<% end %> -Running a meetup can be quite a lot of effort. We thought it would be great - to make it easier for meetups to share resources which they've created, which could - be used by other meetups. So far there are just a couple of resources, but we - are hopeful this list will grow, especially with your support.
+<% page_articles.each_with_index do |article, i| %> +You can browse a list of the resources at https://github.com/ruby-meetup-resources. - If you have a contribution to make, please just open an issue on https://github.com/ruby-meetup-resources/new-resources - -
Finally, please tweet, mail your friends, and generally help get the word out there!
-Ideally we are looking for hack night / game resources. While we do have a list of beginner Ruby resources, - ideally we are looking for things which are:
-<%= link_to 'Next page', next_page %>
+ <% end %> +<% end %> diff --git a/source/layout.erb b/source/layout.erb new file mode 100644 index 0000000..36c3da9 --- /dev/null +++ b/source/layout.erb @@ -0,0 +1,38 @@ + + + + + +Page <%= page_number %> of <%= num_pages %>
+ + <% if prev_page %> +<%= link_to 'Previous page', prev_page %>
+ <% end %> +<% end %> + +<%= link_to 'Next page', next_page %>
+ <% end %> +<% end %>