You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Edit Website


The Logging Services website is generated using JBake and Maven. The content is written in Markdown and AsciiDoc. Page layouts are written in HTML within FreeMarker template files. The HTML uses the Bootstrap framework. The website is stored in a Git repository and when you push your changes to the asf_site branch, after a short delay, the changes will go live on the website.

Prerequisites

This page is not a tutorial. To update the website you will have to understand how JBake, Markdown and possibly HTML and Bootstrap work. Refer to the links above for documentation on those topics. You'll also need this software installed on your machine to update the website:

  • Git
  • Java
  • Maven

Git repository layout

|-- content                     <-- The automatically generated website, don't edit things here!
|
|-- sources
    |
    |-- pom.xml                 <-- Maven POM file that controls the generation
    |
    |-- src
        |
        |-- main
            |
            |-- jbake
                |
                |-- assets      <-- Static files to be copied into the generated website
                |
                |-- content     <-- One markdown or asciidoc page for each page of the website
                |
                |-- templates   <-- Freemarker templates for website HTML layout

Steps to update the website

  1. Use Git to clone the roller-website repo, for example:

    git clone https://git-wip-us.apache.org/repos/asf/logging-site.git

  2. Make sure you are on the asf-staging branch:

    cd logging-site
    git checkout asf-staging

  3. Make your changes to Markdowna (.md) and FreeMarker (.ftl) files under the source directory.

  4. Generate the website via Maven. Running mvn install will generate the website into the content directory.

    cd sources
    mvn install

    You can then view them in your browser by opening content/index.html. Or alternatively, run mvn jbake:inline so you can view the website locally at http://localhost:8080

  5. Once the site looks good, commit your changes and preview them in the staging environment.

    git add *
    git commit -m "my wonderful changes" .

    git push origin asf-staging

  6. Pushing your changes will cause the ASF website infrastructure will pick up your changes and publish them to the logging.staged.apache.org web site.

  7. Once the changes have been verified checkout the asf-site branch and update the asf-site branch to include your changes.

    git checkout asf-site 
    git rebase asf-staging
  8. Publish the site 

    git push origin asf-site
  9. The changes to the site should be published shortly. 

Updating Logging Services Project Web Sites


Each Logging Services Project provides its own web site in its own Git repository:

To update the site

  1. Clone the appropriate repository.
  2. Checkout the asf-staging branch.
  3. Add the new site under the content directory (or a subdirectory of that as appropriate).
  4. Update the "latest" symlink to reference the new directory that was just added.
  5. Commit the changes.

    git add *
    git commit -m "my wonderful changes" .
    git push origin asf-staging
  6. Review the changes at https://logging.staged.apache.org/project/latest, replacing latest with the name of the symlink used by the sub-project.
  7. Once the changes are approved publish them on the live site

    git checkout asf-site 
    git rebase asf-staging
    git push origin asf-site
  • No labels