Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](/website/images/distributedlog_logo_m.png?raw=true "Apache DistributedLog logo")

[![Build Status](https://travis-ci.org/apache/incubator-distributedlog.svg?branch=master)](https://travis-ci.org/apache/incubator-distributedlog)
[![Build Status](https://api.travis-ci.org/apache/distributedlog.svg?branch=master)](https://travis-ci.org/apache/distributedlog)
[![Build Status](https://builds.apache.org/buildStatus/icon?job=distributedlog-nightly-build)](https://builds.apache.org/job/distributedlog-nightly-build/)
[![Coverage Status](https://coveralls.io/repos/github/apache/incubator-distributedlog/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-distributedlog?branch=master)

Expand Down
1 change: 1 addition & 0 deletions docs/_config-apache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog/docs/latest"
1 change: 1 addition & 0 deletions docs/_config-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog-staging-site/docs/latest"
2 changes: 1 addition & 1 deletion docs/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand" >
<a href="/distributedlog" 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">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<!-- Avoid for missing javadoc comments to be marked as errors -->
<additionalparam>-Xdoclint:none</additionalparam>
<additionalparam>-Xdoclint:none -notimestamp</additionalparam>
<groups>
<group>
<title>Core Library</title>
Expand Down
1 change: 1 addition & 0 deletions website/_config-apache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog"
1 change: 1 addition & 0 deletions website/_config-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog-staging-site"
3 changes: 3 additions & 0 deletions website/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ tracking_id: UA-83870961-1

gems:
- jekyll-redirect-from

exclude:
- scripts
4 changes: 2 additions & 2 deletions website/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<link rel="stylesheet" href="{{ "/css/theme.css" | prepend: site.baseurl }}">
<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 }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url | replace:'distributedlog/distributedlog/','distributedlog/'}}" data-proofer-ignore>
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url | replace:'distributedlog/distributedlog/','distributedlog/'}}">
<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),
Expand Down
4 changes: 2 additions & 2 deletions website/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand" >
<a href="/distributedlog" 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">
Expand Down Expand Up @@ -85,7 +85,7 @@
<li><a href="{{ site.coding_guide_url }}">Coding Guide</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Guides</li>
<li><a href="{{ site.baseurl }}/community/release_guide">Release Guide</a></li>
<li><a href="{{ site.baseurl }}/community/release-guide">Release Guide</a></li>
</ul>
</li>
<!-- Project -->
Expand Down
1 change: 1 addition & 0 deletions website/_posts/2016-09-19-kafka-vs-distributedlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ date: 2016-09-19 10:00:00
categories: technical-review
redirect_from:
- /technical-review/2015/09/19/kafka-vs-distributedlog
- /distributedlog/technical-review/2015/09/19/kafka-vs-distributedlog
authors:
- sijie
---
Expand Down
42 changes: 27 additions & 15 deletions website/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,28 @@ else
fi

SERVE="FALSE"
if [ $# -gt 2 ]; then
if [ $# -gt 3 ]; then
SERVE="TRUE"
fi

TMP_DEST_DIR=${DEST_DIR}/temp_content
TMP_WEBSITE_DIR=${TMP_DEST_DIR}/website

rm -rf ${DEST_DIR}/content
rm -rf ${TMP_DEST_DIR}

if [ ! -d "${DLOG_HOME}/website/docs" ]; then
mkdir ${DLOG_HOME}/website/docs
fi

echo "Building the website to ${DEST_DIR}/content ..."
echo "Building the website to ${TMP_WEBSITE_DIR} ..."

# build the website
cd ${DLOG_HOME}/website

bundle exec jekyll build --destination ${DEST_DIR}/content --config _config.yml,${OVERRIDED_CONFIG}

echo "Built the website @ ${DEST_DIR}/content."

bundle exec jekyll build --destination ${TMP_WEBSITE_DIR} --config _config.yml,${OVERRIDED_CONFIG}

echo "Built the website @ ${TMP_WEBSITE_DIR}."

# build the documents

Expand All @@ -70,16 +72,16 @@ function build_docs() {
echo "Building the documentation for version ${version} ..."

DOC_SRC_HOME="${DLOG_HOME}/website/docs/${version}"
DOC_DEST_HOME="${DEST_DIR}/content/docs/${version}"
DOC_DEST_HOME="${TMP_DEST_DIR}/docs_${version}"

cd ${DOC_SRC_HOME}

bundle exec jekyll build --destination ${DOC_DEST_HOME} --config _config.yml,${OVERRIDED_CONFIG}

# create the api directory
mkdir -p ${DOC_DEST_HOME}/api/java
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}" \
Expand All @@ -88,16 +90,15 @@ function build_docs() {
# 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://gitbox.apache.org/repos/asf/distributedlog.git /tmp/distributedlog-${version}
rm -rf /tmp/distributedlog-${version}
git clone https://github.com/apache/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}" \
-Dnotimestamp \
-Dmaven.javadoc.failOnError=false
# copy the built javadoc
cp -r /tmp/distributedlog-${version}/target/site/apidocs/* ${DOC_DEST_HOME}/api/java
Expand All @@ -108,10 +109,21 @@ function build_docs() {
# build the javadoc API

build_docs "latest"
build_docs "0.4.0-incubating" "v0.4.0-incubating-RC4_2.11"
build_docs "0.4.0-incubating" "v0.4.0-incubating_2.11"

cp -r ${TMP_DEST_DIR}/website ${DEST_DIR}/content
mkdir -p ${DEST_DIR}/content/docs
[[ -d ${DEST_DIR}/content/docs/latest ]] && rm -r ${DEST_DIR}/content/docs/latest
[[ -d ${DEST_DIR}/content/docs/0.4.0-incubating ]] && rm -r ${DEST_DIR}/content/docs/0.4.0-incubating
cp -r ${TMP_DEST_DIR}/docs_latest ${DEST_DIR}/content/docs/latest
cp -r ${TMP_DEST_DIR}/docs_0.4.0-incubating ${DEST_DIR}/content/docs/0.4.0-incubating

cp -r ${TMP_DEST_DIR}/website ${DEST_DIR}/content
mkdir -p ${DEST_DIR}/content/docs
cp -r ${TMP_DEST_DIR}/docs_latest ${DEST_DIR}/content/docs/latest
cp -r ${TMP_DEST_DIR}/docs_0.4.0-incubating ${DEST_DIR}/content/docs/0.4.0-incubating

if [[ "${SERVE}" == "TRUE" ]]; then
cd ${DLOG_HOME}/website
bundle exec jekyll serve --destination ${DEST_DIR}/content --config _config.yml,${OVERRIDED_CONFIG} --incremental
fi

6 changes: 3 additions & 3 deletions website/community/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ There are many ways to get help from the Apache DistributedLog community. The [m
</thead>
<tr>
<td>
<strong>distributedlog-user</strong>@bookkeeper.apache.org<br>
<strong>distributedlog-user</strong>@bookkeeper.apache.org<br>
<small>User related discussions</small>
</td>
<td class="text-center"><i class="fa fa-pencil-square-o"></i> <a href="mailto:distributedlog-user-subscribe@bookkeeper.apache.org">Subscribe</a></td>
Expand Down Expand Up @@ -79,7 +79,7 @@ All issue activity is also mirrored to the dev mailing list.

### Main source repositories

- **ASF gitbox**: [https://gitbox.apache.org/repos/asf/distributedlog.git](https://gitbox.apache.org/repos/asf/distributedlog.git)
- **GitHub mirror**: [https://github.com/apache/distributedlog.git](https://github.com/apache/distributedlog.git)
- **ASF gitbox**: [https://gitbox.apache.org/repos/asf/distributedlog.git](https://gitbox.apache.org/repos/asf/distributedlog.git)
- **GitHub repo**: [https://github.com/apache/distributedlog.git](https://github.com/apache/distributedlog.git)

Note: We prefer to run distributedlog using Java 8.
1 change: 1 addition & 0 deletions website/docs/0.4.0-incubating/_config-apache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog/docs/0.4.0-incubating"
1 change: 1 addition & 0 deletions website/docs/0.4.0-incubating/_config-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseurl: "/distributedlog-staging-site/docs/0.4.0-incubating"
2 changes: 1 addition & 1 deletion website/docs/0.4.0-incubating/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand" >
<a href="/distributedlog" 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">
Expand Down
48 changes: 48 additions & 0 deletions website/scripts/publish-website.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
#
# 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.
#

# NOTE: this is the script used by CI to push to apache. If you are looking for
# staging the changes, try the `staging-website.sh` script.

PROD_DIR=$1
APACHE_DIR=$2
TMP_DIR=/tmp/distributedlog-site-tmp
ORIGIN_REPO=$(git remote show origin | grep 'Push URL' | awk -F// '{print $NF}')
echo "ORIGIN_REPO: $ORIGIN_REPO"

(
rm -rf $TMP_DIR
mkdir -p $TMP_DIR
cd $TMP_DIR

# clone the remote repo
git clone "https://$ORIGIN_REPO" .
git config user.name "Apache DistributedLog Site Updater"
git config user.email "distributedlog-dev@bookkeeper.apache.org"
git checkout asf-site
# copy the apache generated dir
# cp -r $PROD_DIR/content/* $TMP_DIR/content/
cp -r $APACHE_DIR/content/* $TMP_DIR/

git add -A .
git diff-index --quiet HEAD || (git commit -m "Updated site at revision $REVISION" && git push -q origin HEAD:asf-site)

rm -rf $TMP_DIR
)
46 changes: 46 additions & 0 deletions website/scripts/staging-website.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
#
# 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.
#

LOCAL_GENERATED_DIR=$1
TMP_DIR=/tmp/distributedlog-site-tmp
ORIGIN_REPO=$(git remote show origin | grep 'Push URL' | awk -F// '{print $NF}')
echo "ORIGIN_REPO: $ORIGIN_REPO"
STAGING_REPO=`echo $ORIGIN_REPO | sed -e 's/distributedlog\.git/distributedlog-staging-site.git/g'`
echo "STAGING_REPO: $STAGING_REPO"
echo "GENERATE SITE DIR: $LOCAL_GENERATED_DIR"

(
rm -rf $TMP_DIR
mkdir $TMP_DIR

cd $TMP_DIR
# clone the remote repo
git clone "https://$STAGING_REPO" .
# if the remote is empty, we should create the `docs` directory
mkdir -p $TMP_DIR/docs
# copy the local generated dir
cp -r $LOCAL_GENERATED_DIR/content/* $TMP_DIR/docs/

git add -A .
git commit -m "Updated site at revision $REVISION"
git push -q origin HEAD:master

rm -rf $TMP_DIR
)