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
|
vendor
|
||||||
node_modules
|
node_modules
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
source/.jekyll-metadata
|
||||||
|
16
Gemfile
16
Gemfile
@ -2,10 +2,10 @@ source "https://rubygems.org"
|
|||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'rake', '~> 10.0'
|
gem 'rake', '~> 10.0'
|
||||||
gem 'jekyll', '~> 2.0'
|
gem 'jekyll', '~> 3.0'
|
||||||
gem 'octopress-hooks', '~> 2.2'
|
gem 'pygments.rb', '~> 0.6.3'
|
||||||
gem 'octopress-date-format', '~> 2.0'
|
# gem 'octopress-hooks', '~> 2.2'
|
||||||
gem 'jekyll-sitemap'
|
# gem 'octopress-date-format', '~> 2.0'
|
||||||
gem 'rdiscount', '~> 2.0'
|
gem 'rdiscount', '~> 2.0'
|
||||||
gem 'RedCloth', '~> 4.2.9'
|
gem 'RedCloth', '~> 4.2.9'
|
||||||
gem 'haml', '~> 4.0'
|
gem 'haml', '~> 4.0'
|
||||||
@ -14,9 +14,15 @@ group :development do
|
|||||||
gem 'rubypants', '~> 0.2.0'
|
gem 'rubypants', '~> 0.2.0'
|
||||||
gem 'rb-fsevent', '~> 0.9'
|
gem 'rb-fsevent', '~> 0.9'
|
||||||
gem 'stringex', '~> 1.4.0'
|
gem 'stringex', '~> 1.4.0'
|
||||||
gem 'jekyll-time-to-read'
|
|
||||||
gem 'execjs'
|
gem 'execjs'
|
||||||
gem 'therubyracer', :platforms => :ruby
|
gem 'therubyracer', :platforms => :ruby
|
||||||
end
|
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'
|
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)
|
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."
|
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")
|
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")
|
compassPid = Process.spawn("compass watch")
|
||||||
|
|
||||||
trap("INT") {
|
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)
|
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}"
|
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")
|
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")
|
compassPid = Process.spawn("compass watch")
|
||||||
rackupPid = Process.spawn("rackup --port #{server_port}")
|
rackupPid = Process.spawn("rackup --port #{server_port}")
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ desc "deploy public directory to github pages"
|
|||||||
multitask :push do
|
multitask :push do
|
||||||
puts "## Deploying branch to Github Pages "
|
puts "## Deploying branch to Github Pages "
|
||||||
puts "## Pulling any updates from Github Pages "
|
puts "## Pulling any updates from Github Pages "
|
||||||
cd "#{deploy_dir}" do
|
cd "#{deploy_dir}" do
|
||||||
Bundler.with_clean_env { system "git pull" }
|
Bundler.with_clean_env { system "git pull" }
|
||||||
end
|
end
|
||||||
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
|
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
|
||||||
|
@ -31,7 +31,7 @@ root: /
|
|||||||
permalink: /blog/:year/:month/:day/:title/
|
permalink: /blog/:year/:month/:day/:title/
|
||||||
source: source
|
source: source
|
||||||
destination: public/
|
destination: public/
|
||||||
plugins: plugins
|
plugins_dir: plugins
|
||||||
code_dir: downloads/code
|
code_dir: downloads/code
|
||||||
category_dir: blog/categories
|
category_dir: blog/categories
|
||||||
markdown: rdiscount
|
markdown: rdiscount
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#custom filters for Octopress
|
#custom filters for Octopress
|
||||||
require './plugins/backtick_code_block'
|
require './plugins/backtick_code_block'
|
||||||
require 'octopress-hooks'
|
# require 'octopress-hooks'
|
||||||
require 'jekyll-sitemap'
|
require 'jekyll-sitemap'
|
||||||
require 'octopress-date-format'
|
# require 'octopress-date-format'
|
||||||
require './plugins/raw'
|
require './plugins/raw'
|
||||||
require 'rubypants'
|
require 'rubypants'
|
||||||
|
|
||||||
@ -23,25 +23,25 @@ module OctopressFilters
|
|||||||
page.output = RubyPants.new(page.output).to_html
|
page.output = RubyPants.new(page.output).to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
class PageFilters < Octopress::Hooks::Page
|
# class PageFilters < Octopress::Hooks::Page
|
||||||
def pre_render(page)
|
# def pre_render(page)
|
||||||
OctopressFilters::pre_filter(page)
|
# OctopressFilters::pre_filter(page)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def post_render(page)
|
# def post_render(page)
|
||||||
OctopressFilters::post_filter(page)
|
# OctopressFilters::post_filter(page)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
class PostFilters < Octopress::Hooks::Post
|
# class PostFilters < Octopress::Hooks::Post
|
||||||
def pre_render(post)
|
# def pre_render(post)
|
||||||
OctopressFilters::pre_filter(post)
|
# OctopressFilters::pre_filter(post)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def post_render(post)
|
# def post_render(post)
|
||||||
OctopressFilters::post_filter(post)
|
# OctopressFilters::post_filter(post)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ sharing: true
|
|||||||
footer: true
|
footer: true
|
||||||
is_homepage: true
|
is_homepage: true
|
||||||
body_id: components-page
|
body_id: components-page
|
||||||
|
regenerate: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
@ -16,21 +17,15 @@ Support for these components is provided by the Home Assistant community.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% assign components = site.components | sort: 'title' %}
|
{% 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">
|
<div class="filter-button-group">
|
||||||
<a href='#all' class="btn">All</a>
|
<a href='#all' class="btn">All</a>
|
||||||
<a href='#featured' class="btn">Featured</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 %}
|
{% for category in categories %}
|
||||||
{% if category and category != 'Other' %}
|
{% if category and category != 'Other' %}
|
||||||
{% unless category_printed contains category %}
|
<a href='#{{ category | slugify }}' class="btn">{{ category }}</a>
|
||||||
<a href='#{{ category | slugify }}' class="btn">{{ category }}</a>
|
|
||||||
{% assign category_printed = category_printed | append: ',' | append: category %}
|
|
||||||
{% endunless %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ sidebar: false
|
|||||||
comments: false
|
comments: false
|
||||||
sharing: true
|
sharing: true
|
||||||
footer: true
|
footer: true
|
||||||
|
regenerate: true
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a community currated list of `configuration.yaml` examples. New recipes can be added via
|
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