Repository: yetus Updated Branches: refs/heads/master 51a4bea87 -> c533842b4
YETUS-190. markdown table rendering on yetus website is ugly Signed-off-by: Sean Busbey <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/c533842b Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/c533842b Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/c533842b Branch: refs/heads/master Commit: c533842b47c9c113f4bdef5a0a7005cf1b9c4de1 Parents: 51a4bea Author: Allen Wittenauer <[email protected]> Authored: Thu Feb 25 17:16:09 2016 -0800 Committer: Allen Wittenauer <[email protected]> Committed: Fri Feb 26 14:59:09 2016 -0800 ---------------------------------------------------------------------- asf-site-src/config.rb | 47 ++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/c533842b/asf-site-src/config.rb ---------------------------------------------------------------------- diff --git a/asf-site-src/config.rb b/asf-site-src/config.rb index 7d62af2..6e19f25 100644 --- a/asf-site-src/config.rb +++ b/asf-site-src/config.rb @@ -15,26 +15,33 @@ # limitations under the License. # -# 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 +# This allows us to set the style for tables. It removes some of the +# image and sizing functionality (that we don't use) of the normal +# middleman renderer. +class YetusMiddlemanRedcarpetHTML < ::Redcarpet::Render::HTML + def table(header, body) + '<table class=\'table table-bordered table-striped\'>' \ + "<thead>#{header}</thead>" \ + "<tbody>#{body}</tbody>" \ + '</table>' + end +end set :markdown_engine, :redcarpet -set :markdown, :layout_engine => :erb, - :tables => true, - :autolink => true, - :smartypants => true, - :fenced_code_blocks => true, - :with_toc_data => true +set( + :markdown, + layout_engine: :erb, + with_toc_data: true, + smartypants: true, + fenced_code_blocks: true, + no_intra_emphasis: true, + tables: true, + autolink: true, + disable_indented_code_blocks: true, + quote: true, + lax_spacing: true, + renderer: YetusMiddlemanRedcarpetHTML +) set :build_dir, 'publish' @@ -115,8 +122,8 @@ def build_release_docs(output, version) # TODO get the version date from jira and do an up to date check instead of building each time. puts "Building docs for release #{version}" puts "\tcleaning up output directories in #{output}" - FileUtils.rm_rf("#{output}/build-#{version}", :secure => true) - FileUtils.rm_rf("#{output}/#{version}", :secure => true) + FileUtils.rm_rf("#{output}/build-#{version}", secure: true) + FileUtils.rm_rf("#{output}/#{version}", secure: true) puts "\tcloning from tag." `(cd "#{output}" && git clone --depth 1 --branch "#{version}" --single-branch -- "#{GITREPO}" "build-#{version}") >"#{output}/#{version}_git_checkout.log" 2>&1` unless $?.exitstatus == 0
