incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1430446 - /sling/site/trunk/content/documentation.mdtext
Date Tue, 08 Jan 2013 19:05:49 GMT
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.*
+
+<div class="info">
+<p>
+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.
+</p>
+
+<p>
+Once migration of a page has completed the <code>translation_pending</code>
+header should be removed from the page source. After that the tip box will not be
+shown any more.
+</p>
+
+<p>
+While this page has technically been translated already, the <code>translation-pending</code>
+header is kept to remind us to remove this info box once translation has
+completed.
+</p>
+</div>
 
 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"<enter your message here>"
-
-
-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 <https://svn.apache.org/repos/asf/sling/site/trunk/content>.
 
-    $ 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 %}
+
+<div class="note">
+It is important to have the first part as a single line, otherwise
+the Django/Markdown combo will create a list for each entry.
+</div>
+
+### Code Highlighting
+
+Code Highlighting works by indenting code by four blanks. To indicate the
+type of highlighting preced the code style text with either `:::<lexer>` to
+get high lighted code using the given `<lexer>` or `#!<lexer>` to get high
+lighted code with line numbers using the given `<lexer>`. See
+<http://www.apache.org/dev/cmsref.html#code-hilighter> for main info and
+<http://pygments.org/docs/lexers/> 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.
 



Mime
View raw message