Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BA06D703 for ; Tue, 8 Jan 2013 19:06:12 +0000 (UTC) Received: (qmail 85676 invoked by uid 500); 8 Jan 2013 19:06:12 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 85585 invoked by uid 500); 8 Jan 2013 19:06:11 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 85577 invoked by uid 99); 8 Jan 2013 19:06:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2013 19:06:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2013 19:06:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1294223888EA; Tue, 8 Jan 2013 19:05:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1430446 - /sling/site/trunk/content/documentation.mdtext Date: Tue, 08 Jan 2013 19:05:49 -0000 To: commits@sling.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130108190550.1294223888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fmeschbe Date: Tue Jan 8 19:05:49 2013 New Revision: 1430446 URL: http://svn.apache.org/viewvc?rev=1430446&view=rev Log: CMS commit to sling by fmeschbe Modified: sling/site/trunk/content/documentation.mdtext Modified: sling/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation.mdtext?rev=1430446&r1=1430445&r2=1430446&view=diff ============================================================================== --- sling/site/trunk/content/documentation.mdtext (original) +++ sling/site/trunk/content/documentation.mdtext Tue Jan 8 19:05:49 2013 @@ -1,3 +1,4 @@ +translation_pending: true Title: Documentation The documentation is split into different parts: @@ -12,12 +13,37 @@ The documentation is split into differen * [API Doc]({{ refs.http://sling.apache.org/apidocs/sling5/index.html.path }}) -## How can you contribute +# How can you contribute We're on the way to improve the documentation, but it's a long way. If you would like to contribute to the documentation you are very welcome. Please directly post your proposals to the [public wiki]({{ refs.http://cwiki.apache.org/SLING/.path }}) or post your suggestions to the mailing list. -## How is the documentation generated +# How is the documentation generated + +*The Sling web site and documentation are managed with the [Apache CMS](https://www.apache.org/dev/cms.html). +For Apache Sling specific extensions see the [The Sling Site](#the-sling-site) +section below.* + +
+

+The Sling site is being converted from a Confluence exported site to an +Apache CMS managed site. During this conversion not all pages will display +correctly. All non-fully converted pages will show a tip box pointing to +the original Confluence exported page for reference. +

+ +

+Once migration of a page has completed the translation_pending +header should be removed from the page source. After that the tip box will not be +shown any more. +

+ +

+While this page has technically been translated already, the translation-pending +header is kept to remind us to remove this info box once translation has +completed. +

+
The basic documentation of Sling is made up of four parts: @@ -29,63 +55,147 @@ The basic documentation of Sling is made This page is about how this documentation is maintained and who is allowed to do what. -### The Sling Site - -#### Main Site - -The main Sling Site is maintained in the Confluence Wiki Space *SLINGxSITE*. The content of this space is automatically synchronized with the web server with a simple shell script [^sling.sh]({{ refs.-sling-sh.path }}) which is called regularly as per the following `crontab` entry: - - - # sync wiki autoexport to Sling site - 1 * * * * (/home/fmeschbe/sling.sh) - - -Thus, after editing the site source in the Wiki, the rest happens automatically, it just takes some time -- in the order 2 hours or so -- before the changes are visible at http://sling.apache.org/. - -Everybody is allowed to read the SLINGxSITE wiki and to add comments; but only committers of the Apache Sling project are allowed to edit the content and to manage the comments. - -The main site is located in the `site` folder below the Site URL [http://sling.apache.org/]({{ refs.http://sling.apache.org/.path }}) to which users are redirected automatically. - -#### Secondary Site - -The Sling site contains secondary site parts that are maintained in the Apache SVN repository at [http://svn.apache.org/repos/asf/sling/site]({{ refs.http://svn.apache.org/repos/asf/sling/site.path }}). Updates to secondary parts of the site have to be done in the following steps: - -1. Checkout or update the [site]({{ refs.https://svn.apache.org/repos/asf/sling/site.path }}) tree form SVN. - - - $ svn checkout https://svn.apache.org/repos/asf/sling/site - - -2. Apply your changes. - -3. Commit the changes back into SVN. - - - $ svn commit -m"" - - -4. Login to `people.apache.org` - - - $ ssh people.apache.org - - -5. Go to the location from where infrastructure mirroring is getting the actual sites and update from SVN. +## The Sling Site +The site is managed with the [Apache CMS](https://www.apache.org/dev/cms.html) +where the source is kept in SVN at . - $ cd /x1/www/sling.apache.org - $ svn update +This section lists some Apache Sling features to help with the maintenance +of the site, such as automatic link generation. +Start the file with a `Title:` line to define the page title and the first H1 tag: + + Title: Page Title + + Here comes the content separated with a blank like from the + header ... + +The last modification information from SVN (revision, committer, and +date/time) is automatically added when the page is rendered + +Excerpts can be added to a page using the `Excerpt:` header: + + Title: Page Title + Excerpt: Summary of the page for inclusion in other pages; + continuation of the excerpt must be indented + + Here comes the content separated with a blank like from the + header ... + +Metadata from child pages can be referred to in the content with the +Django variable reference notation using the child page name (without +extension) as its container; e.g. for the child page named `childpage`: + + :::django + {{ y|default:"{{" }} children.childpage.headers.excerpt }} + {{ y|default:"{{" }} children.childpage.headers.title }} + +Content Pages can contain Django templates of the form `{{ y|default:"{{" }}...}}` and `{{ y|default:"{%" }}...%}`. +If so, the page content is evaluated as a Django template before running +it through the page template. + +Any page in the site can be referenced with refs.pagename returning properties: + +`.path` +: the absolute path of the page on the site + +`.headers` +: page headers (e.g. `.title`, `.excerpt`) + +`.content` +: the raw page content + +All pages in the children namespace are also available in the refs namespace + +Some usefull hints: + +Printing title of another page "handler": + + :::django + {{ y|default:"{{" }} refs.handler.headers.title }} + +Printing excerpt of another page "handler": + + :::django + {{ y|default:"{{" }} refs.handler.headers.excerpt }} + +Linking to another page "handler": + + :::django + ({{ y|default:"{{" }} refs.handler.path }}) + +Printing title as a link to another page "handler": + + :::django + [{{ y|default:"{{" }} refs.handler.headers.title }}]({{ y|default:"{{" }} refs.handler.path }}) + +Printing excerpt as a link to another page "handler": + + :::django + [{{ y|default:"{{" }} refs.handler.headers.excerpt }}]({{ y|default:"{{" }} refs.handler.path }}) + +Print a bullet pointed child page list: + + :::django + {{ y|default:"{%" }} for label, page in children %}* [{{ y|default:"{{" }} page.headers.title }}]({{ y|default:"{{" }} page.path }}) + {{ y|default:"{%" }} endfor %} + +
+It is important to have the first part as a single line, otherwise +the Django/Markdown combo will create a list for each entry. +
+ +### Code Highlighting + +Code Highlighting works by indenting code by four blanks. To indicate the +type of highlighting preced the code style text with either `:::` to +get high lighted code using the given `` or `#!` to get high +lighted code with line numbers using the given ``. See + for main info and + for supported lexers + + +### Manual Generation + +When commiting changes to pages into SVN the pages are automatically +generated in [the staging site](http://felix.staging.apache.org). + +To manually generate the site or single pages the [site](http://svn.apache.org/repos/asf/felix/site) +can be checked out from SVN. In addition Perl and Python must be installed +for the build tools to work. + +To prepare for site build, the Markdown daemon has to be started: + + :::sh + $ export MARKDOWN_SOCKET="$PWD/tools/build/../markdown.socket" + $ export PYTHONPATH="$PWD/tools/build" + $ python "$PWD/tools/build/markdownd.py" + +The `MARKDOWN_SOCKET` environment variables is also required by the `build_site.pl` +and `build_file.pl` scripts to connect to the Markdown daemon. + +To build the complete site use the `build_site.pl` script: + + :::sh + $ tools/build/build_site.pl --source-base $PWD/trunk \ + --target-base $PWD/trunk/target + +To build a single page use the `build_file.pl` script: + + :::sh + $ tools/build/build_site.pl --source-base $PWD/trunk \ + --target-base $PWD/trunk/target \ + --source content/documentation.mdtext -After some time, the updates will be synchronized to the web servers and can be accessed. +The argument to the `--source` parameter is relative to the `--source-base` folder. -### The Public Wiki +## The Public Wiki The public wiki of Sling is available at http://cwiki.apache.org/SLING and is maintained in the Confluence space *SLING*. This is a public wiki, in that after self-registration, everybody is allowed to edit content. -### The JavaDoc +## The JavaDoc Up until now the JavaDoc of the Sling Bundles has not been published. @@ -99,7 +209,7 @@ I just polished the JavaDoc generation s I am still unsure whether it makes sense to generate aggregate JavaDoc for all (or part of) the bundles of Sling. See also below regarding the Sites. -### The Bundle Documentation +## The Bundle Documentation Apart from the documentation of Sling on the Site and in the Wiki, it would also be thinkable that we accompany the source modules with some documentation and generate this using the Maven Site plugin. My tests so far for generating a multi-module site have not been very successful. But generating the site in a module-by-module manner might be a good thing, at least to get the per-module JavaDoc and some more code-oriented information like Surefire Reports, fixed bugs, etc.