Release 0.4.0-incubating Changes for 0.4.0-incubating
- change the stable doc to 0.4.0-incubating - change latest version to 0.5.0-incubating-snapshot - add 0.4.0-incubating to the header - copied current docs to website/docs/0.4.0-incubating as the documents for release 0.4.0-incubating. Author: Sijie Guo <si...@apache.org> Reviewers: Jia Zhai <zhaiji...@gmail.com>, Jia Zhai <zhaiji...@gmail.com>, Leigh Stewart <lstew...@apache.org> Closes #109 from sijie/sijie/release_0.4.0 Project: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/commit/3469fc87 Tree: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/tree/3469fc87 Diff: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/diff/3469fc87 Branch: refs/heads/master Commit: 3469fc878295c4f63413d84b96a5d18f6890a109 Parents: 945c14a Author: Sijie Guo <si...@apache.org> Authored: Wed Apr 26 11:41:12 2017 -0700 Committer: Sijie Guo <si...@apache.org> Committed: Wed Apr 26 11:41:12 2017 -0700 ---------------------------------------------------------------------- docs/_config.yml | 4 +- docs/start/download.rst | 17 +- pom.xml | 2 +- website/_config.yml | 4 +- website/_includes/header.html | 3 + website/_posts/2017-04-25-the-first-release.md | 44 + website/build.sh | 81 +- website/docs/0.4.0-incubating/.gitignore | 5 + website/docs/0.4.0-incubating/Gemfile | 5 + website/docs/0.4.0-incubating/Gemfile.lock | 83 + website/docs/0.4.0-incubating/README.md | 87 + website/docs/0.4.0-incubating/Rakefile | 10 + website/docs/0.4.0-incubating/_config-local.yml | 1 + .../0.4.0-incubating/_config-production.yml | 1 + website/docs/0.4.0-incubating/_config.yml | 49 + .../_includes/anchors_links.html | 7 + .../docs/0.4.0-incubating/_includes/footer.html | 15 + .../docs/0.4.0-incubating/_includes/head.html | 30 + .../docs/0.4.0-incubating/_includes/header.html | 133 + .../docs/0.4.0-incubating/_layouts/base.html | 26 + .../docs/0.4.0-incubating/_layouts/default.html | 114 + .../docs/0.4.0-incubating/_layouts/guide.html | 46 + .../_plugins/jekyll-rst/.gitignore | 1 + .../_plugins/jekyll-rst/LICENSE.txt | 20 + .../_plugins/jekyll-rst/README.rst | 97 + .../_plugins/jekyll-rst/converter.rb | 30 + .../_plugins/jekyll-rst/directives.py | 97 + .../_plugins/jekyll-rst/rst2html.py | 39 + .../_plugins/jekyll-rst/transform.py | 40 + website/docs/0.4.0-incubating/_sass/_base.scss | 206 ++ .../docs/0.4.0-incubating/_sass/_bootstrap.scss | 56 + .../docs/0.4.0-incubating/_sass/_layout.scss | 242 ++ .../_sass/_syntax-highlighting.scss | 71 + .../_sass/bootstrap/_alerts.scss | 73 + .../_sass/bootstrap/_badges.scss | 68 + .../_sass/bootstrap/_breadcrumbs.scss | 28 + .../_sass/bootstrap/_button-groups.scss | 244 ++ .../_sass/bootstrap/_buttons.scss | 168 ++ .../_sass/bootstrap/_carousel.scss | 270 ++ .../_sass/bootstrap/_close.scss | 36 + .../0.4.0-incubating/_sass/bootstrap/_code.scss | 69 + .../_sass/bootstrap/_component-animations.scss | 37 + .../_sass/bootstrap/_dropdowns.scss | 216 ++ .../_sass/bootstrap/_forms.scss | 617 +++++ .../_sass/bootstrap/_glyphicons.scss | 307 +++ .../0.4.0-incubating/_sass/bootstrap/_grid.scss | 84 + .../_sass/bootstrap/_input-groups.scss | 171 ++ .../_sass/bootstrap/_jumbotron.scss | 54 + .../_sass/bootstrap/_labels.scss | 66 + .../_sass/bootstrap/_list-group.scss | 130 + .../_sass/bootstrap/_media.scss | 66 + .../_sass/bootstrap/_mixins.scss | 40 + .../_sass/bootstrap/_modals.scss | 150 ++ .../_sass/bootstrap/_navbar.scss | 662 +++++ .../0.4.0-incubating/_sass/bootstrap/_navs.scss | 242 ++ .../_sass/bootstrap/_normalize.scss | 424 ++++ .../_sass/bootstrap/_pager.scss | 54 + .../_sass/bootstrap/_pagination.scss | 89 + .../_sass/bootstrap/_panels.scss | 271 ++ .../_sass/bootstrap/_popovers.scss | 131 + .../_sass/bootstrap/_print.scss | 101 + .../_sass/bootstrap/_progress-bars.scss | 87 + .../_sass/bootstrap/_responsive-embed.scss | 35 + .../_sass/bootstrap/_responsive-utilities.scss | 179 ++ .../_sass/bootstrap/_scaffolding.scss | 161 ++ .../_sass/bootstrap/_tables.scss | 234 ++ .../_sass/bootstrap/_theme.scss | 291 +++ .../_sass/bootstrap/_thumbnails.scss | 38 + .../_sass/bootstrap/_tooltip.scss | 101 + .../0.4.0-incubating/_sass/bootstrap/_type.scss | 298 +++ .../_sass/bootstrap/_utilities.scss | 55 + .../_sass/bootstrap/_variables.scss | 874 +++++++ .../_sass/bootstrap/_wells.scss | 29 + .../_sass/bootstrap/mixins/_alerts.scss | 14 + .../bootstrap/mixins/_background-variant.scss | 12 + .../_sass/bootstrap/mixins/_border-radius.scss | 18 + .../_sass/bootstrap/mixins/_buttons.scss | 65 + .../_sass/bootstrap/mixins/_center-block.scss | 7 + .../_sass/bootstrap/mixins/_clearfix.scss | 22 + .../_sass/bootstrap/mixins/_forms.scss | 88 + .../_sass/bootstrap/mixins/_gradients.scss | 58 + .../_sass/bootstrap/mixins/_grid-framework.scss | 81 + .../_sass/bootstrap/mixins/_grid.scss | 122 + .../_sass/bootstrap/mixins/_hide-text.scss | 21 + .../_sass/bootstrap/mixins/_image.scss | 33 + .../_sass/bootstrap/mixins/_labels.scss | 12 + .../_sass/bootstrap/mixins/_list-group.scss | 32 + .../_sass/bootstrap/mixins/_nav-divider.scss | 10 + .../bootstrap/mixins/_nav-vertical-align.scss | 9 + .../_sass/bootstrap/mixins/_opacity.scss | 8 + .../_sass/bootstrap/mixins/_pagination.scss | 24 + .../_sass/bootstrap/mixins/_panels.scss | 24 + .../_sass/bootstrap/mixins/_progress-bar.scss | 10 + .../_sass/bootstrap/mixins/_reset-filter.scss | 8 + .../_sass/bootstrap/mixins/_reset-text.scss | 18 + .../_sass/bootstrap/mixins/_resize.scss | 6 + .../mixins/_responsive-visibility.scss | 21 + .../_sass/bootstrap/mixins/_size.scss | 10 + .../_sass/bootstrap/mixins/_tab-focus.scss | 9 + .../_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 ++ .../0.4.0-incubating/admin_guide/bookkeeper.rst | 213 ++ .../0.4.0-incubating/admin_guide/hardware.rst | 138 + .../0.4.0-incubating/admin_guide/loadtest.rst | 100 + .../docs/0.4.0-incubating/admin_guide/main.rst | 13 + .../0.4.0-incubating/admin_guide/monitoring.rst | 398 +++ .../0.4.0-incubating/admin_guide/operations.rst | 224 ++ .../admin_guide/performance.rst | 22 + .../0.4.0-incubating/admin_guide/vagrant.rst | 18 + .../0.4.0-incubating/admin_guide/zookeeper.rst | 104 + .../0.4.0-incubating/basics/introduction.rst | 138 + website/docs/0.4.0-incubating/css/main.scss | 53 + website/docs/0.4.0-incubating/css/theme.css | 21 + .../0.4.0-incubating/deployment/cluster.rst | 561 +++++ .../docs/0.4.0-incubating/deployment/docker.rst | 49 + .../deployment/global-cluster.rst | 113 + .../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/0.4.0-incubating/images/costmodel.png | Bin 0 -> 35381 bytes .../docs/0.4.0-incubating/images/datamodel.png | Bin 0 -> 51935 bytes .../images/distributedlog_logo_l.png | Bin 0 -> 20791 bytes .../images/distributedlog_logo_navbar.png | Bin 0 -> 9195 bytes .../images/distributedlog_logo_s.png | Bin 0 -> 2006 bytes .../0.4.0-incubating/images/distribution.png | Bin 0 -> 16923 bytes .../docs/0.4.0-incubating/images/favicon.ico | Bin 0 -> 1660 bytes .../docs/0.4.0-incubating/images/fencing.png | Bin 0 -> 53642 bytes .../images/globalreplicatedlog.png | Bin 0 -> 111734 bytes .../0.4.0-incubating/images/lacprotocol.png | Bin 0 -> 48746 bytes .../0.4.0-incubating/images/logsegments.png | Bin 0 -> 14238 bytes website/docs/0.4.0-incubating/images/pubsub.png | Bin 0 -> 443154 bytes .../0.4.0-incubating/images/readrequests.png | Bin 0 -> 29553 bytes .../0.4.0-incubating/images/requestflow.png | Bin 0 -> 72989 bytes .../0.4.0-incubating/images/requestrouting.png | Bin 0 -> 40990 bytes .../0.4.0-incubating/images/softwarestack.png | Bin 0 -> 76557 bytes website/docs/0.4.0-incubating/index.md | 49 + .../0.4.0-incubating/js/bootstrap-sprockets.js | 12 + website/docs/0.4.0-incubating/js/bootstrap.js | 2363 ++++++++++++++++++ .../docs/0.4.0-incubating/js/bootstrap.min.js | 7 + .../docs/0.4.0-incubating/js/bootstrap/affix.js | 162 ++ .../docs/0.4.0-incubating/js/bootstrap/alert.js | 94 + .../0.4.0-incubating/js/bootstrap/button.js | 120 + .../0.4.0-incubating/js/bootstrap/carousel.js | 237 ++ .../0.4.0-incubating/js/bootstrap/collapse.js | 211 ++ .../0.4.0-incubating/js/bootstrap/dropdown.js | 165 ++ .../docs/0.4.0-incubating/js/bootstrap/modal.js | 337 +++ .../0.4.0-incubating/js/bootstrap/popover.js | 108 + .../0.4.0-incubating/js/bootstrap/scrollspy.js | 172 ++ .../docs/0.4.0-incubating/js/bootstrap/tab.js | 155 ++ .../0.4.0-incubating/js/bootstrap/tooltip.js | 514 ++++ .../0.4.0-incubating/js/bootstrap/transition.js | 59 + .../docs/0.4.0-incubating/performance/main.rst | 8 + .../docs/0.4.0-incubating/start/building.rst | 92 + .../docs/0.4.0-incubating/start/download.rst | 88 + .../docs/0.4.0-incubating/start/quickstart.rst | 127 + website/docs/0.4.0-incubating/styles/site.scss | 4 + .../tutorials/analytics-mapreduce.rst | 214 ++ .../docs/0.4.0-incubating/tutorials/basic-1.rst | 250 ++ .../docs/0.4.0-incubating/tutorials/basic-2.rst | 221 ++ .../docs/0.4.0-incubating/tutorials/basic-3.rst | 280 +++ .../docs/0.4.0-incubating/tutorials/basic-4.rst | 241 ++ .../docs/0.4.0-incubating/tutorials/basic-5.rst | 223 ++ .../docs/0.4.0-incubating/tutorials/basic-6.rst | 327 +++ .../docs/0.4.0-incubating/tutorials/main.rst | 84 + .../0.4.0-incubating/tutorials/messaging-1.rst | 184 ++ .../0.4.0-incubating/tutorials/messaging-2.rst | 223 ++ .../0.4.0-incubating/tutorials/messaging-3.rst | 111 + .../0.4.0-incubating/tutorials/messaging-4.rst | 24 + .../0.4.0-incubating/tutorials/messaging-5.rst | 19 + .../tutorials/replicatedstatemachines.rst | 11 + .../0.4.0-incubating/user_guide/api/core.rst | 485 ++++ .../0.4.0-incubating/user_guide/api/main.rst | 37 + .../user_guide/api/practice.rst | 89 + .../0.4.0-incubating/user_guide/api/proxy.rst | 87 + .../user_guide/architecture/main.rst | 178 ++ .../user_guide/configuration/client.rst | 110 + .../user_guide/configuration/core.rst | 424 ++++ .../user_guide/configuration/main.rst | 44 + .../user_guide/configuration/perlog.rst | 138 + .../user_guide/configuration/proxy.rst | 82 + .../user_guide/considerations/main.rst | 82 + .../0.4.0-incubating/user_guide/design/main.rst | 230 ++ .../user_guide/globalreplicatedlog/main.rst | 118 + .../user_guide/implementation/core.rst | 4 + .../user_guide/implementation/main.rst | 25 + .../user_guide/implementation/storage.rst | 326 +++ .../user_guide/implementation/writeproxy.rst | 5 + .../docs/0.4.0-incubating/user_guide/main.rst | 13 + .../user_guide/references/features.rst | 42 + .../user_guide/references/main.rst | 28 + .../user_guide/references/metrics.rst | 492 ++++ website/docs/latest | 1 + 196 files changed, 22874 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/docs/_config.yml ---------------------------------------------------------------------- diff --git a/docs/_config.yml b/docs/_config.yml index 0ddd55d..c293c4d 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -13,8 +13,8 @@ description: > # this means to ignore newlines until "baseurl:" # the subpath of your site, e.g. /blog baseurl: "" -distributedlog_version: "0.4.0-SNAPSHOT" -distributedlog_version_short: "0.4.0" +distributedlog_version: "0.5.0-incubating-SNAPSHOT" +distributedlog_version_short: "0.5.0-incubating" # the base hostname & protocol for your site url: "http://distributedlog.incubator.apache.org" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/docs/start/download.rst ---------------------------------------------------------------------- diff --git a/docs/start/download.rst b/docs/start/download.rst index 7bd4a8b..308f36a 100644 --- a/docs/start/download.rst +++ b/docs/start/download.rst @@ -11,10 +11,25 @@ layout: default Releases ======== -`0.3.51-RC1` is the latest release. +`0.4.0-incubating` is the latest release. You can verify your download by checking its md5 and sha1. +0.4.0-incubating +~~~~~~~~~~~~~~~~ + +This is the first Apache release. Download here_. + +- `Release Notes`_ +- `Announce Blog Post`_ + +.. _here: https://dist.apache.org/repos/dist/release/incubator/distributedlog/0.4.0-incubating +.. _Release Notes: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12320620&version=12337980 +.. _Announce Blog Post: /releases/2017/04/23/the-first-release.html + + +The releases before Apache Incubating are also listed as below: + 0.3.51-RC1 ~~~~~~~~~~ http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 020baeb..d10eb85 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-distributedlog.git</connection> <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-distributedlog.git</developerConnection> <url>https://git-wip-us.apache.org/repos/asf?p=incubator-distributedlog.git;a=summary</url> - <tag>release-0.4.0-incubating</tag> + <tag>release-0.5.0-incubating</tag> </scm> <issueManagement> <system>jira</system> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/_config.yml ---------------------------------------------------------------------- diff --git a/website/_config.yml b/website/_config.yml index 049a804..c5219d4 100644 --- a/website/_config.yml +++ b/website/_config.yml @@ -12,8 +12,8 @@ description: > # this means to ignore newlines until "baseurl:" # versions DL_VERSION_STABLE: 0.3.51-RC1 -DL_VERSION_LATEST: 0.4.0-incubating-SNAPSHOT -stable_doc_version: latest +DL_VERSION_LATEST: 0.5.0-incubating-SNAPSHOT +stable_doc_version: 0.4.0-incubating # the subpath of your site, e.g. /blog baseurl: "" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/_includes/header.html ---------------------------------------------------------------------- diff --git a/website/_includes/header.html b/website/_includes/header.html index 4a5ce5f..a2f1577 100644 --- a/website/_includes/header.html +++ b/website/_includes/header.html @@ -51,6 +51,9 @@ <li class="dropdown-header">Snapshot (Developement)</li> <li><a href="{{ site.baseurl }}/docs/latest">{{ site.DL_VERSION_LATEST }}</a></li> <li role="separator" class="divider"></li> + <li class="dropdown-header">Releases</li> + <li><a href="{{ site.baseurl }}/docs/0.4.0-incubating">0.4.0-incubating</a></li> + <li role="separator" class="divider"></li> <li> <a href="https://cwiki.apache.org/confluence/display/DL/Project+Ideas"> <small><span class="glyphicon glyphicon-new-window"></span></small> http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/_posts/2017-04-25-the-first-release.md ---------------------------------------------------------------------- diff --git a/website/_posts/2017-04-25-the-first-release.md b/website/_posts/2017-04-25-the-first-release.md new file mode 100644 index 0000000..d4b78e8 --- /dev/null +++ b/website/_posts/2017-04-25-the-first-release.md @@ -0,0 +1,44 @@ +--- +layout: post +title: 'The first release of Apache DistributedLog' +date: 2017-04-25 10:00:00 +categories: releases +authors: +- sijie +--- + +Iâm happy to announce that Apache DistributedLog has officially released its first release under the apache umbrella - 0.4.0-incubating. +This is an exciting milestone for the project, which joined the Apache Software Foundation and the Apache Incubator last year. + +This release publishes the first set of Apache DistributedLog binaries and source code, making them generally available to the community. +This initial release includes: + +- distributedlog-core: A core library that provides the log stream storage primitives for accessing the stream store of Apache DistributedLog. +- distributedlog-client & distributedlog-service: A proxy service (and its clients) for serving large number of fan-in writes and fan-out reads. +- distributedlog-benchmark: A set of programs for smoketesting the setup and benchmarking the performance of Apache DistributedLog. +- distributedlog-tutorials: A set of tutorials on how to use Apache DistributedLog in different use cases, e.g pub/sub messaging, replicated state machine and analytics. + +The release is available in the [Maven Central Repository](https://search.maven.org/#search%7Cga%7C1%7Corg.apache.distributedlog), +or can be downloaded from the projectâs [website](https://distributedlog.incubator.apache.org/docs/latest/start/download). + +As a community, we take every release seriously and try to ensure production readiness. +The first release is not just about following the Apache release process, i.e. creating a release and getting signoff from the Apache Software +Foundation--there is also tons of technical progress. The highlights of the first release are: + +- Refactor the codebase to abstract the core metadata and data operations of the stream store into interfaces. + So we can easily integrate DistributedLog with other metadata stores like etcd, and integrate DistributedLog with other cold data stores like HDFS, S3. +- A new read ahead implementation for DistributedLog reader for better handling slow storage nodes. +- Provide the stream placement policy on the proxy service. So we can develop and experiment with different placement policies and integrate + with different auto-scaling mechanisms. + +Iâd like to encourage everyone to try out this release. + +As always, the DistributedLog community welcomes feedback. Simplifying building real-time applications is always the primary goal of Apache DistributedLog. +Usability, security, and integration will be our focus for the next several months. Also, as we grow the community, a rapid cadence of future releases +is anticipated, perhaps one every 2~3 months. + +If you have any comments or discover any issues, Iâd like to invite you to reach out to us +via [userâs mailing list](https://distributedlog.incubator.apache.org/community/#mailing-lists), [slack channel](https://getdl-slack.herokuapp.com/) or +the [Apache Jira issues](https://issues.apache.org/jira/browse/DL). + + http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/build.sh ---------------------------------------------------------------------- diff --git a/website/build.sh b/website/build.sh index 819471c..379dce4 100755 --- a/website/build.sh +++ b/website/build.sh @@ -50,9 +50,6 @@ if [ ! -d "${DLOG_HOME}/website/docs" ]; then mkdir ${DLOG_HOME}/website/docs fi -# Get the project version -PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version 2> /dev/null | grep -Ev '(^\[|Download\w+:)') - echo "Building the website to ${DEST_DIR}/content ..." # build the website @@ -62,46 +59,56 @@ bundle exec jekyll build --destination ${DEST_DIR}/content --config _config.yml, echo "Built the website @ ${DEST_DIR}/content." -echo "Building the documentation for version ${PROJECT_VERSION} ..." -# build the documents -if [[ ${PROJECT_VERSION} == *"SNAPSHOT"* ]]; then - # it is a snapshot version, built the docs into latest - DOC_SRC_HOME="${DLOG_HOME}/website/docs/latest" - DOC_DEST_HOME="${DEST_DIR}/content/docs/latest" -else - # it is a release version, built the docs to release-version directory. - DOC_SRC_HOME="${DLOG_HOME}/website/docs/${PROJECT_VERSION}" - DOC_DEST_HOME="${DEST_DIR}/content/docs/${PROJECT_VERSION}" -fi - -# link the doc source directory if necessary -if [ ! -d "${DOC_SRC_HOME}" ]; then - ln -s ../../docs ${DOC_SRC_HOME} -fi - -# create the doc dest directory -mkdir -p ${DOC_DEST_HOME} - -cd ${DOC_SRC_HOME} +# build the documents -bundle exec jekyll build --destination ${DOC_DEST_HOME} --config _config.yml,${OVERRIDED_CONFIG} +function build_docs() { + version=$1 + tag=$2 + + echo "Building the documentation for version ${version} ..." + + DOC_SRC_HOME="${DLOG_HOME}/website/docs/${version}" + DOC_DEST_HOME="${DEST_DIR}/content/docs/${version}" + + cd ${DOC_SRC_HOME} + + bundle exec jekyll build --destination ${DOC_DEST_HOME} --config _config.yml,${OVERRIDED_CONFIG} + + if [ "$version" == "latest" ]; then + cd ${DLOG_HOME} + # create the api directory + mkdir -p ${DEST_DIR}/content/docs/latest/api/java + # build the javadoc + mvn -DskipTests clean package javadoc:aggregate \ + -Ddoctitle="Apache DistributedLog for Java, version ${version}" \ + -Dwindowtitle="Apache DistributedLog for Java, version ${version}" \ + -Dmaven.javadoc.failOnError=false + # copy the built javadoc + cp -r ${DLOG_HOME}/target/site/apidocs/* ${DOC_DEST_HOME}/api/java + else + rm -r /tmp/distributedlog-${version} + git clone https://git-wip-us.apache.org/repos/asf/incubator-distributedlog.git /tmp/distributedlog-${version} + cd /tmp/distributedlog-${version} + git checkout $tag + # create the api directory + mkdir -p ${DEST_DIR}/content/docs/${version}/api/java + # build the javadoc + mvn -DskipTests clean package javadoc:aggregate \ + -Ddoctitle="Apache DistributedLog for Java, version ${version}" \ + -Dwindowtitle="Apache DistributedLog for Java, version ${version}" \ + -Dmaven.javadoc.failOnError=false + # copy the built javadoc + cp -r /tmp/distributedlog-${version}/target/site/apidocs/* ${DOC_DEST_HOME}/api/java + fi + echo "Built the documentation for version ${version}." +} # build the javadoc API -cd ${DLOG_HOME} -# create the api directory -mkdir -p ${DEST_DIR}/content/docs/latest/api/java -# build the javadoc -mvn -DskipTests clean package javadoc:aggregate \ - -Ddoctitle="Apache DistributedLog for Java, version ${PROJECT_VERSION}" \ - -Dwindowtitle="Apache DistributedLog for Java, version ${PROJECT_VERSION}" \ - -Dmaven.javadoc.failOnError=false -# copy the built javadoc -cp -r ${DLOG_HOME}/target/site/apidocs/* ${DOC_DEST_HOME}/api/java - -echo "Built the documentation for version ${PROJECT_VERSION}." +build_docs "latest" +build_docs "0.4.0-incubating" "v0.4.0-incubating-RC4_2.11" if [[ "${SERVE}" == "TRUE" ]]; then cd ${DLOG_HOME}/website http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/.gitignore ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/.gitignore b/website/docs/0.4.0-incubating/.gitignore new file mode 100644 index 0000000..c28a8b0 --- /dev/null +++ b/website/docs/0.4.0-incubating/.gitignore @@ -0,0 +1,5 @@ +_site/ +.sass-cache/ +.jekyll-metadata +_pdf +.idea/ http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/Gemfile ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/Gemfile b/website/docs/0.4.0-incubating/Gemfile new file mode 100644 index 0000000..8bc5038 --- /dev/null +++ b/website/docs/0.4.0-incubating/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/3469fc87/website/docs/0.4.0-incubating/Gemfile.lock ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/Gemfile.lock b/website/docs/0.4.0-incubating/Gemfile.lock new file mode 100644 index 0000000..136ae6f --- /dev/null +++ b/website/docs/0.4.0-incubating/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/3469fc87/website/docs/0.4.0-incubating/README.md ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/README.md b/website/docs/0.4.0-incubating/README.md new file mode 100644 index 0000000..7209147 --- /dev/null +++ b/website/docs/0.4.0-incubating/README.md @@ -0,0 +1,87 @@ +This README gives an overview of how to build and contribute to the documentation of Apache DistributedLog. + +The documentation is included with the source of Apache DistributedLog in order to ensure that you always +have docs corresponding to your checked out version. The online documentation at +http://distributedlog.incubator.apache.org/docs/0.4.0-incubating is also generated from the files found at master branch. + +# Requirements + +First, make sure you have Ruby installed. The minimal ruby version is 2.0.0. + +The dependencies are declared in the Gemfile in this directory. We use [reStructuredText](http://docutils.sourceforge.net/rst.html) +to write and [Jekyll](https://jekyllrb.com/) and [jekyll-rst](https://github.com/xdissent/jekyll-rst) to translate the documentation to static HTML. +You can use Ruby's Bundler Gem to install all the depenencies for building the documentation: + + gem install bundler + bundle install + +And use [pip](https://pypi.python.org/pypi/pip) to install docutils and pygments + + pip install docutils pygments + +# Build + +## Live developement + +While you are working with the documentation, you can test and develop live. Run the following in the root folder of the `docs`: + + $ bundle exec jekyll serve + +Jekyll will start a webserver on port `4000`. As you make changes to the content, Jekyll will rebuild it automatically. +This is helpful if you want to see how your changes will render in realtime. + +## Generating the static website + +Once you are done with your changes, you need to compile the static content for the website. +This is what is actually hosted on the Apache DistributedLog documentation site. + +You can build the static content by running the following command in the root docs directory: + + $ jekyll build + +Once built, it will be placed in the folder `_site` inside of the root directory. This directory will include images, HTML, CSS, and so on. + +# Contribute + +## reStructuredText + +The documentation pages are written in [reStructuredText](http://docutils.sourceforge.net/rst.html). It is possible to use [Markdown](http://daringfireball.net/projects/markdown/syntax) and intermix plain html. + +## Front matter + +In addition to Markdown, every page contains a Jekyll front matter, which specifies the title of the page and the layout to use. +The title is used as the top-level heading for the page. + +There are two layouts (found in `_layouts`) used for writing documentation: one is `default`, while the other one is `guide`. +The pages that use `default` layout will not have navigation side bar, while the pages that use `guide` layout will have +navigation side bar. The pages under `user-guide` and `admin-guide` are written using `guide` layout. + + --- + title: "Title of the Page" + layout: default + --- + +Furthermore, you can access variables found in `docs/_config.yml` as follows: + + {{ site.NAME }} + +This will be replaced with the value of the variable called `NAME` when generating the docs. + +## Structure + +### Documentation + +#### Navigation + +The navigation on the left side of the docs is automatically generated when building the docs. You can modify the markup in `_layouts/guide.html`. + +The structure of the navigation is determined by the front matter of all pages. The fields used to determine the structure are: + +- `nav-id` => ID of this page. Other pages can use this ID as their parent ID. +- `nav-parent_id` => ID of the parent. This page will be listed under the page with id `nav-parent_id`. + +Level 0 is made up of all pages, which have nav-parent_id set to `_root_`. There is no limitation on how many levels you can nest. + +The `title` of the page is used as the default link text. You can override this via `nav-title`. The relative position per navigational level is determined by `nav-pos`. + +The nesting is also used for the breadcrumbs like `User Guide > API > Best Practise`. http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/Rakefile ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/Rakefile b/website/docs/0.4.0-incubating/Rakefile new file mode 100644 index 0000000..9778c98 --- /dev/null +++ b/website/docs/0.4.0-incubating/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/3469fc87/website/docs/0.4.0-incubating/_config-local.yml ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_config-local.yml b/website/docs/0.4.0-incubating/_config-local.yml new file mode 100644 index 0000000..00fdd3c --- /dev/null +++ b/website/docs/0.4.0-incubating/_config-local.yml @@ -0,0 +1 @@ +baseurl: "/docs/0.4.0-incubating" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_config-production.yml ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_config-production.yml b/website/docs/0.4.0-incubating/_config-production.yml new file mode 100644 index 0000000..00fdd3c --- /dev/null +++ b/website/docs/0.4.0-incubating/_config-production.yml @@ -0,0 +1 @@ +baseurl: "/docs/0.4.0-incubating" http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_config.yml ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_config.yml b/website/docs/0.4.0-incubating/_config.yml new file mode 100644 index 0000000..6864f22 --- /dev/null +++ b/website/docs/0.4.0-incubating/_config.yml @@ -0,0 +1,49 @@ +# 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-incubating" +distributedlog_version_short: "0.4.0" + +# the base hostname & protocol for your site +url: "http://distributedlog.incubator.apache.org" + +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/3469fc87/website/docs/0.4.0-incubating/_includes/anchors_links.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_includes/anchors_links.html b/website/docs/0.4.0-incubating/_includes/anchors_links.html new file mode 100644 index 0000000..024f757 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_includes/footer.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_includes/footer.html b/website/docs/0.4.0-incubating/_includes/footer.html new file mode 100644 index 0000000..9f5f894 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_includes/head.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_includes/head.html b/website/docs/0.4.0-incubating/_includes/head.html new file mode 100644 index 0000000..3a3db3e --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_includes/header.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_includes/header.html b/website/docs/0.4.0-incubating/_includes/header.html new file mode 100644 index 0000000..14dc063 --- /dev/null +++ b/website/docs/0.4.0-incubating/_includes/header.html @@ -0,0 +1,133 @@ +{% 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> + <!-- API --> + <li> + <a href="{{ start }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">API<span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + <li><a href="{{ site.baseurl }}/api/java">Java</a></li> + </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/3469fc87/website/docs/0.4.0-incubating/_layouts/base.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_layouts/base.html b/website/docs/0.4.0-incubating/_layouts/base.html new file mode 100644 index 0000000..96f226e --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_layouts/default.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_layouts/default.html b/website/docs/0.4.0-incubating/_layouts/default.html new file mode 100644 index 0000000..eb36065 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_layouts/guide.html ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_layouts/guide.html b/website/docs/0.4.0-incubating/_layouts/guide.html new file mode 100644 index 0000000..b665949 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/.gitignore ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/.gitignore b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/.gitignore @@ -0,0 +1 @@ +*.pyc http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/LICENSE.txt ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/LICENSE.txt b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/LICENSE.txt new file mode 100644 index 0000000..e70d9d9 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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. http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/README.rst ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/README.rst b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/README.rst new file mode 100644 index 0000000..3c0b01a --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/ http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/converter.rb ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/converter.rb b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/converter.rb new file mode 100644 index 0000000..31c6960 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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 http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/directives.py ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/directives.py b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/directives.py new file mode 100644 index 0000000..8feae57 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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) http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/rst2html.py ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/rst2html.py b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/rst2html.py new file mode 100644 index 0000000..0190da0 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_plugins/jekyll-rst/transform.py ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_plugins/jekyll-rst/transform.py b/website/docs/0.4.0-incubating/_plugins/jekyll-rst/transform.py new file mode 100644 index 0000000..2904a04 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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 '' http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/3469fc87/website/docs/0.4.0-incubating/_sass/_base.scss ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_sass/_base.scss b/website/docs/0.4.0-incubating/_sass/_base.scss new file mode 100644 index 0000000..0883c3c --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_sass/_bootstrap.scss ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_sass/_bootstrap.scss b/website/docs/0.4.0-incubating/_sass/_bootstrap.scss new file mode 100755 index 0000000..c773c8c --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_sass/_layout.scss ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_sass/_layout.scss b/website/docs/0.4.0-incubating/_sass/_layout.scss new file mode 100644 index 0000000..9cbfdde --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_sass/_syntax-highlighting.scss ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_sass/_syntax-highlighting.scss b/website/docs/0.4.0-incubating/_sass/_syntax-highlighting.scss new file mode 100644 index 0000000..8fac597 --- /dev/null +++ b/website/docs/0.4.0-incubating/_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/3469fc87/website/docs/0.4.0-incubating/_sass/bootstrap/_alerts.scss ---------------------------------------------------------------------- diff --git a/website/docs/0.4.0-incubating/_sass/bootstrap/_alerts.scss b/website/docs/0.4.0-incubating/_sass/bootstrap/_alerts.scss new file mode 100755 index 0000000..7d1e1fd --- /dev/null +++ b/website/docs/0.4.0-incubating/_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); +}