-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from basho/cleanups
Add i18n and clean up config
- Loading branch information
Showing
17 changed files
with
149 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require './lib/rocco' | ||
|
||
# this is not optimal. Hook it into the "watch" mechanism | ||
puts "== Generating DUAL Pages" | ||
for api in Dir.glob("**/*.api") | ||
r = Rocco.new(api, [], :language => 'bash', :template_file => './source/layouts/api.mustache') | ||
File.open(api.sub(/\.api$/, '.html.erb'), 'w') do |html| | ||
html.write(r.to_html) | ||
end | ||
end | ||
for api in Dir.glob("**/*.roc") | ||
r = DocRocco.new(api, [], :language => 'bash', :template_file => './source/layouts/roc.mustache') | ||
File.open(api.sub(/\.roc$/, '.html.erb'), 'w') do |html| | ||
html.write(r.to_html) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
LANGUAGE = (ENV['RIAK_DOCS_LANG'] || 'en').to_sym | ||
puts "RIAK_DOCS_LANG=#{LANGUAGE}" | ||
I18n.locale = I18n.default_locale = LANGUAGE | ||
|
||
if ENV['RIAK_VERSION'].blank? || ENV['RIAK_VERSION'] !~ /[\d\.]+/ | ||
versions = YAML::load(File.open('data/versions.yml')) | ||
for proj, vs in versions['currents'] | ||
proj = proj.upcase | ||
ENV["#{proj}_VERSION"] = vs | ||
puts "#{proj}_VERSION=#{ENV["#{proj}_VERSION"]}" | ||
end | ||
end | ||
|
||
$versions = { | ||
:riak => ENV['RIAK_VERSION'].presence, | ||
:riakcs => ENV['RIAKCS_VERSION'].presence || ENV['RIAK_VERSION'].presence, | ||
:riakee => ENV['RIAKEE_VERSION'].presence || ENV['RIAK_VERSION'].presence | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
|
||
module Middleman::Renderers::FAQML | ||
def registered(app) | ||
# FAQML is not included in the default gems, | ||
# but we'll support it if available. | ||
begin | ||
# Load gem | ||
require "faqml" | ||
|
||
app.before_configuration do | ||
template_extensions :fml => :html | ||
class << self | ||
def registered(app) | ||
begin | ||
require "faqml" | ||
app.before_configuration do | ||
template_extensions :fml => :html | ||
end | ||
# Setup FAQML options to work with partials | ||
::FAQML::Engine.set_default_options( | ||
:buffer => '@_out_buf', | ||
:generator => ::Temple::Generators::StringBuffer | ||
) | ||
rescue LoadError | ||
puts "Error Loading FAQML" | ||
end | ||
|
||
# Setup FAQML options to work with partials | ||
::FAQML::Engine.set_default_options( | ||
:buffer => '@_out_buf', | ||
:generator => ::Temple::Generators::StringBuffer | ||
) | ||
rescue LoadError | ||
end | ||
alias :included :registered | ||
end | ||
end | ||
|
||
::Middleman::Extensions.register(:faqml, Middleman::Renderers::FAQML) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
en: | ||
basho: Basho | ||
visit_basho: Visit Basho | ||
home: Home | ||
riak_docs: Riak Docs | ||
tagline: "Product tutorials, how-tos, and fully-documented APIs." | ||
keywords: Keywords | ||
navigation: Navigation | ||
all_projects: All Riak Projects | ||
docs_on_github: "These docs are available on GitHub. Please submit ideas and patches." | ||
secondary_header: "These May Also Interest You" | ||
faqs_link: "[[FAQs]]" | ||
apis_link: "[[APIs]]" | ||
tutorial_nav: "Tutorial Nav" | ||
previous: Prev | ||
next: Next | ||
toc_contents: Contents | ||
footer: "This work is licensed under a <a href=\"http://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">Creative Commons Attribution 3.0 Unported License</a>" | ||
riak_cs: | ||
info: | ||
title: Riak CS Only | ||
body: "To try out Riak CS, sign up for a <a href=\"http://info.basho.com/RiakCS1.1_DeveloperTrialRequest.html\">developer trial</a>." | ||
riak_ee: | ||
info: | ||
title: Riak Enterprise Only | ||
body: "This documentation applies only to Riak Enterprise, Basho's commercial extension to [[Riak]]. To talk to us about using Riak Enterprise, <a href=\"http://info.basho.com/Wiki_Contact.html\">let us know</a>." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
jp: | ||
basho: Bashosan | ||
visit_basho: Visit Bashosan | ||
home: Home | ||
riak_docs: Riak Docs | ||
tagline: "Product tutorials, how-tos, and fully-documented APIs." | ||
keywords: Keywords | ||
navigation: Navigation | ||
all_projects: All Riak Projects | ||
docs_on_github: "These docs are available on GitHub. Please submit ideas and patches." | ||
secondary_header: "These May Also Interest You" | ||
faqs_link: "[[FAQs]]" | ||
apis_link: "[[APIs]]" | ||
tutorial_nav: "Tutorial Nav" | ||
previous: Prev | ||
next: Next | ||
toc_contents: Contents | ||
footer: "This work is licensed under a <a href=\"http://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">Creative Commons Attribution 3.0 Unported License</a>" | ||
riak_cs: | ||
info: | ||
title: Riak CS Only | ||
body: "To try out Riak CS, sign up for a <a href=\"http://info.basho.com/RiakCS1.1_DeveloperTrialRequest.html\">developer trial</a>." | ||
riak_ee: | ||
info: | ||
title: Riak Enterprise Only | ||
body: "This documentation applies only to Riak Enterprise, Basho's commercial extension to [[Riak]]. To talk to us about using Riak Enterprise, <a href=\"http://info.basho.com/Wiki_Contact.html\">let us know</a>." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
footer.mastfooter | ||
| This work is licensed under a | ||
a href="http://creativecommons.org/licenses/by/3.0/" target="_blank" | ||
| Creative Commons Attribution 3.0 Unported License | ||
== I18n.t(:footer) | ||
br | ||
| Copyright © #{Date.today.year} Basho Technologies, Inc. All rights reserved. | ||
| © 2011-#{Date.today.year} Basho Technologies, Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
- if data.page.keywords.present? | ||
h4 Keywords | ||
h4== I18n.t(:keywords) | ||
== data.page.keywords.map{|kw| "<a href=\"/keywords/"+kw+"/\">"+kw+"</a>"}.join(', ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
aside#nav-container role="complementary" | ||
nav.overview#primary-nav role="nav" | ||
h2.responsive-link | ||
| Navigation | ||
== I18n.t(:navigation) | ||
a.responsive-toggle | ||
h3.responsive-link.visit-basho | ||
a href="http://www.basho.com" Visit Basho | ||
a href="http://www.basho.com"== I18n.t(:visit_basho) | ||
h3.responsive-link | ||
a href="/index.html" All Riak Projects | ||
a href="/index.html"== I18n.t(:all_projects) | ||
- project = data.page.project || 'riak' | ||
- data.global_nav[project].each do |section| | ||
- add_class = section['class'] || '' | ||
- nav_data, active = build_nav(section['sub'], add_class) | ||
h3(class=(active ? "active #{add_class}" : add_class)) | ||
span==section['title'] | ||
==nav_data | ||
|
||
.submissions-note | ||
a(href='https://github.com/basho/basho_docs' target='_blank') | ||
| These docs are available on GitHub. Please submit ideas and patches. | ||
a href='https://github.com/basho/basho_docs' target='_blank' | ||
== I18n.t(:docs_on_github) |
Oops, something went wrong.