The source code of website james.apache.org is located in src/homepage.
Here are the instructions how to publish new changes to the website.
The website is currently composed of the output of
-
The homepage build
-
The maven site
|
Warning
|
We are migrating the content of the maven site to use antora documentation instead. Most of the useful content has been migrated but the new documentation is not yet published to the main site. It can be found on the staging version of the website. |
You can use jekyll to build the website. Go into src/homepage and run the following command
|
Warning
|
The official docker image |
$ docker run --rm -v="$PWD:/srv/jekyll:Z" -it jvconseil/jekyll-docker:4 jekyll buildThe resulting deployable content will be available in the src/homepage/_site/
directory.
In order to test the homepage, you can use this command:
$ docker run --rm -v $PWD/site:/srv/jekyll -p 4000:4000 -it jvconseil/jekyll-docker:4 jekyll serveThe site will be available at http://localhost:4000/
If you need to update the current site, checkout the branch asf-site from Apache git:
$ git clone https://git-wip-us.apache.org/repos/asf/james-site.git
$ cd james-site
$ git checkout origin/asf-site -b asf-sitemake sure to build the site then copy the output to
$ docker run --rm -v="$PWD:/srv/jekyll:Z" -it jvconseil/jekyll-docker:4 jekyll build
$ cp ../james-site/contentThen just push the new site:
$ cd ../james-site
$ git push origin asf-siteFrom the root of the repository checkout, you can use the flake’s devshell
$ cd src/homepage
$ nix developThen use jekyll directly
$ jekyll serve
# or
$ jekyll buildUpdating the gemset to track the gemfile updates is a bit involved :
-
ensure you are out of all nix devshell (check using
echo $SHLVLit should be 1) -
create a temporary shell for gem manipulation
nix-shell -p ruby -p bundix -
update the gemfile then run
BUNDLE_FORCE_RUBY_PLATFORM="true" bundle lock --update bundix -l -
exit the temporary shell and enter the devShell again
nix develop
The maven site deploy phase uses and requires locally configuring credentials to enable ssh access. See maven-deploy-plugin’s documentation for more details on achieving this.
|
Warning
|
Generating the full maven site with all reports takes a long time (as in hours) |
-
Install Apache Maven 3.0.2+ and make its binary 'mvn' available on your PATH. See http://maven.apache.org/download.html#Installation.
-
run
mvn clean package site -Djib.skip -
Test the built site in your browser from the
src/homepage/target/sitefolder -
If everything looks OK, deploy the site using
mvn clean site-deploy. -
Wait for the changes to replicate to the Apache web server or setup 140.211.11.10:80 as a proxy to review the changes (described here: http://www.apache.org/dev/project-site.html)
Can be used only to build the site locally
|
Warning
|
Contribution welcome
The docker file in
prepare for some tinkering before building using this method. |
$ docker build -t james/site src/site-docker
$ docker run -v $PWD/.m2:/root/.m2 -v $PWD:/origin -v $PWD/site:/destination james/site masterEnter the james experimental
development shell with nix develop.
-
run
mvn clean package site -Djib.skip -
Test the built site in your browser from the
src/homepage/target/sitefolder -
If everything looks OK, deploy the site using
mvn clean site-deploy. -
Wait for the changes to replicate to the Apache web server or setup 140.211.11.10:80 as a proxy to review the changes (see: http://www.apache.org/dev/project-site.html)
The old maven site is quite painful to maintain and doesn’t allow for versionning of the content per releases which motivated the migration effort.
Most of the maven site content has been migrated to asciidoc files assembled by antora. You can preview the content at https://james.staged.apache.org, this documentation is published automatically by the james CI.
This new documentation root is located in the docs directory and includes
these build instructions.