mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Collection Index always generate
This commit is contained in:
parent
659000845a
commit
aaa837c3e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ source/stylesheets/screen.css
|
||||
vendor
|
||||
node_modules
|
||||
Gemfile.lock
|
||||
source/.jekyll-metadata
|
||||
|
16
Gemfile
16
Gemfile
@ -2,10 +2,10 @@ source "https://rubygems.org"
|
||||
|
||||
group :development do
|
||||
gem 'rake', '~> 10.0'
|
||||
gem 'jekyll', '~> 2.0'
|
||||
gem 'octopress-hooks', '~> 2.2'
|
||||
gem 'octopress-date-format', '~> 2.0'
|
||||
gem 'jekyll-sitemap'
|
||||
gem 'jekyll', '~> 3.0'
|
||||
gem 'pygments.rb', '~> 0.6.3'
|
||||
# gem 'octopress-hooks', '~> 2.2'
|
||||
# gem 'octopress-date-format', '~> 2.0'
|
||||
gem 'rdiscount', '~> 2.0'
|
||||
gem 'RedCloth', '~> 4.2.9'
|
||||
gem 'haml', '~> 4.0'
|
||||
@ -14,9 +14,15 @@ group :development do
|
||||
gem 'rubypants', '~> 0.2.0'
|
||||
gem 'rb-fsevent', '~> 0.9'
|
||||
gem 'stringex', '~> 1.4.0'
|
||||
gem 'jekyll-time-to-read'
|
||||
gem 'execjs'
|
||||
gem 'therubyracer', :platforms => :ruby
|
||||
end
|
||||
|
||||
group :jekyll_plugins do
|
||||
gem 'jekyll-sitemap'
|
||||
gem 'jekyll-paginate'
|
||||
gem 'octopress', '~> 3.0'
|
||||
gem 'jekyll-time-to-read'
|
||||
end
|
||||
|
||||
gem 'sinatra', '~> 1.4.2'
|
||||
|
6
Rakefile
6
Rakefile
@ -65,7 +65,7 @@ task :watch do
|
||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||
puts "Starting to watch source with Jekyll and Compass."
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch")
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch --incremental")
|
||||
compassPid = Process.spawn("compass watch")
|
||||
|
||||
trap("INT") {
|
||||
@ -81,7 +81,7 @@ task :preview do
|
||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch")
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch --incremental")
|
||||
compassPid = Process.spawn("compass watch")
|
||||
rackupPid = Process.spawn("rackup --port #{server_port}")
|
||||
|
||||
@ -252,7 +252,7 @@ desc "deploy public directory to github pages"
|
||||
multitask :push do
|
||||
puts "## Deploying branch to Github Pages "
|
||||
puts "## Pulling any updates from Github Pages "
|
||||
cd "#{deploy_dir}" do
|
||||
cd "#{deploy_dir}" do
|
||||
Bundler.with_clean_env { system "git pull" }
|
||||
end
|
||||
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
|
||||
|
@ -31,7 +31,7 @@ root: /
|
||||
permalink: /blog/:year/:month/:day/:title/
|
||||
source: source
|
||||
destination: public/
|
||||
plugins: plugins
|
||||
plugins_dir: plugins
|
||||
code_dir: downloads/code
|
||||
category_dir: blog/categories
|
||||
markdown: rdiscount
|
||||
|
@ -1,8 +1,8 @@
|
||||
#custom filters for Octopress
|
||||
require './plugins/backtick_code_block'
|
||||
require 'octopress-hooks'
|
||||
# require 'octopress-hooks'
|
||||
require 'jekyll-sitemap'
|
||||
require 'octopress-date-format'
|
||||
# require 'octopress-date-format'
|
||||
require './plugins/raw'
|
||||
require 'rubypants'
|
||||
|
||||
@ -23,25 +23,25 @@ module OctopressFilters
|
||||
page.output = RubyPants.new(page.output).to_html
|
||||
end
|
||||
|
||||
class PageFilters < Octopress::Hooks::Page
|
||||
def pre_render(page)
|
||||
OctopressFilters::pre_filter(page)
|
||||
end
|
||||
# class PageFilters < Octopress::Hooks::Page
|
||||
# def pre_render(page)
|
||||
# OctopressFilters::pre_filter(page)
|
||||
# end
|
||||
|
||||
def post_render(page)
|
||||
OctopressFilters::post_filter(page)
|
||||
end
|
||||
end
|
||||
# def post_render(page)
|
||||
# OctopressFilters::post_filter(page)
|
||||
# end
|
||||
# end
|
||||
|
||||
class PostFilters < Octopress::Hooks::Post
|
||||
def pre_render(post)
|
||||
OctopressFilters::pre_filter(post)
|
||||
end
|
||||
# class PostFilters < Octopress::Hooks::Post
|
||||
# def pre_render(post)
|
||||
# OctopressFilters::pre_filter(post)
|
||||
# end
|
||||
|
||||
def post_render(post)
|
||||
OctopressFilters::post_filter(post)
|
||||
end
|
||||
end
|
||||
# def post_render(post)
|
||||
# OctopressFilters::post_filter(post)
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ sharing: true
|
||||
footer: true
|
||||
is_homepage: true
|
||||
body_id: components-page
|
||||
regenerate: true
|
||||
---
|
||||
|
||||
<p class='note'>
|
||||
@ -16,21 +17,15 @@ Support for these components is provided by the Home Assistant community.
|
||||
</p>
|
||||
|
||||
{% assign components = site.components | sort: 'title' %}
|
||||
{% assign categories = components | sort: 'ha_category' | map: 'ha_category' %}
|
||||
{% assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq %}
|
||||
|
||||
<div class="filter-button-group">
|
||||
<a href='#all' class="btn">All</a>
|
||||
<a href='#featured' class="btn">Featured</a>
|
||||
|
||||
{% comment %} Jekyll 2.5.2 does not support the uniq filter :/ {% endcomment %}
|
||||
{% assign category_printed = '' %}
|
||||
|
||||
{% for category in categories %}
|
||||
{% if category and category != 'Other' %}
|
||||
{% unless category_printed contains category %}
|
||||
<a href='#{{ category | slugify }}' class="btn">{{ category }}</a>
|
||||
{% assign category_printed = category_printed | append: ',' | append: category %}
|
||||
{% endunless %}
|
||||
<a href='#{{ category | slugify }}' class="btn">{{ category }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
@ -7,6 +7,7 @@ sidebar: false
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
regenerate: true
|
||||
---
|
||||
|
||||
This is a community currated list of `configuration.yaml` examples. New recipes can be added via
|
||||
|
Loading…
x
Reference in New Issue
Block a user