-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
125 lines (100 loc) · 3.24 KB
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
require 'slim'
Slim::Engine.disable_option_validator!
Time.zone = 'Eastern Time (US & Canada)'
require 'sass-media_query_combiner'
require "helpers/custom_helpers"
helpers CustomHelpers
set :site_url, 'https://sagarkrkv.github.io'
set :site_domain, 'sagarkrkv.github.io'
set :site_title, 'Vidya Sagar Kalvakunta | Software Engineer'
set :site_author, 'Vidya Sagar Kalvakunta'
set :site_description, 'Personal website and blog.'
set :site_author_image, 'avatar.png'
set :social_github, 'https://github.com/sagarkrkv'
set :social_linkedin, 'https://www.linkedin.com/in/sagarkrkv'
set :disqus_shortname, 'sagarkrkv'
set :twitter, '@umdevUX'
set :social_twitter, 'https://twitter.com/umdevUX'
set :social_instagram, 'https://instagram.com/umdevux'
activate :blog do |blog|
blog.permalink = "/{title}"
blog.sources = "posts/{year}-{month}-{day}-{title}.html"
blog.taglink = "tags/{tag}.html"
blog.summary_separator = /(READMORE)/
blog.year_link = "{year}.html"
blog.month_link = "{year}/{month}.html"
blog.day_link = "{year}/{month}/{day}.html"
blog.default_extension = ".{markdown,md}"
blog.tag_template = "tag.html"
blog.calendar_template = "calendar.html"
blog.paginate = true
blog.per_page = 10
blog.page_link = "page/{num}"
end
# i18n
activate :i18n do |l|
l.path = "/:locale/"
l.mount_at_root = :en
l.no_fallbacks = true
end
page "/*.xml", layout: false
page "/*.json", layout: false
page "/*.txt", layout: false
page "/blog.html", layout: "blog"
page "/posts/*.html", layout: "posts"
# Title
activate :title, site: 'Vidya Sagar Kalvakunta | Software Engineer', separator: ' — '
# Metatags
activate :meta_tags
# Sitemap
set :url_root, 'https://sagarkrkv.github.io/'
activate :search_engine_sitemap, default_priority: 0.5,
default_change_frequency: "always"
compass_config do |config|
config.output_style = :expanded
config.line_comments = false
end
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
activate :directory_indexes
set :index_file, "index.html"
page "/404.html", :directory_index => false
# syntax
activate :syntax
set :markdown_engine, :redcarpet
set :markdown, :fenced_code_blocks => true,
:autolink => true,
:smartypants => true
activate :autoprefixer do |config|
config.browsers = ['last 2 versions', 'Explorer >= 9']
# config.ignore = ['source/assets/stylesheets/vendors/']
end
# Build-specific configuration
configure :build do
activate :minify_css
activate :minify_html
activate :minify_javascript
activate :gzip
# activate :asset_hash
activate :cache_buster
set :google_analytics_account, 'UA-91533048-1'
activate :automatic_image_sizes
activate :automatic_alt_tags
end
activate :deploy do |deploy|
deploy.method = :git
deploy.remote = "origin"
deploy.branch = "master"
committer_app = "#{Middleman::Deploy::PACKAGE} v#{Middleman::Deploy::VERSION}"
commit_message = "Deployed using #{committer_app}"
if ENV["TRAVIS_BUILD_NUMBER"] then
commit_message += " (Travis Build \##{ENV["TRAVIS_BUILD_NUMBER"]})"
end
deploy.commit_message = commit_message
end
configure :development do
Slim::Engine.default_options[:pretty] = true
set :debug_assets, true
activate :livereload
end