disqus, feed fix, deploy gem
This commit is contained in:
3
Gemfile
3
Gemfile
@ -4,9 +4,12 @@ gem "middleman", "~>3.3"
|
|||||||
gem "awesome_print"
|
gem "awesome_print"
|
||||||
gem "json", '~> 1.8'
|
gem "json", '~> 1.8'
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
|
gem 'builder'
|
||||||
|
|
||||||
gem "middleman-favicon-maker" # https://github.com/follmann/middleman-favicon-maker
|
gem "middleman-favicon-maker" # https://github.com/follmann/middleman-favicon-maker
|
||||||
gem "middleman-livereload"
|
gem "middleman-livereload"
|
||||||
gem "middleman-blog"
|
gem "middleman-blog"
|
||||||
|
|
||||||
gem "redcarpet"
|
gem "redcarpet"
|
||||||
|
|
||||||
|
gem 'middleman-deploy'
|
||||||
|
11
Gemfile.lock
11
Gemfile.lock
@ -9,6 +9,7 @@ GEM
|
|||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.3.6)
|
addressable (2.3.6)
|
||||||
awesome_print (1.2.0)
|
awesome_print (1.2.0)
|
||||||
|
builder (3.2.2)
|
||||||
celluloid (0.15.2)
|
celluloid (0.15.2)
|
||||||
timers (~> 1.1.0)
|
timers (~> 1.1.0)
|
||||||
chunky_png (1.3.1)
|
chunky_png (1.3.1)
|
||||||
@ -78,6 +79,10 @@ GEM
|
|||||||
rack-test (~> 0.6.2)
|
rack-test (~> 0.6.2)
|
||||||
thor (>= 0.15.2, < 2.0)
|
thor (>= 0.15.2, < 2.0)
|
||||||
tilt (~> 1.4.1, < 2.0)
|
tilt (~> 1.4.1, < 2.0)
|
||||||
|
middleman-deploy (0.3.0)
|
||||||
|
middleman-core (>= 3.2)
|
||||||
|
net-sftp
|
||||||
|
ptools
|
||||||
middleman-favicon-maker (3.7)
|
middleman-favicon-maker (3.7)
|
||||||
favicon_maker (~> 1.3)
|
favicon_maker (~> 1.3)
|
||||||
middleman-core (>= 3.0.0)
|
middleman-core (>= 3.0.0)
|
||||||
@ -93,6 +98,9 @@ GEM
|
|||||||
mini_portile (0.5.2)
|
mini_portile (0.5.2)
|
||||||
minitest (5.4.1)
|
minitest (5.4.1)
|
||||||
multi_json (1.10.1)
|
multi_json (1.10.1)
|
||||||
|
net-sftp (2.1.2)
|
||||||
|
net-ssh (>= 2.6.5)
|
||||||
|
net-ssh (2.9.1)
|
||||||
nokogiri (1.6.1)
|
nokogiri (1.6.1)
|
||||||
mini_portile (~> 0.5.0)
|
mini_portile (~> 0.5.0)
|
||||||
padrino-helpers (0.12.3)
|
padrino-helpers (0.12.3)
|
||||||
@ -101,6 +109,7 @@ GEM
|
|||||||
tilt (~> 1.4.1)
|
tilt (~> 1.4.1)
|
||||||
padrino-support (0.12.3)
|
padrino-support (0.12.3)
|
||||||
activesupport (>= 3.1)
|
activesupport (>= 3.1)
|
||||||
|
ptools (1.2.6)
|
||||||
rack (1.5.2)
|
rack (1.5.2)
|
||||||
rack-livereload (0.3.15)
|
rack-livereload (0.3.15)
|
||||||
rack
|
rack
|
||||||
@ -137,9 +146,11 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
awesome_print
|
awesome_print
|
||||||
|
builder
|
||||||
json (~> 1.8)
|
json (~> 1.8)
|
||||||
middleman (~> 3.3)
|
middleman (~> 3.3)
|
||||||
middleman-blog
|
middleman-blog
|
||||||
|
middleman-deploy
|
||||||
middleman-favicon-maker
|
middleman-favicon-maker
|
||||||
middleman-livereload
|
middleman-livereload
|
||||||
nokogiri
|
nokogiri
|
||||||
|
70
config.rb
70
config.rb
@ -1,39 +1,8 @@
|
|||||||
#Markdown
|
|
||||||
set :markdown_engine, :redcarpet
|
|
||||||
|
|
||||||
#Livereload
|
#Livereload
|
||||||
activate :livereload
|
activate :livereload
|
||||||
|
|
||||||
###
|
#Markdown
|
||||||
# Compass
|
set :markdown_engine, :redcarpet
|
||||||
###
|
|
||||||
|
|
||||||
# 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 (fake) files
|
|
||||||
# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do
|
|
||||||
# @which_fake_page = "Rendering a fake page with a variable"
|
|
||||||
# end
|
|
||||||
|
|
||||||
# Site Settings
|
# Site Settings
|
||||||
@analytics_account = 'UA-12808649-1'
|
@analytics_account = 'UA-12808649-1'
|
||||||
@ -49,6 +18,17 @@ after_configuration do
|
|||||||
sprockets.append_path File.join "#{root}", @bower_config["directory"]
|
sprockets.append_path File.join "#{root}", @bower_config["directory"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Change Compass configuration
|
||||||
|
# compass_config do |config|
|
||||||
|
# config.output_style = :compact
|
||||||
|
# end
|
||||||
|
|
||||||
|
page "/feed.xml", :layout => false
|
||||||
|
|
||||||
|
data.video.keys.each do |vdo|
|
||||||
|
proxy "video/#{vdo}.html", 'video/template.html', locals: {video: data.video[vdo]}, ignore: true
|
||||||
|
end
|
||||||
|
|
||||||
activate :blog do |blog|
|
activate :blog do |blog|
|
||||||
blog.paginate = true
|
blog.paginate = true
|
||||||
blog.layout = "layouts/blog.html"
|
blog.layout = "layouts/blog.html"
|
||||||
@ -56,12 +36,6 @@ activate :blog do |blog|
|
|||||||
blog.default_extension = '.haml'
|
blog.default_extension = '.haml'
|
||||||
blog.tag_template = "tag.html"
|
blog.tag_template = "tag.html"
|
||||||
blog.sources = "blog/{title}.html"
|
blog.sources = "blog/{title}.html"
|
||||||
# blog.calendar_template = 'calendar.html'
|
|
||||||
end
|
|
||||||
|
|
||||||
#video pages
|
|
||||||
data.video.keys.each do |vdo|
|
|
||||||
proxy "video/#{vdo}.html", 'video/template.html', locals: {video: data.video[vdo]}, ignore: true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
activate :directory_indexes
|
activate :directory_indexes
|
||||||
@ -98,11 +72,13 @@ configure :build do
|
|||||||
# set :http_path, "/Content/images/"
|
# set :http_path, "/Content/images/"
|
||||||
end
|
end
|
||||||
|
|
||||||
# ftp deployment configuration.
|
activate :deploy do |deploy|
|
||||||
# activate :deploy do |deploy|
|
deploy.method = :rsync
|
||||||
# deploy.method = :ftp
|
deploy.host = 'fullsight.com'
|
||||||
# deploy.host = "ftp-host"
|
deploy.path = 'vhost/markamoser'
|
||||||
# deploy.user = "ftp-user"
|
deploy.user = 'mmoser'
|
||||||
# deploy.password = "ftp-password"
|
deploy.port = 6791
|
||||||
# deploy.path = "ftp-path"
|
deploy.clean = true # remove orphaned files on remote host, default: false
|
||||||
# end
|
# deploy.flags = '-rltgoDvzO --no-p --del' # add custom flags, default: -avz
|
||||||
|
deploy.build_before = true
|
||||||
|
end
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
xml.instruct!
|
xml.instruct!
|
||||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||||
site_url = "http://blog.url.com/"
|
site_url = "http://markamoser.com/"
|
||||||
xml.title "Blog Name"
|
xml.title "Mark A Moser"
|
||||||
xml.subtitle "Blog subtitle"
|
xml.subtitle "Sharing what I learn"
|
||||||
xml.id URI.join(site_url, blog.options.prefix.to_s)
|
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, blog.options.prefix.to_s)
|
||||||
xml.link "href" => URI.join(site_url, current_page.path), "rel" => "self"
|
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.updated(blog.articles.first.date.to_time.iso8601) unless blog.articles.empty?
|
||||||
xml.author { xml.name "Blog Author" }
|
xml.author { xml.name "Mark Moser" }
|
||||||
|
|
||||||
blog.articles[0..5].each do |article|
|
blog.articles[0..5].each do |article|
|
||||||
xml.entry do
|
xml.entry do
|
||||||
@ -16,7 +16,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
|||||||
xml.id URI.join(site_url, article.url)
|
xml.id URI.join(site_url, article.url)
|
||||||
xml.published article.date.to_time.iso8601
|
xml.published article.date.to_time.iso8601
|
||||||
xml.updated File.mtime(article.source_file).iso8601
|
xml.updated File.mtime(article.source_file).iso8601
|
||||||
xml.author { xml.name "Article Author" }
|
xml.author { xml.name "Mark Moser" }
|
||||||
# xml.summary article.summary, "type" => "html"
|
# xml.summary article.summary, "type" => "html"
|
||||||
xml.content article.body, "type" => "html"
|
xml.content article.body, "type" => "html"
|
||||||
end
|
end
|
||||||
|
@ -10,3 +10,23 @@
|
|||||||
%p published around #{current_article.date.strftime('%m/%d/%Y')}
|
%p published around #{current_article.date.strftime('%m/%d/%Y')}
|
||||||
.col-sm-3
|
.col-sm-3
|
||||||
= partial 'shared/blog_list'
|
= partial 'shared/blog_list'
|
||||||
|
|
||||||
|
- if build?
|
||||||
|
.row
|
||||||
|
.col-sm-10.col-sm-offset-1
|
||||||
|
#disqus_thread
|
||||||
|
:coffee
|
||||||
|
disqus_shortname = 'markamoser'
|
||||||
|
|
||||||
|
# * * * DON'T EDIT BELOW THIS LINE * * *
|
||||||
|
(->
|
||||||
|
dsq = document.createElement("script")
|
||||||
|
dsq.type = "text/javascript"
|
||||||
|
dsq.async = true
|
||||||
|
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js"
|
||||||
|
(document.getElementsByTagName("head")[0] or document.getElementsByTagName("body")[0]).appendChild dsq
|
||||||
|
return
|
||||||
|
)()
|
||||||
|
|
||||||
|
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||||
|
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||||
|
Reference in New Issue
Block a user