Git Product home page Git Product logo

sling-site's Introduction

License

Apache Sling Website

This repository contains the content of the http://sling.apache.org/ website, which moved in September 2017 from the Apache CMS to this JBake-generated site.

How to build and stage the site locally

Clone this repository, run the below Maven command, open http://localhost:8820/ and enjoy.

mvn clean package -Prun-site

This allows you to experiment with your changes before eventually publishing them.

How to publish the website

Clone this repository and run the below commands or equivalent:

# Build the site and review your changes
mvn clean package

# deploy the site
mvn clean package -Ppublish-site -Dmsg="<describe your changes>"

The ASF's gitpubsub mechanism then synchronizes that content to http://sling.apache.org, usually within a few seconds. More details about the publication process can be found in the ASF Documentation about Project sites.

We could automate this using a Jenkins job that's restricted to run on build nodes having the git-websites label, as done by Apache PLC4X.

Note that the publish-scm goal might fail if you add lots of changes due to MSCMPUB-18. In that scenario you have to manually perform the git operations, see for instance this file at revision 3e58fbd7.

Variables in page content

Adding expandVariables=true to a page's front matter enables simple variables replacement, see the pageVariables map in templates code for which variables are supported or to add more variables. A pattern like ${sling_tagline} in page content is replaced by the sling_tagline variable if it exists, otherwise a MISSING_PAGE_VARIABLE marker is output.

Please use a sling. prefix for new site-related variables in jbake.properties, to differentiate from JBake built-in variables.

Other Apache projects using JBake

It's sometimes useful to steal ideas get inspiration from other projects using similar tools, for now we know of:

JBake and other technotes

Useful scripts and commands

To find broken links use

wget --spider -r -nd -nv -l 5 http://localhost:8820/ 2>&1 | grep -B1 'broken link'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.