DL-3: Move distributedlog website to apache Setup an initial distributedlog website using jekyll & bootstrap.
Live demo: https://sijie.github.io/incubator-distributedlog/ Author: Sijie Guo <si...@apache.org> Reviewers: Leigh Stewart <lstew...@apache.org> Closes #13 from sijie/sijie/distributedlog_website Project: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/commit/b169db04 Tree: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/tree/b169db04 Diff: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/diff/b169db04 Branch: refs/heads/master Commit: b169db043bceea59332ee0dbdb775ea023d9d234 Parents: 8cf26ec Author: Sijie Guo <si...@apache.org> Authored: Tue Sep 13 00:34:00 2016 -0700 Committer: Sijie Guo <sij...@twitter.com> Committed: Tue Sep 13 00:34:00 2016 -0700 ---------------------------------------------------------------------- .gitmodules | 3 + docs/.gitignore | 5 + docs/Gemfile | 5 + docs/Gemfile.lock | 83 + docs/Rakefile | 10 + docs/_config-local.yml | 1 + docs/_config-production.yml | 1 + docs/_config.yml | 50 + docs/_includes/anchors_links.html | 7 + docs/_includes/footer.html | 15 + docs/_includes/head.html | 30 + docs/_includes/header.html | 126 + docs/_layouts/base.html | 26 + docs/_layouts/default.html | 114 + docs/_layouts/guide.html | 46 + docs/_plugins/jekyll-rst/.gitignore | 1 + docs/_plugins/jekyll-rst/LICENSE.txt | 20 + docs/_plugins/jekyll-rst/README.rst | 97 + docs/_plugins/jekyll-rst/converter.rb | 30 + docs/_plugins/jekyll-rst/directives.py | 97 + docs/_plugins/jekyll-rst/rst2html.py | 39 + docs/_plugins/jekyll-rst/transform.py | 40 + docs/_sass/_base.scss | 206 ++ docs/_sass/_bootstrap.scss | 56 + docs/_sass/_layout.scss | 242 ++ docs/_sass/_syntax-highlighting.scss | 71 + docs/_sass/bootstrap/_alerts.scss | 73 + docs/_sass/bootstrap/_badges.scss | 68 + docs/_sass/bootstrap/_breadcrumbs.scss | 28 + docs/_sass/bootstrap/_button-groups.scss | 244 ++ docs/_sass/bootstrap/_buttons.scss | 168 ++ docs/_sass/bootstrap/_carousel.scss | 270 ++ docs/_sass/bootstrap/_close.scss | 36 + docs/_sass/bootstrap/_code.scss | 69 + docs/_sass/bootstrap/_component-animations.scss | 37 + docs/_sass/bootstrap/_dropdowns.scss | 216 ++ docs/_sass/bootstrap/_forms.scss | 617 +++++ docs/_sass/bootstrap/_glyphicons.scss | 307 +++ docs/_sass/bootstrap/_grid.scss | 84 + docs/_sass/bootstrap/_input-groups.scss | 171 ++ docs/_sass/bootstrap/_jumbotron.scss | 54 + docs/_sass/bootstrap/_labels.scss | 66 + docs/_sass/bootstrap/_list-group.scss | 130 + docs/_sass/bootstrap/_media.scss | 66 + docs/_sass/bootstrap/_mixins.scss | 40 + docs/_sass/bootstrap/_modals.scss | 150 ++ docs/_sass/bootstrap/_navbar.scss | 662 +++++ docs/_sass/bootstrap/_navs.scss | 242 ++ docs/_sass/bootstrap/_normalize.scss | 424 ++++ docs/_sass/bootstrap/_pager.scss | 54 + docs/_sass/bootstrap/_pagination.scss | 89 + docs/_sass/bootstrap/_panels.scss | 271 ++ docs/_sass/bootstrap/_popovers.scss | 131 + docs/_sass/bootstrap/_print.scss | 101 + docs/_sass/bootstrap/_progress-bars.scss | 87 + docs/_sass/bootstrap/_responsive-embed.scss | 35 + docs/_sass/bootstrap/_responsive-utilities.scss | 179 ++ docs/_sass/bootstrap/_scaffolding.scss | 161 ++ docs/_sass/bootstrap/_tables.scss | 234 ++ docs/_sass/bootstrap/_theme.scss | 291 +++ docs/_sass/bootstrap/_thumbnails.scss | 38 + docs/_sass/bootstrap/_tooltip.scss | 101 + docs/_sass/bootstrap/_type.scss | 298 +++ docs/_sass/bootstrap/_utilities.scss | 55 + docs/_sass/bootstrap/_variables.scss | 874 +++++++ docs/_sass/bootstrap/_wells.scss | 29 + docs/_sass/bootstrap/mixins/_alerts.scss | 14 + .../bootstrap/mixins/_background-variant.scss | 12 + docs/_sass/bootstrap/mixins/_border-radius.scss | 18 + docs/_sass/bootstrap/mixins/_buttons.scss | 65 + docs/_sass/bootstrap/mixins/_center-block.scss | 7 + docs/_sass/bootstrap/mixins/_clearfix.scss | 22 + docs/_sass/bootstrap/mixins/_forms.scss | 88 + docs/_sass/bootstrap/mixins/_gradients.scss | 58 + .../_sass/bootstrap/mixins/_grid-framework.scss | 81 + docs/_sass/bootstrap/mixins/_grid.scss | 122 + docs/_sass/bootstrap/mixins/_hide-text.scss | 21 + docs/_sass/bootstrap/mixins/_image.scss | 33 + docs/_sass/bootstrap/mixins/_labels.scss | 12 + docs/_sass/bootstrap/mixins/_list-group.scss | 32 + docs/_sass/bootstrap/mixins/_nav-divider.scss | 10 + .../bootstrap/mixins/_nav-vertical-align.scss | 9 + docs/_sass/bootstrap/mixins/_opacity.scss | 8 + docs/_sass/bootstrap/mixins/_pagination.scss | 24 + docs/_sass/bootstrap/mixins/_panels.scss | 24 + docs/_sass/bootstrap/mixins/_progress-bar.scss | 10 + docs/_sass/bootstrap/mixins/_reset-filter.scss | 8 + docs/_sass/bootstrap/mixins/_reset-text.scss | 18 + docs/_sass/bootstrap/mixins/_resize.scss | 6 + .../mixins/_responsive-visibility.scss | 21 + docs/_sass/bootstrap/mixins/_size.scss | 10 + docs/_sass/bootstrap/mixins/_tab-focus.scss | 9 + docs/_sass/bootstrap/mixins/_table-row.scss | 28 + docs/_sass/bootstrap/mixins/_text-emphasis.scss | 12 + docs/_sass/bootstrap/mixins/_text-overflow.scss | 8 + .../bootstrap/mixins/_vendor-prefixes.scss | 222 ++ docs/admin_guide/bookkeeper.rst | 213 ++ docs/admin_guide/hardware.rst | 138 + docs/admin_guide/main.rst | 13 + docs/admin_guide/monitoring.rst | 398 +++ docs/admin_guide/operations.rst | 224 ++ docs/admin_guide/performance.rst | 22 + docs/admin_guide/vagrant.rst | 18 + docs/admin_guide/zookeeper.rst | 104 + docs/api/core.rst | 471 ---- docs/api/main.rst | 9 - docs/api/practice.rst | 76 - docs/api/proxy.rst | 74 - docs/architecture/main.rst | 160 -- docs/basics/introduction.rst | 18 + docs/basics/main.rst | 8 - docs/basics/quickstart.rst | 111 - docs/configuration/client.rst | 97 - docs/configuration/core.rst | 422 ---- docs/configuration/main.rst | 20 - docs/configuration/perlog.rst | 127 - docs/configuration/proxy.rst | 69 - docs/considerations/main.rst | 64 - docs/css/main.scss | 53 + docs/css/theme.css | 21 + docs/deployment/cluster.rst | 559 +++++ docs/deployment/docker.rst | 49 + docs/design/main.rst | 212 -- docs/developer/main.rst | 8 - docs/developer/release.rst | 21 - docs/download.rst | 27 - docs/faq.rst | 2 - .../bootstrap/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../bootstrap/glyphicons-halflings-regular.svg | 288 +++ .../bootstrap/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../bootstrap/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes docs/globalreplicatedlog/main.rst | 99 - docs/images/distributedlog_logo_l.png | Bin 0 -> 20791 bytes docs/images/distributedlog_logo_navbar.png | Bin 0 -> 9195 bytes docs/images/distributedlog_logo_s.png | Bin 0 -> 2006 bytes docs/images/favicon.ico | Bin 0 -> 1660 bytes docs/implementation/core.rst | 0 docs/implementation/main.rst | 9 - docs/implementation/storage.rst | 313 --- docs/implementation/writeproxy.rst | 0 docs/index.md | 49 + docs/index.rst | 23 - docs/js/bootstrap-sprockets.js | 12 + docs/js/bootstrap.js | 2363 ++++++++++++++++++ docs/js/bootstrap.min.js | 7 + docs/js/bootstrap/affix.js | 162 ++ docs/js/bootstrap/alert.js | 94 + docs/js/bootstrap/button.js | 120 + docs/js/bootstrap/carousel.js | 237 ++ docs/js/bootstrap/collapse.js | 211 ++ docs/js/bootstrap/dropdown.js | 165 ++ docs/js/bootstrap/modal.js | 337 +++ docs/js/bootstrap/popover.js | 108 + docs/js/bootstrap/scrollspy.js | 172 ++ docs/js/bootstrap/tab.js | 155 ++ docs/js/bootstrap/tooltip.js | 514 ++++ docs/js/bootstrap/transition.js | 59 + docs/operations/bookkeeper.rst | 193 -- docs/operations/deployment.rst | 533 ---- docs/operations/docker.rst | 36 - docs/operations/hardware.rst | 120 - docs/operations/main.rst | 13 - docs/operations/monitoring.rst | 378 --- docs/operations/operations.rst | 204 -- docs/operations/performance.rst | 4 - docs/operations/vagrant.rst | 18 - docs/operations/zookeeper.rst | 88 - docs/performance/main.rst | 4 + docs/references/configuration.rst | 2 - docs/references/features.rst | 30 - docs/references/main.rst | 11 - docs/references/metrics.rst | 480 ---- docs/start/building.rst | 92 + docs/start/download.rst | 73 + docs/start/quickstart.rst | 127 + docs/styles/site.scss | 4 + docs/tutorials/analytics-mapreduce.rst | 215 +- docs/tutorials/basic-1.rst | 251 +- docs/tutorials/basic-2.rst | 222 +- docs/tutorials/basic-3.rst | 281 ++- docs/tutorials/basic-4.rst | 242 +- docs/tutorials/basic-5.rst | 224 +- docs/tutorials/basic-6.rst | 328 ++- docs/tutorials/main.rst | 82 +- docs/tutorials/messaging-1.rst | 185 +- docs/tutorials/messaging-2.rst | 224 +- docs/tutorials/messaging-3.rst | 112 +- docs/tutorials/messaging-4.rst | 25 +- docs/tutorials/messaging-5.rst | 20 +- docs/tutorials/replicatedstatemachines.rst | 11 + docs/user_guide/api/core.rst | 485 ++++ docs/user_guide/api/main.rst | 33 + docs/user_guide/api/practice.rst | 89 + docs/user_guide/api/proxy.rst | 87 + docs/user_guide/architecture/main.rst | 178 ++ docs/user_guide/configuration/client.rst | 110 + docs/user_guide/configuration/core.rst | 424 ++++ docs/user_guide/configuration/main.rst | 44 + docs/user_guide/configuration/perlog.rst | 138 + docs/user_guide/configuration/proxy.rst | 82 + docs/user_guide/considerations/main.rst | 82 + docs/user_guide/design/main.rst | 230 ++ docs/user_guide/globalreplicatedlog/main.rst | 118 + docs/user_guide/implementation/core.rst | 4 + docs/user_guide/implementation/main.rst | 25 + docs/user_guide/implementation/storage.rst | 326 +++ docs/user_guide/implementation/writeproxy.rst | 5 + docs/user_guide/main.rst | 13 + docs/user_guide/references/features.rst | 42 + docs/user_guide/references/main.rst | 28 + docs/user_guide/references/metrics.rst | 492 ++++ website/.gitignore | 5 + website/Gemfile | 5 + website/Gemfile.lock | 83 + website/README.md | 79 + website/Rakefile | 10 + website/_config-local.yml | 1 + website/_config-production.yml | 1 + website/_config.yml | 50 + website/_data/authors.yml | 4 + website/_data/logos.yml | 8 + website/_distributedlog_team/team.md | 59 + website/_includes/authors-list.md | 1 + website/_includes/footer.html | 15 + website/_includes/head.html | 26 + website/_includes/header.html | 117 + website/_includes/icon-github.html | 1 + website/_includes/icon-github.svg | 1 + website/_includes/icon-twitter.html | 1 + website/_includes/icon-twitter.svg | 1 + website/_layouts/default.html | 21 + website/_layouts/page.html | 14 + website/_layouts/post.html | 17 + website/_mentors/mentors.md | 28 + website/_sass/_base.scss | 206 ++ website/_sass/_bootstrap.scss | 56 + website/_sass/_layout.scss | 242 ++ website/_sass/_syntax-highlighting.scss | 71 + website/_sass/bootstrap/_alerts.scss | 73 + website/_sass/bootstrap/_badges.scss | 68 + website/_sass/bootstrap/_breadcrumbs.scss | 28 + website/_sass/bootstrap/_button-groups.scss | 244 ++ website/_sass/bootstrap/_buttons.scss | 168 ++ website/_sass/bootstrap/_carousel.scss | 270 ++ website/_sass/bootstrap/_close.scss | 36 + website/_sass/bootstrap/_code.scss | 69 + .../_sass/bootstrap/_component-animations.scss | 37 + website/_sass/bootstrap/_dropdowns.scss | 216 ++ website/_sass/bootstrap/_forms.scss | 617 +++++ website/_sass/bootstrap/_glyphicons.scss | 307 +++ website/_sass/bootstrap/_grid.scss | 84 + website/_sass/bootstrap/_input-groups.scss | 171 ++ website/_sass/bootstrap/_jumbotron.scss | 54 + website/_sass/bootstrap/_labels.scss | 66 + website/_sass/bootstrap/_list-group.scss | 130 + website/_sass/bootstrap/_media.scss | 66 + website/_sass/bootstrap/_mixins.scss | 40 + website/_sass/bootstrap/_modals.scss | 150 ++ website/_sass/bootstrap/_navbar.scss | 662 +++++ website/_sass/bootstrap/_navs.scss | 242 ++ website/_sass/bootstrap/_normalize.scss | 424 ++++ website/_sass/bootstrap/_pager.scss | 54 + website/_sass/bootstrap/_pagination.scss | 89 + website/_sass/bootstrap/_panels.scss | 271 ++ website/_sass/bootstrap/_popovers.scss | 131 + website/_sass/bootstrap/_print.scss | 101 + website/_sass/bootstrap/_progress-bars.scss | 87 + website/_sass/bootstrap/_responsive-embed.scss | 35 + .../_sass/bootstrap/_responsive-utilities.scss | 179 ++ website/_sass/bootstrap/_scaffolding.scss | 161 ++ website/_sass/bootstrap/_tables.scss | 234 ++ website/_sass/bootstrap/_theme.scss | 291 +++ website/_sass/bootstrap/_thumbnails.scss | 38 + website/_sass/bootstrap/_tooltip.scss | 101 + website/_sass/bootstrap/_type.scss | 298 +++ website/_sass/bootstrap/_utilities.scss | 55 + website/_sass/bootstrap/_variables.scss | 874 +++++++ website/_sass/bootstrap/_wells.scss | 29 + website/_sass/bootstrap/mixins/_alerts.scss | 14 + .../bootstrap/mixins/_background-variant.scss | 12 + .../_sass/bootstrap/mixins/_border-radius.scss | 18 + website/_sass/bootstrap/mixins/_buttons.scss | 65 + .../_sass/bootstrap/mixins/_center-block.scss | 7 + website/_sass/bootstrap/mixins/_clearfix.scss | 22 + website/_sass/bootstrap/mixins/_forms.scss | 88 + website/_sass/bootstrap/mixins/_gradients.scss | 58 + .../_sass/bootstrap/mixins/_grid-framework.scss | 81 + website/_sass/bootstrap/mixins/_grid.scss | 122 + website/_sass/bootstrap/mixins/_hide-text.scss | 21 + website/_sass/bootstrap/mixins/_image.scss | 33 + website/_sass/bootstrap/mixins/_labels.scss | 12 + website/_sass/bootstrap/mixins/_list-group.scss | 32 + .../_sass/bootstrap/mixins/_nav-divider.scss | 10 + .../bootstrap/mixins/_nav-vertical-align.scss | 9 + website/_sass/bootstrap/mixins/_opacity.scss | 8 + website/_sass/bootstrap/mixins/_pagination.scss | 24 + website/_sass/bootstrap/mixins/_panels.scss | 24 + .../_sass/bootstrap/mixins/_progress-bar.scss | 10 + .../_sass/bootstrap/mixins/_reset-filter.scss | 8 + website/_sass/bootstrap/mixins/_reset-text.scss | 18 + website/_sass/bootstrap/mixins/_resize.scss | 6 + .../mixins/_responsive-visibility.scss | 21 + website/_sass/bootstrap/mixins/_size.scss | 10 + website/_sass/bootstrap/mixins/_tab-focus.scss | 9 + website/_sass/bootstrap/mixins/_table-row.scss | 28 + .../_sass/bootstrap/mixins/_text-emphasis.scss | 12 + .../_sass/bootstrap/mixins/_text-overflow.scss | 8 + .../bootstrap/mixins/_vendor-prefixes.scss | 222 ++ website/blog/index.md | 36 + website/build.sh | 49 + website/coming-soon.md | 9 + website/community/community.md | 66 + website/community/team.md | 70 + website/contribute.md | 93 + website/css/main.scss | 53 + website/css/theme.css | 21 + website/faq.md | 21 + website/feed.xml | 30 + .../bootstrap/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../bootstrap/glyphicons-halflings-regular.svg | 288 +++ .../bootstrap/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../bootstrap/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes website/images/distributedlog_logo_l.png | Bin 0 -> 20791 bytes website/images/distributedlog_logo_navbar.png | Bin 0 -> 9195 bytes website/images/distributedlog_logo_s.png | Bin 0 -> 2006 bytes website/images/favicon.ico | Bin 0 -> 1660 bytes website/index.md | 129 + website/js/bootstrap-sprockets.js | 12 + website/js/bootstrap.js | 2363 ++++++++++++++++++ website/js/bootstrap.min.js | 7 + website/js/bootstrap/affix.js | 162 ++ website/js/bootstrap/alert.js | 94 + website/js/bootstrap/button.js | 120 + website/js/bootstrap/carousel.js | 237 ++ website/js/bootstrap/collapse.js | 211 ++ website/js/bootstrap/dropdown.js | 165 ++ website/js/bootstrap/modal.js | 337 +++ website/js/bootstrap/popover.js | 108 + website/js/bootstrap/scrollspy.js | 172 ++ website/js/bootstrap/tab.js | 155 ++ website/js/bootstrap/tooltip.js | 514 ++++ website/js/bootstrap/transition.js | 59 + website/project/presentations.md | 18 + website/styles/site.scss | 4 + 346 files changed, 37282 insertions(+), 4561 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/.gitmodules ---------------------------------------------------------------------- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ecfc44f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "website/_plugins/jekyll-rst"] + path = website/_plugins/jekyll-rst + url = https://github.com/xdissent/jekyll-rst.git http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/.gitignore ---------------------------------------------------------------------- diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..c28a8b0 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,5 @@ +_site/ +.sass-cache/ +.jekyll-metadata +_pdf +.idea/ http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/Gemfile ---------------------------------------------------------------------- diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..8bc5038 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' +gem 'jekyll' +gem 'jekyll-redirect-from' +gem 'html-proofer' +gem 'RbST' http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/Gemfile.lock ---------------------------------------------------------------------- diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..136ae6f --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,83 @@ +GEM + remote: https://rubygems.org/ + specs: + RbST (0.5.1) + activesupport (4.2.7) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) + colorator (1.1.0) + colored (1.2) + ethon (0.9.0) + ffi (>= 1.3.0) + ffi (1.9.14) + forwardable-extended (2.6.0) + html-proofer (3.0.6) + activesupport (~> 4.2) + addressable (~> 2.3) + colored (~> 1.2) + mercenary (~> 0.3.2) + nokogiri (~> 1.5) + parallel (~> 1.3) + typhoeus (~> 0.7) + yell (~> 2.0) + i18n (0.7.0) + jekyll (3.2.1) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-redirect-from (0.11.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.4.0) + sass (~> 3.4) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + json (1.8.3) + kramdown (1.11.1) + liquid (3.0.6) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + mercenary (0.3.6) + mini_portile2 (2.1.0) + minitest (5.9.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + parallel (1.9.0) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + pkg-config (1.1.7) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rouge (1.11.1) + safe_yaml (1.0.4) + sass (3.4.22) + thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + yell (2.0.6) + +PLATFORMS + ruby + +DEPENDENCIES + RbST + html-proofer + jekyll + jekyll-redirect-from + +BUNDLED WITH + 1.12.5 http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/Rakefile ---------------------------------------------------------------------- diff --git a/docs/Rakefile b/docs/Rakefile new file mode 100644 index 0000000..9778c98 --- /dev/null +++ b/docs/Rakefile @@ -0,0 +1,10 @@ +require 'html-proofer' + +task :test do + sh "bundle exec jekyll build" + HTMLProofer.check_directory("./content", { + :allow_hash_href => true, + :check_html => true, + :file_ignore => [/javadoc/] + }).run +end http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_config-local.yml ---------------------------------------------------------------------- diff --git a/docs/_config-local.yml b/docs/_config-local.yml new file mode 100644 index 0000000..5832f1d --- /dev/null +++ b/docs/_config-local.yml @@ -0,0 +1 @@ +baseurl: "https://sijie.github.io/incubator-distributedlog/docs/latest" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_config-production.yml ---------------------------------------------------------------------- diff --git a/docs/_config-production.yml b/docs/_config-production.yml new file mode 100644 index 0000000..2c71bf5 --- /dev/null +++ b/docs/_config-production.yml @@ -0,0 +1 @@ +baseurl: "http://distributedlog.incubator.apache.org/docs/latest" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_config.yml ---------------------------------------------------------------------- diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..c93ef96 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,50 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely need to edit after that. +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'jekyll serve'. If you change this file, please restart the server process. + +# Site settings +title: Apache DistributedLog (incubating) +description: > # this means to ignore newlines until "baseurl:" + Apache DistributedLog is an high performance replicated log. + +# the subpath of your site, e.g. /blog +baseurl: "" + +distributedlog_version: "0.4.0-SNAPSHOT" +distributedlog_version_short: "0.4.0" + +# the base hostname & protocol for your site +# url: "http://distributedlog.incubator.apache.org" +url: "" + +twitter_username: distributedlog +twitter_url: https://twitter.com/distributedlog +github_url: https://github.com/apache/incubator-distributedlog +wiki_url: https://cwiki.apache.org/confluence/display/DL/Apache+DistributedLog+Home +jira_url: https://issues.apache.org/jira/browse/DL + +# Build settings +markdown: kramdown + +kramdown: + auto_ids: true + +redcarpet: + # https://george-hawkins.github.io/basic-gfm-jekyll/redcarpet-extensions.html + extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", + "tables", "with_toc_data", "strikethrough", "superscript", + "lax_spacing"] + +# Things to ignore in the build +exclude: ['README.md', 'Gemfile.lock', 'Gemfile', 'Rakefile'] + +# Downloads directory +downloads: downloads + +tracking_id: UA-83870961-1 + +gems: + - jekyll-redirect-from http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_includes/anchors_links.html ---------------------------------------------------------------------- diff --git a/docs/_includes/anchors_links.html b/docs/_includes/anchors_links.html new file mode 100644 index 0000000..024f757 --- /dev/null +++ b/docs/_includes/anchors_links.html @@ -0,0 +1,7 @@ +<script> + (function () { + 'use strict'; + anchors.options.placement = 'right'; + anchors.add(); + })(); +</script> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_includes/footer.html ---------------------------------------------------------------------- diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html new file mode 100644 index 0000000..9f5f894 --- /dev/null +++ b/docs/_includes/footer.html @@ -0,0 +1,15 @@ +<hr> + <div class="row"> + <div class="col-xs-12"> + <footer> + <p class="text-center">© Copyright 2016 + <a href="http://www.apache.org">The Apache Software Foundation.</a> All Rights Reserved. + </p> + <p class="text-center"> + <a href="{{ "/feed.xml" | prepend: site.baseurl }}">RSS Feed</a> + </p> + </footer> + </div> + </div> + <!-- container div end --> +</div> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_includes/head.html ---------------------------------------------------------------------- diff --git a/docs/_includes/head.html b/docs/_includes/head.html new file mode 100644 index 0000000..3a3db3e --- /dev/null +++ b/docs/_includes/head.html @@ -0,0 +1,30 @@ +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title> + <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}"> + + <link rel="stylesheet" href="{{ "/styles/site.css" | prepend: site.baseurl }}"> + <link rel="stylesheet" href="{{ "/css/theme.css" | prepend: site.baseurl }}"> + <!-- JQuery --> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> + <script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script> + <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}" data-proofer-ignore> + <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}"> + <!-- Font Awesome --> + <script src="//cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.0/anchor.min.js"></script> + <!-- Google Analytics --> + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', '{{ site.tracking_id }}', 'auto'); + ga('send', 'pageview'); + </script> + <!-- End Google Analytics --> + <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> +</head> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_includes/header.html ---------------------------------------------------------------------- diff --git a/docs/_includes/header.html b/docs/_includes/header.html new file mode 100644 index 0000000..2d547c5 --- /dev/null +++ b/docs/_includes/header.html @@ -0,0 +1,126 @@ +{% capture start %}{{site.baseurl}}/start{% endcapture %} +<nav class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <a href="/" class="navbar-brand" > + <img alt="Brand" style="height: 28px" src="{{ "/images/distributedlog_logo_navbar.png" | prepend: site.baseurl }}"> + </a> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <!-- Overview --> + <li><a href="{{ site.baseurl}}/">V{{ site.distributedlog_version_short }}</a></li> + <!-- Concepts --> + <li><a href="{{ site.baseurl }}/basics/introduction">Concepts</a></li> + <!-- Quick Start --> + <li> + <a href="{{ start }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Start<span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + {% assign setup_group = (site.pages | where: "top-nav-group" , "setup" | sort: "top-nav-pos") %} + {% for setup_group_page in setup_group %} + <li> + <a href="{{ site.baseurl }}{{ setup_group_page.url }}"> + {% if setup_group_page.top-nav-title %}{{ setup_group_page.top-nav-title }}{% else %}{{ setup_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + <li role="separator" class="divider"></li> + <li class="dropdown-header"><strong>Quickstart</strong></li> + {% assign quickstart_group = (site.pages | where: "top-nav-group" , "quickstart" | sort: "top-nav-pos") %} + {% for quickstart_group_page in quickstart_group %} + <li> + <a href="{{ site.baseurl }}{{ quickstart_group_page.url }}"> + {% if quickstart_group_page.top-nav-title %}{{ quickstart_group_page.top-nav-title }}{% else %}{{ quickstart_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + <li role="separator" class="divider"></li> + <li class="dropdown-header"><strong>Deployment</strong></li> + {% assign deployment_group = (site.pages | where: "top-nav-group" , "deployment" | sort: "top-nav-pos") %} + {% for deployment_group_page in deployment_group %} + <li> + <a href="{{ site.baseurl }}{{ deployment_group_page.url }}"> + {% if deployment_group_page.top-nav-title %}{{ deployment_group_page.top-nav-title }}{% else %}{{ deployment_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + </ul> + </li> + <!-- User Guide --> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">User Guide<span class="caret"></span></a> + <ul class="dropdown-menu"> + {% assign userguide_group = (site.pages | where: "top-nav-group" , "user-guide" | sort: "top-nav-pos") %} + {% for userguide_group_page in userguide_group %} + <li> + <a href="{{ site.baseurl }}{{ userguide_group_page.url }}"> + {% if userguide_group_page.top-nav-title %}{{ userguide_group_page.top-nav-title }}{% else %}{{ userguide_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + </ul> + </li> + <!-- Admin Guide --> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Admin Guide<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="{{ site.baseurl }}/deployment/cluster">Cluster Setup</a></li> + {% assign adminguide_group = (site.pages | where: "top-nav-group" , "admin-guide" | sort: "top-nav-pos") %} + {% for adminguide_group_page in adminguide_group %} + <li> + <a href="{{ site.baseurl }}{{ adminguide_group_page.url }}"> + {% if adminguide_group_page.top-nav-title %}{{ adminguide_group_page.top-nav-title }}{% else %}{{ adminguide_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + </ul> + </li> + <!-- Tutorials --> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Tutorials<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li class="dropdown-header"><strong>Basic</strong></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-1">Write Records (via Core Library)</a></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-2">Write Records (via Write Proxy)</a></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-3">Write Records to multiple streams</a></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-4">Atomic Write Records</a></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-5">Tailing Read Records</a></li> + <li><a href="{{ site.baseurl }}/tutorials/basic-6">Rewind Read Records</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header"><strong>Messaging</strong></li> + {% assign messaging_group = (site.pages | where: "top-nav-group" , "messaging" | sort: "top-nav-pos") %} + {% for messaging_group_page in messaging_group %} + <li> + <a href="{{ site.baseurl }}{{ messaging_group_page.url }}"> + {% if messaging_group_page.top-nav-title %}{{ messaging_group_page.top-nav-title }}{% else %}{{ messaging_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + <li role="separator" class="divider"></li> + <li class="dropdown-header"><strong>Replicated State Machines</strong></li> + {% assign rsm_group = (site.pages | where: "top-nav-group" , "replicatedstatemachine" | sort: "top-nav-pos") %} + {% for rsm_group_page in rsm_group %} + <li> + <a href="{{ site.baseurl }}{{ rsm_group_page.url }}"> + {% if rsm_group_page.top-nav-title %}{{ rsm_group_page.top-nav-title }}{% else %}{{ rsm_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + <li role="separator" class="divider"></li> + <li class="dropdown-header"><strong>Analytics</strong></li> + <li><a href="{{ site.baseurl }}/tutorials/analytics-mapreduce">Process log streams using MapReduce</a></li> + </ul> + </li> + </ul> + </div><!--/.nav-collapse --> + </div> +</nav> + + +<link rel="stylesheet" href=""> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_layouts/base.html ---------------------------------------------------------------------- diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html new file mode 100644 index 0000000..96f226e --- /dev/null +++ b/docs/_layouts/base.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="en"> + + {% include head.html %} + + <body role="document"> + + {% include header.html %} + + <div class="container" role="main"> + + <div class="row"> + {% comment %} + This is the base for all content. The content from the layouts found in + the _layouts directory goes here. + {% endcomment %} + {{ content }} + </div> + + + {% include footer.html %} + + {% include anchors_links.html %} + </body> + +</html> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_layouts/default.html ---------------------------------------------------------------------- diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 0000000..eb36065 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,114 @@ +--- +layout: base +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +{% if page.sub-nav-group and page.sub-nav-parent != "_root_" %} +{% comment %} +The plain layout with a sub navigation. + +- This is activated via the 'sub-nav-group' field in the preemble. +- All pages of this sub nav group will be displayed in the sub navigation: + * Each element without a 'sub-nav-parent' field will be displayed on the 1st level, where the position is defined via 'sub-nav-pos'. + * If the page should be displayed as a child element, it needs to specify a 'sub-nav-parent' field, which matches the 'sub-nav-id' of its parent. The parent only needs to specify this if it expects child nodes. +{% endcomment %} +<div class="row"> + <!-- Sub Navigation --> + <div class="col-sm-3"> + <ul id="sub-nav"> + {% comment %} Get all pages belonging to this group sorted by their position {% endcomment %} + {% assign group = (site.pages | where: "sub-nav-group" , page.sub-nav-group | where: "sub-nav-parent", "_root_" | sort:"sub-nav-pos") %} + {% for group_page in group %} + {% if group_page.sub-nav-id %} + {% assign sub_group = (site.pages | where: "sub-nav-group" , page.sub-nav-group | where: "sub-nav-parent" , group_page.sub-nav-id | sort: "sub-nav-pos") %} + {% else %} + {% assign sub_group = nil %} + {% endif %} + <li><a href="{{ site.baseurl }}{{ group_page.url }}" class="{% if page.url contains group_page.url %}active{% endif %}">{% if group_page.sub-nav-title %}{{ group_page.sub-nav-title }}{% else %}{{ group_page.title }}{% endif %}</a> + {% if sub_group %} + <ul> + {% for sub_group_page in sub_group %} + {% if sub_group_page.sub-nav-id %} + {% assign sub_sub_group = (site.pages | where: "sub-nav-group", page.sub-nav-group | where: "sub-nav-parent", sub_group_page.sub-nav-id | sort: "sub-nav-pos") %} + {% else %} + {% assign sub_sub_group = nil %} + {% endif %} + <li> + <a href="{{ site.baseurl }}{{ sub_group_page.url }}" class="{% if page.url contains sub_group_page.url %}active{% endif %}"> + {% if sub_group_page.sub-nav-title %}{{ sub_group_page.sub-nav-title }}{% else %}{{ sub_group_page.title }}{% endif %} + </a> + {% if sub_sub_group %} + <ul> + {% for sub_sub_group_page in sub_sub_group %} + {% assign item_active = (page.url contains sub_sub_group_page.url or (sub_sub_group_page.sub-nav-id and page.sub-nav-parent and sub_sub_group_page.sub-nav-id == sub_group_page.sub-nav-parent)) %} + <li> + <a href="{{ site.baseurl }}{{ sub_sub_group_page.url }}" class="{% if item_active %}active{% endif %}"> + {% if sub_sub_group_page.sub-nav-title %}{{ sub_sub_group_page.sub-nav-title }}{% else %}{{ sub_sub_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> + </div> + <!-- Main --> + <div class="col-sm-9"> + <!-- Top anchor --> + <a href="#top"></a> + + <!-- Breadcrumbs above the main heading --> + <ol class="breadcrumb"> + + {% if page.sub-nav-parent %} + {% assign parent = (site.pages | where: "sub-nav-group" , page.sub-nav-group | where: "sub-nav-id" , page.sub-nav-parent | first) %} + {% if parent %} + + {% if parent.sub-nav-parent %} + {% assign grandparent = (site.pages | where: "sub-nav-group" , page.sub-nav-group | where: "sub-nav-id" , parent.sub-nav-parent | first) %} + + {% if grandparent %} + <li><a href="{{ site.baseurl }}{{ grandparent.url }}">{% if grandparent.sub-nav-title %}{{ grandparent.sub-nav-title }}{% else %}{{ grandparent.title }}{% endif %}</a></li> + {% endif %} + + {% endif %} + + <li><a href="{{ site.baseurl }}{{ parent.url }}">{% if parent.sub-nav-title %}{{ parent.sub-nav-title }}{% else %}{{ parent.title }}{% endif %}</a></li> + {% endif %} + {% endif %} + <li class="active">{% if page.sub-nav-title %}{{ page.sub-nav-title }}{% else %}{{ page.title }}{% endif %}</li> + </ol> + + <div class="text"> + <!-- Content --> + {{ content }} + </div> + </div> +</div> +{% else %} +<div class="col-md-8 col-md-offset-2"> + {{ content }} +</div> +{% endif %} + http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_layouts/guide.html ---------------------------------------------------------------------- diff --git a/docs/_layouts/guide.html b/docs/_layouts/guide.html new file mode 100644 index 0000000..b665949 --- /dev/null +++ b/docs/_layouts/guide.html @@ -0,0 +1,46 @@ +--- +layout: base +--- +<div class="col-md-8 col-md-offset-2"> + <ul id="sub-nav"> + {% comment %} Get all pages belonging to this group sorted by their position {% endcomment %} + {% assign group = (site.pages | where: "sub-nav-group" , page.sub-nav-id | where: "sub-nav-parent", "_root_" | sort:"sub-nav-pos") %} + {% for group_page in group %} + {% if group_page.sub-nav-id %} + {% assign sub_group = (site.pages | where: "sub-nav-group" , page.sub-nav-group | where: "sub-nav-parent" , group_page.sub-nav-id | sort: "sub-nav-pos") %} + {% else %} + {% assign sub_group = nil %} + {% endif %} + <li><a href="{{ site.baseurl }}{{ group_page.url }}" class="{% if page.url contains group_page.url %}active{% endif %}">{% if group_page.sub-nav-title %}{{ group_page.sub-nav-title }}{% else %}{{ group_page.title }}{% endif %}</a> + {% if sub_group %} + <ul> + {% for sub_group_page in sub_group %} + {% if sub_group_page.sub-nav-id %} + {% assign sub_sub_group = (site.pages | where: "sub-nav-group", page.sub-nav-group | where: "sub-nav-parent", sub_group_page.sub-nav-id | sort: "sub-nav-pos") %} + {% else %} + {% assign sub_sub_group = nil %} + {% endif %} + <li> + <a href="{{ site.baseurl }}{{ sub_group_page.url }}" class="{% if page.url contains sub_group_page.url %}active{% endif %}"> + {% if sub_group_page.sub-nav-title %}{{ sub_group_page.sub-nav-title }}{% else %}{{ sub_group_page.title }}{% endif %} + </a> + {% if sub_sub_group %} + <ul> + {% for sub_sub_group_page in sub_sub_group %} + {% assign item_active = (page.url contains sub_sub_group_page.url or (sub_sub_group_page.sub-nav-id and page.sub-nav-parent and sub_sub_group_page.sub-nav-id == sub_group_page.sub-nav-parent)) %} + <li> + <a href="{{ site.baseurl }}{{ sub_sub_group_page.url }}" class="{% if item_active %}active{% endif %}"> + {% if sub_sub_group_page.sub-nav-title %}{{ sub_sub_group_page.sub-nav-title }}{% else %}{{ sub_sub_group_page.title }}{% endif %} + </a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> +</div> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/.gitignore ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/.gitignore b/docs/_plugins/jekyll-rst/.gitignore new file mode 100644 index 0000000..7e99e36 --- /dev/null +++ b/docs/_plugins/jekyll-rst/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/LICENSE.txt ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/LICENSE.txt b/docs/_plugins/jekyll-rst/LICENSE.txt new file mode 100644 index 0000000..988ac9e --- /dev/null +++ b/docs/_plugins/jekyll-rst/LICENSE.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright (c) 2011 Greg Thornton, http://xdissent.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/README.rst ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/README.rst b/docs/_plugins/jekyll-rst/README.rst new file mode 100644 index 0000000..48c21f4 --- /dev/null +++ b/docs/_plugins/jekyll-rst/README.rst @@ -0,0 +1,97 @@ +Overview +======== + +This plugin adds `ReStructuredText`_ support to `Jekyll`_ and `Octopress`_. +It renders ReST in posts and pages, and provides a custom directive to +support Octopress-compatible syntax highlighting. + +Requirements +============ + +* Jekyll *or* Octopress >= 2.0 +* Docutils +* Pygments +* `RbST`_ + +Installation +============ + +1. Install Docutils and Pygments. + + The most convenient way is to use virtualenv_burrito: + + :: + + $ curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | bash + $ source /Users/xdissent/.venvburrito/startup.sh + $ mkvirtualenv jekyll-rst + $ pip install docutils pygments + +2. Install RbST. + + If you use `bundler`_ with Octopress, add ``gem 'RbST'`` to + your ``Gemfile`` in the ``development`` group, then run + ``bundle install``. Otherwise, ``gem install RbST``. + +3. Install the plugin. + + For Jekyll: + + :: + + $ cd <jekyll-project-path> + $ git submodule add https://github.com/xdissent/jekyll-rst.git _plugins/jekyll-rst + + For Octopress: + + :: + + $ cd <octopress-project-path> + $ git submodule add https://github.com/xdissent/jekyll-rst.git plugins/jekyll-rst + +4. Start blogging in ReStructuredText. Any file with the ``.rst`` extension + will be parsed as ReST and rendered into HTML. + + .. note:: Be sure to activate the ``jekyll-rst`` virtualenv before generating + the site by issuing a ``workon jekyll-rst``. I suggest you follow `Harry + Marr's advice`_ and create a ``.venv`` file that will automatically + activate the ``jekyll-rst`` virtualenv when you ``cd`` into your project. + +Source Code Highlighting +======================== + +A ``code-block`` ReST directive is registered and aliased as ``sourcecode``. +It adds syntax highlighting to code blocks in your documents:: + + .. code-block:: ruby + + # Output "I love ReST" + say = "I love ReST" + puts say + +Optional arguments exist to supply a caption, link, and link title:: + + .. code-block:: console + :caption: Read Hacker News on a budget + :url: http://news.ycombinator.com + :title: Hacker News + + $ curl http://news.ycombinator.com | less + +Octopress already includes style sheets for syntax highlighting, but you'll +need to generate one yourself if using Jekyll:: + + $ pygmentize -S default -f html > css/pygments.css + +Octopress Tips +============== + +* Use ``.. more`` in your ReST documents to indicate where Octopress's + ``excerpt`` tag should split your content for summary views. + +.. _ReStructuredText: http://docutils.sourceforge.net/rst.html +.. _Jekyll: http://jekyllrb.com/ +.. _Octopress: http://octopress.com/ +.. _RbST: http://rubygems.org/gems/RbST +.. _bundler: http://gembundler.com/ +.. _Harry Marr's advice: http://hmarr.com/2010/jan/19/making-virtualenv-play-nice-with-git/ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/converter.rb ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/converter.rb b/docs/_plugins/jekyll-rst/converter.rb new file mode 100644 index 0000000..64b639c --- /dev/null +++ b/docs/_plugins/jekyll-rst/converter.rb @@ -0,0 +1,30 @@ +require 'rbst' + +module Jekyll + class RestConverter < Converter + safe true + + priority :low + + def matches(ext) + ext =~ /rst/i + end + + def output_ext(ext) + ".html" + end + + def convert(content) + RbST.executables = {:html => "#{File.expand_path(File.dirname(__FILE__))}/rst2html.py"} + RbST.new(content).to_html(:part => :fragment, :initial_header_level => 2) + end + end + + module Filters + def restify(input) + site = @context.registers[:site] + converter = site.getConverterImpl(Jekyll::RestConverter) + converter.convert(input) + end + end +end \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/directives.py ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/directives.py b/docs/_plugins/jekyll-rst/directives.py new file mode 100644 index 0000000..ac59d06 --- /dev/null +++ b/docs/_plugins/jekyll-rst/directives.py @@ -0,0 +1,97 @@ +# Define a new directive `code-block` (aliased as `sourcecode`) that uses the +# `pygments` source highlighter to render code in color. +# +# Incorporates code from the `Pygments`_ documentation for `Using Pygments in +# ReST documents`_ and `Octopress`_. +# +# .. _Pygments: http://pygments.org/ +# .. _Using Pygments in ReST documents: http://pygments.org/docs/rstdirective/ +# .. _Octopress: http://octopress.org/ + +import re +import os +import hashlib +import __main__ + +# Absolute path to pygments cache dir +PYGMENTS_CACHE_DIR = os.path.abspath(os.path.join(os.path.dirname(__main__.__file__), '../../.pygments-cache')) + +# Ensure cache dir exists +if not os.path.exists(PYGMENTS_CACHE_DIR): + os.makedirs(PYGMENTS_CACHE_DIR) + +from pygments.formatters import HtmlFormatter + +from docutils import nodes +from docutils.parsers.rst import directives, Directive + +from pygments import highlight +from pygments.lexers import get_lexer_by_name, TextLexer + +class Pygments(Directive): + """ Source code syntax hightlighting. + """ + required_arguments = 1 + optional_arguments = 0 + final_argument_whitespace = True + string_opts = ['title', 'url', 'caption'] + option_spec = dict([(key, directives.unchanged) for key in string_opts]) + has_content = True + + def run(self): + self.assert_has_content() + try: + lexer_name = self.arguments[0] + lexer = get_lexer_by_name(lexer_name) + except ValueError: + # no lexer found - use the text one instead of an exception + lexer_name = 'text' + lexer = TextLexer() + formatter = HtmlFormatter() + + # Construct cache filename + cache_file = None + content_text = u'\n'.join(self.content) + cache_file_name = '%s-%s.html' % (lexer_name, hashlib.md5(content_text).hexdigest()) + cached_path = os.path.join(PYGMENTS_CACHE_DIR, cache_file_name) + + # Look for cached version, otherwise parse + if os.path.exists(cached_path): + cache_file = open(cached_path, 'r') + parsed = cache_file.read() + else: + parsed = highlight(content_text, lexer, formatter) + + # Strip pre tag and everything outside it + pres = re.compile("<pre>(.+)<\/pre>", re.S) + stripped = pres.search(parsed).group(1) + + # Create tabular code with line numbers + table = '<div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers">' + lined = '' + for idx, line in enumerate(stripped.splitlines(True)): + table += '<span class="line-number">%d</span>\n' % (idx + 1) + lined += '<span class="line">%s</span>' % line + table += '</pre></td><td class="code"><pre><code class="%s">%s</code></pre></td></tr></table></div>' % (lexer_name, lined) + + # Add wrapper with optional caption and link + code = '<figure class="code">' + if self.options: + caption = ('<span>%s</span>' % self.options['caption']) if 'caption' in self.options else '' + title = self.options['title'] if 'title' in self.options else 'link' + link = ('<a href="%s">%s</a>' % (self.options['url'], title)) if 'url' in self.options else '' + + if caption or link: + code += '<figcaption>%s %s</figcaption>' % (caption, link) + code += '%s</figure>' % table + + # Write cache + if cache_file is None: + cache_file = open(cached_path, 'w') + cache_file.write(parsed) + cache_file.close() + + return [nodes.raw('', code, format='html')] + +directives.register_directive('code-block', Pygments) +directives.register_directive('sourcecode', Pygments) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/rst2html.py ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/rst2html.py b/docs/_plugins/jekyll-rst/rst2html.py new file mode 100644 index 0000000..0190da0 --- /dev/null +++ b/docs/_plugins/jekyll-rst/rst2html.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# :Author: David Goodger, the Pygments team, Guenter Milde +# :Date: $Date: $ +# :Copyright: This module has been placed in the public domain. + +# This is a merge of the `Docutils`_ `rst2html` front end with an extension +# suggestion taken from the `Pygments`_ documentation, reworked specifically +# for `Octopress`_. +# +# .. _Pygments: http://pygments.org/ +# .. _Docutils: http://docutils.sourceforge.net/ +# .. _Octopress: http://octopress.org/ + +""" +A front end to docutils, producing HTML with syntax colouring using pygments +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from transform import transform +from docutils.writers.html4css1 import Writer +from docutils.core import default_description +from directives import Pygments + +description = ('Generates (X)HTML documents from standalone reStructuredText ' + 'sources. Uses `pygments` to colorize the content of' + '"code-block" directives. Needs an adapted stylesheet' + + default_description) + +def main(): + return transform(writer=Writer(), part='html_body') + +if __name__ == '__main__': + print(main()) http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_plugins/jekyll-rst/transform.py ---------------------------------------------------------------------- diff --git a/docs/_plugins/jekyll-rst/transform.py b/docs/_plugins/jekyll-rst/transform.py new file mode 100644 index 0000000..f34723f --- /dev/null +++ b/docs/_plugins/jekyll-rst/transform.py @@ -0,0 +1,40 @@ +import sys +from docutils.core import publish_parts +from optparse import OptionParser +from docutils.frontend import OptionParser as DocutilsOptionParser +from docutils.parsers.rst import Parser + +def transform(writer=None, part=None): + p = OptionParser(add_help_option=False) + + # Collect all the command line options + docutils_parser = DocutilsOptionParser(components=(writer, Parser())) + for group in docutils_parser.option_groups: + p.add_option_group(group.title, None).add_options(group.option_list) + + p.add_option('--part', default=part) + + opts, args = p.parse_args() + + settings = dict({ + 'file_insertion_enabled': False, + 'raw_enabled': False, + }, **opts.__dict__) + + if len(args) == 1: + try: + content = open(args[0], 'r').read() + except IOError: + content = args[0] + else: + content = sys.stdin.read() + + parts = publish_parts( + source=content, + settings_overrides=settings, + writer=writer, + ) + + if opts.part in parts: + return parts[opts.part] + return '' \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/_base.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss new file mode 100644 index 0000000..0883c3c --- /dev/null +++ b/docs/_sass/_base.scss @@ -0,0 +1,206 @@ +/** + * Reset some basic elements + */ +body, h1, h2, h3, h4, h5, h6, +p, blockquote, pre, hr, +dl, dd, ol, ul, figure { + margin: 0; + padding: 0; +} + + + +/** + * Basic styling + */ +body { + font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; + color: $text-color; + background-color: $background-color; + -webkit-text-size-adjust: 100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; + -o-font-feature-settings: "kern" 1; + font-feature-settings: "kern" 1; + font-kerning: normal; +} + + + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +%vertical-rhythm { + margin-bottom: $spacing-unit / 2; +} + + + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; +} + + + +/** + * Figures + */ +figure > img { + display: block; +} + +figcaption { + font-size: $small-font-size; +} + + + +/** + * Lists + */ +ul, ol { + margin-left: $spacing-unit; +} + +li { + > ul, + > ol { + margin-bottom: 0; + } +} + + + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-weight: $base-font-weight; +} + + + +/** + * Links + */ +a { + color: $brand-color; + text-decoration: none; + + &:visited { + color: darken($brand-color, 15%); + } + + &:hover { + color: $text-color; + text-decoration: underline; + } +} + + + +/** + * Blockquotes + */ +blockquote { + color: $grey-color; + border-left: 4px solid $grey-color-light; + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + + + +/** + * Code formatting + */ +pre, +code { + font-size: 15px; + border: 1px solid $grey-color-light; + border-radius: 3px; + background-color: #eef; +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + overflow-x: auto; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + + + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); + max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; + + @include media-query($on-laptop) { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); + max-width: calc(#{$content-width} - (#{$spacing-unit})); + padding-right: $spacing-unit / 2; + padding-left: $spacing-unit / 2; + } +} + + + +/** + * Clearfix + */ +%clearfix { + + &:after { + content: ""; + display: table; + clear: both; + } +} + + + +/** + * Icons + */ +.icon { + + > svg { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + + path { + fill: $grey-color; + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/_bootstrap.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/_bootstrap.scss b/docs/_sass/_bootstrap.scss new file mode 100755 index 0000000..c773c8c --- /dev/null +++ b/docs/_sass/_bootstrap.scss @@ -0,0 +1,56 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +// Core variables and mixins +@import "bootstrap/variables"; +@import "bootstrap/mixins"; + +// Reset and dependencies +@import "bootstrap/normalize"; +@import "bootstrap/print"; +@import "bootstrap/glyphicons"; + +// Core CSS +@import "bootstrap/scaffolding"; +@import "bootstrap/type"; +@import "bootstrap/code"; +@import "bootstrap/grid"; +@import "bootstrap/tables"; +@import "bootstrap/forms"; +@import "bootstrap/buttons"; + +// Components +@import "bootstrap/component-animations"; +@import "bootstrap/dropdowns"; +@import "bootstrap/button-groups"; +@import "bootstrap/input-groups"; +@import "bootstrap/navs"; +@import "bootstrap/navbar"; +@import "bootstrap/breadcrumbs"; +@import "bootstrap/pagination"; +@import "bootstrap/pager"; +@import "bootstrap/labels"; +@import "bootstrap/badges"; +@import "bootstrap/jumbotron"; +@import "bootstrap/thumbnails"; +@import "bootstrap/alerts"; +@import "bootstrap/progress-bars"; +@import "bootstrap/media"; +@import "bootstrap/list-group"; +@import "bootstrap/panels"; +@import "bootstrap/responsive-embed"; +@import "bootstrap/wells"; +@import "bootstrap/close"; + +// Components w/ JavaScript +@import "bootstrap/modals"; +@import "bootstrap/tooltip"; +@import "bootstrap/popovers"; +@import "bootstrap/carousel"; + +// Utility classes +@import "bootstrap/utilities"; +@import "bootstrap/responsive-utilities"; http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/_layout.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/_layout.scss b/docs/_sass/_layout.scss new file mode 100644 index 0000000..9cbfdde --- /dev/null +++ b/docs/_sass/_layout.scss @@ -0,0 +1,242 @@ +/** + * Site header + */ +.site-header { + border-top: 5px solid $grey-color-dark; + border-bottom: 1px solid $grey-color-light; + min-height: 56px; + + // Positioning context for the mobile navigation icon + position: relative; +} + +.site-title { + font-size: 26px; + font-weight: 300; + line-height: 56px; + letter-spacing: -1px; + margin-bottom: 0; + float: left; + + &, + &:visited { + color: $grey-color-dark; + } +} + +.site-nav { + float: right; + line-height: 56px; + + .menu-icon { + display: none; + } + + .page-link { + color: $text-color; + line-height: $base-line-height; + + // Gaps between nav items, but not on the last one + &:not(:last-child) { + margin-right: 20px; + } + } + + @include media-query($on-palm) { + position: absolute; + top: 9px; + right: $spacing-unit / 2; + background-color: $background-color; + border: 1px solid $grey-color-light; + border-radius: 5px; + text-align: right; + + .menu-icon { + display: block; + float: right; + width: 36px; + height: 26px; + line-height: 0; + padding-top: 10px; + text-align: center; + + > svg { + width: 18px; + height: 15px; + + path { + fill: $grey-color-dark; + } + } + } + + .trigger { + clear: both; + display: none; + } + + &:hover .trigger { + display: block; + padding-bottom: 5px; + } + + .page-link { + display: block; + padding: 5px 10px; + + &:not(:last-child) { + margin-right: 0; + } + margin-left: 20px; + } + } +} + + + +/** + * Site footer + */ +.site-footer { + border-top: 1px solid $grey-color-light; + padding: $spacing-unit 0; +} + +.footer-heading { + font-size: 18px; + margin-bottom: $spacing-unit / 2; +} + +.contact-list, +.social-media-list { + list-style: none; + margin-left: 0; +} + +.footer-col-wrapper { + font-size: 15px; + color: $grey-color; + margin-left: -$spacing-unit / 2; + @extend %clearfix; +} + +.footer-col { + float: left; + margin-bottom: $spacing-unit / 2; + padding-left: $spacing-unit / 2; +} + +.footer-col-1 { + width: -webkit-calc(35% - (#{$spacing-unit} / 2)); + width: calc(35% - (#{$spacing-unit} / 2)); +} + +.footer-col-2 { + width: -webkit-calc(20% - (#{$spacing-unit} / 2)); + width: calc(20% - (#{$spacing-unit} / 2)); +} + +.footer-col-3 { + width: -webkit-calc(45% - (#{$spacing-unit} / 2)); + width: calc(45% - (#{$spacing-unit} / 2)); +} + +@include media-query($on-laptop) { + .footer-col-1, + .footer-col-2 { + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); + } + + .footer-col-3 { + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + +@include media-query($on-palm) { + .footer-col { + float: none; + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + + + +/** + * Page content + */ +.page-content { + padding: $spacing-unit 0; +} + +.page-heading { + font-size: 20px; +} + +.post-list { + margin-left: 0; + list-style: none; + + > li { + margin-bottom: $spacing-unit; + } +} + +.post-meta { + font-size: $small-font-size; + color: $grey-color; +} + +.post-link { + display: block; + font-size: 24px; +} + + + +/** + * Posts + */ +.post-header { + margin-bottom: $spacing-unit; +} + +.post-title { + font-size: 42px; + letter-spacing: -1px; + line-height: 1; + + @include media-query($on-laptop) { + font-size: 36px; + } +} + +.post-content { + margin-bottom: $spacing-unit; + + h2 { + font-size: 32px; + + @include media-query($on-laptop) { + font-size: 28px; + } + } + + h3 { + font-size: 26px; + + @include media-query($on-laptop) { + font-size: 22px; + } + } + + h4 { + font-size: 20px; + + @include media-query($on-laptop) { + font-size: 18px; + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/_syntax-highlighting.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/_syntax-highlighting.scss b/docs/_sass/_syntax-highlighting.scss new file mode 100644 index 0000000..8fac597 --- /dev/null +++ b/docs/_sass/_syntax-highlighting.scss @@ -0,0 +1,71 @@ +/** + * Syntax highlighting styles + */ +.highlight { + background: #fff; + @extend %vertical-rhythm; + + .highlighter-rouge & { + background: #eef; + } + + .c { color: #998; font-style: italic } // Comment + .err { color: #a61717; background-color: #e3d2d2 } // Error + .k { font-weight: bold } // Keyword + .o { font-weight: bold } // Operator + .cm { color: #998; font-style: italic } // Comment.Multiline + .cp { color: #999; font-weight: bold } // Comment.Preproc + .c1 { color: #998; font-style: italic } // Comment.Single + .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special + .gd { color: #000; background-color: #fdd } // Generic.Deleted + .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific + .ge { font-style: italic } // Generic.Emph + .gr { color: #a00 } // Generic.Error + .gh { color: #999 } // Generic.Heading + .gi { color: #000; background-color: #dfd } // Generic.Inserted + .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific + .go { color: #888 } // Generic.Output + .gp { color: #555 } // Generic.Prompt + .gs { font-weight: bold } // Generic.Strong + .gu { color: #aaa } // Generic.Subheading + .gt { color: #a00 } // Generic.Traceback + .kc { font-weight: bold } // Keyword.Constant + .kd { font-weight: bold } // Keyword.Declaration + .kp { font-weight: bold } // Keyword.Pseudo + .kr { font-weight: bold } // Keyword.Reserved + .kt { color: #458; font-weight: bold } // Keyword.Type + .m { color: #099 } // Literal.Number + .s { color: #d14 } // Literal.String + .na { color: #008080 } // Name.Attribute + .nb { color: #0086B3 } // Name.Builtin + .nc { color: #458; font-weight: bold } // Name.Class + .no { color: #008080 } // Name.Constant + .ni { color: #800080 } // Name.Entity + .ne { color: #900; font-weight: bold } // Name.Exception + .nf { color: #900; font-weight: bold } // Name.Function + .nn { color: #555 } // Name.Namespace + .nt { color: #000080 } // Name.Tag + .nv { color: #008080 } // Name.Variable + .ow { font-weight: bold } // Operator.Word + .w { color: #bbb } // Text.Whitespace + .mf { color: #099 } // Literal.Number.Float + .mh { color: #099 } // Literal.Number.Hex + .mi { color: #099 } // Literal.Number.Integer + .mo { color: #099 } // Literal.Number.Oct + .sb { color: #d14 } // Literal.String.Backtick + .sc { color: #d14 } // Literal.String.Char + .sd { color: #d14 } // Literal.String.Doc + .s2 { color: #d14 } // Literal.String.Double + .se { color: #d14 } // Literal.String.Escape + .sh { color: #d14 } // Literal.String.Heredoc + .si { color: #d14 } // Literal.String.Interpol + .sx { color: #d14 } // Literal.String.Other + .sr { color: #009926 } // Literal.String.Regex + .s1 { color: #d14 } // Literal.String.Single + .ss { color: #990073 } // Literal.String.Symbol + .bp { color: #999 } // Name.Builtin.Pseudo + .vc { color: #008080 } // Name.Variable.Class + .vg { color: #008080 } // Name.Variable.Global + .vi { color: #008080 } // Name.Variable.Instance + .il { color: #099 } // Literal.Number.Integer.Long +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/bootstrap/_alerts.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/bootstrap/_alerts.scss b/docs/_sass/bootstrap/_alerts.scss new file mode 100755 index 0000000..7d1e1fd --- /dev/null +++ b/docs/_sass/bootstrap/_alerts.scss @@ -0,0 +1,73 @@ +// +// Alerts +// -------------------------------------------------- + + +// Base styles +// ------------------------- + +.alert { + padding: $alert-padding; + margin-bottom: $line-height-computed; + border: 1px solid transparent; + border-radius: $alert-border-radius; + + // Headings for larger alerts + h4 { + margin-top: 0; + // Specified for the h4 to prevent conflicts of changing $headings-color + color: inherit; + } + + // Provide class for links that match alerts + .alert-link { + font-weight: $alert-link-font-weight; + } + + // Improve alignment and spacing of inner content + > p, + > ul { + margin-bottom: 0; + } + + > p + p { + margin-top: 5px; + } +} + +// Dismissible alerts +// +// Expand the right padding and account for the close button's positioning. + +.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. +.alert-dismissible { + padding-right: ($alert-padding + 20); + + // Adjust close link position + .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; + } +} + +// Alternate styles +// +// Generate contextual modifier classes for colorizing the alert. + +.alert-success { + @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text); +} + +.alert-info { + @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text); +} + +.alert-warning { + @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text); +} + +.alert-danger { + @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/bootstrap/_badges.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/bootstrap/_badges.scss b/docs/_sass/bootstrap/_badges.scss new file mode 100755 index 0000000..70002e0 --- /dev/null +++ b/docs/_sass/bootstrap/_badges.scss @@ -0,0 +1,68 @@ +// +// Badges +// -------------------------------------------------- + + +// Base class +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: $font-size-small; + font-weight: $badge-font-weight; + color: $badge-color; + line-height: $badge-line-height; + vertical-align: middle; + white-space: nowrap; + text-align: center; + background-color: $badge-bg; + border-radius: $badge-border-radius; + + // Empty badges collapse automatically (not available in IE8) + &:empty { + display: none; + } + + // Quick fix for badges in buttons + .btn & { + position: relative; + top: -1px; + } + + .btn-xs &, + .btn-group-xs > .btn & { + top: 0; + padding: 1px 5px; + } + + // [converter] extracted a& to a.badge + + // Account for badges in navs + .list-group-item.active > &, + .nav-pills > .active > a > & { + color: $badge-active-color; + background-color: $badge-active-bg; + } + + .list-group-item > & { + float: right; + } + + .list-group-item > & + & { + margin-right: 5px; + } + + .nav-pills > li > a > & { + margin-left: 3px; + } +} + +// Hover state, but only for links +a.badge { + &:hover, + &:focus { + color: $badge-link-hover-color; + text-decoration: none; + cursor: pointer; + } +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/bootstrap/_breadcrumbs.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/bootstrap/_breadcrumbs.scss b/docs/_sass/bootstrap/_breadcrumbs.scss new file mode 100755 index 0000000..b61f0c7 --- /dev/null +++ b/docs/_sass/bootstrap/_breadcrumbs.scss @@ -0,0 +1,28 @@ +// +// Breadcrumbs +// -------------------------------------------------- + + +.breadcrumb { + padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal; + margin-bottom: $line-height-computed; + list-style: none; + background-color: $breadcrumb-bg; + border-radius: $border-radius-base; + + > li { + display: inline-block; + + + li:before { + // [converter] Workaround for https://github.com/sass/libsass/issues/1115 + $nbsp: "\00a0"; + content: "#{$breadcrumb-separator}#{$nbsp}"; // Unicode space added since inline-block means non-collapsing white-space + padding: 0 5px; + color: $breadcrumb-color; + } + } + + > .active { + color: $breadcrumb-active-color; + } +} http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/b169db04/docs/_sass/bootstrap/_button-groups.scss ---------------------------------------------------------------------- diff --git a/docs/_sass/bootstrap/_button-groups.scss b/docs/_sass/bootstrap/_button-groups.scss new file mode 100755 index 0000000..baaacc4 --- /dev/null +++ b/docs/_sass/bootstrap/_button-groups.scss @@ -0,0 +1,244 @@ +// +// Button groups +// -------------------------------------------------- + +// Make the div behave like a button +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; // match .btn alignment given font-size hack above + > .btn { + position: relative; + float: left; + // Bring the "active" button to the front + &:hover, + &:focus, + &:active, + &.active { + z-index: 2; + } + } +} + +// Prevent double borders when buttons are next to each other +.btn-group { + .btn + .btn, + .btn + .btn-group, + .btn-group + .btn, + .btn-group + .btn-group { + margin-left: -1px; + } +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + margin-left: -5px; // Offset the first child's margin + @include clearfix; + + .btn, + .btn-group, + .input-group { + float: left; + } + > .btn, + > .btn-group, + > .input-group { + margin-left: 5px; + } +} + +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} + +// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match +.btn-group > .btn:first-child { + margin-left: 0; + &:not(:last-child):not(.dropdown-toggle) { + @include border-right-radius(0); + } +} +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + @include border-left-radius(0); +} + +// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-right-radius(0); + } +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + @include border-left-radius(0); +} + +// On active and open, don't show outline +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + + +// Sizing +// +// Remix the default button sizing classes into new ones for easier manipulation. + +.btn-group-xs > .btn { @extend .btn-xs; } +.btn-group-sm > .btn { @extend .btn-sm; } +.btn-group-lg > .btn { @extend .btn-lg; } + + +// Split button dropdowns +// ---------------------- + +// Give the line between buttons some depth +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; +} + +// The clickable button for toggling the menu +// Remove the gradient and set the same inset shadow as the :active state +.btn-group.open .dropdown-toggle { + @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); + + // Show no shadow for `.btn-link` since it has no other button styles. + &.btn-link { + @include box-shadow(none); + } +} + + +// Reposition the caret +.btn .caret { + margin-left: 0; +} +// Carets in other button sizes +.btn-lg .caret { + border-width: $caret-width-large $caret-width-large 0; + border-bottom-width: 0; +} +// Upside down carets for .dropup +.dropup .btn-lg .caret { + border-width: 0 $caret-width-large $caret-width-large; +} + + +// Vertical button groups +// ---------------------- + +.btn-group-vertical { + > .btn, + > .btn-group, + > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; + } + + // Clear floats so dropdown menus can be properly placed + > .btn-group { + @include clearfix; + > .btn { + float: none; + } + } + + > .btn + .btn, + > .btn + .btn-group, + > .btn-group + .btn, + > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; + } +} + +.btn-group-vertical > .btn { + &:not(:first-child):not(:last-child) { + border-radius: 0; + } + &:first-child:not(:last-child) { + @include border-top-radius($btn-border-radius-base); + @include border-bottom-radius(0); + } + &:last-child:not(:first-child) { + @include border-top-radius(0); + @include border-bottom-radius($btn-border-radius-base); + } +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-bottom-radius(0); + } +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + @include border-top-radius(0); +} + + +// Justified button groups +// ---------------------- + +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; + > .btn, + > .btn-group { + float: none; + display: table-cell; + width: 1%; + } + > .btn-group .btn { + width: 100%; + } + + > .btn-group .dropdown-menu { + left: auto; + } +} + + +// Checkbox and radio options +// +// In order to support the browser's form validation feedback, powered by the +// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use +// `display: none;` or `visibility: hidden;` as that also hides the popover. +// Simply visually hiding the inputs via `opacity` would leave them clickable in +// certain cases which is prevented by using `clip` and `pointer-events`. +// This way, we ensure a DOM element is visible to position the popover from. +// +// See https://github.com/twbs/bootstrap/pull/12794 and +// https://github.com/twbs/bootstrap/pull/14559 for more information. + +[data-toggle="buttons"] { + > .btn, + > .btn-group > .btn { + input[type="radio"], + input[type="checkbox"] { + position: absolute; + clip: rect(0,0,0,0); + pointer-events: none; + } + } +}