You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2016/06/02 13:38:19 UTC

svn commit: r1746574 - /velocity/site/production/site-building.html

Author: cbrisson
Date: Thu Jun  2 13:38:18 2016
New Revision: 1746574

URL: http://svn.apache.org/viewvc?rev=1746574&view=rev
Log:
[site] adapt site building page (typos and more infos)

Modified:
    velocity/site/production/site-building.html

Modified: velocity/site/production/site-building.html
URL: http://svn.apache.org/viewvc/velocity/site/production/site-building.html?rev=1746574&r1=1746573&r2=1746574&view=diff
==============================================================================
--- velocity/site/production/site-building.html (original)
+++ velocity/site/production/site-building.html Thu Jun  2 13:38:18 2016
@@ -233,12 +233,59 @@ h2:hover > .headerlink, h3:hover > .head
 </ul>
 <h3 id="editing-the-site">Editing the Site<a class="headerlink" href="#editing-the-site" title="Permanent link">&para;</a></h3>
 <p>Apache Velocity uses the <a href="http://www.apache.org/dev/cms.html">Apache Content Management System</a> to manage its site.</p>
+<p>For the time being, the site is not yet <em>hosted</em> by the CMS (which is not yet accepting new sites before undergoing a machine transition), so the site still has to be build locally. Please refer to the next section. The rest of this section is <em>not yet applicable</em>.</p>
 <p>To just edit one page, all you need is the bookmarklet found <a href="https://cms.apache.org/#bookmark">here</a></p>
-<p>$If you're a commiter, you'll be able to push your edits by yourself on the production site. Otherwise, the CMS will let you generate a diff file that you can <a href="/contact.html">send to the devs</a>.</p>
-<p>Commiters can also commit changes to <a href="http://svn.apache.org/repos/asf/velocity/site/cms/trunk/">the site under svn</a> and trigger a publication in production from the CMS (TODO - URL)</p>
+<p>If you're a commiter, you'll be able to push your edits by yourself on the production site. Otherwise, the CMS will let you generate a diff file that you can <a href="/contact.html">send to the devs</a>.</p>
+<p>Commiters can also commit changes to <a href="http://svn.apache.org/repos/asf/velocity/site/cms/trunk/">the site under svn</a> and trigger a publication in production from the CMS.</p>
 <h3 id="building-the-site">Building the Site<a class="headerlink" href="#building-the-site" title="Permanent link">&para;</a></h3>
-<p>To build the site locally, you need a local checkout of <a href="https://svn.apache.org/repos/infra/websites/cms">https://svn.apache.org/repos/infra/websites/cms</a> (then refer to the <a href="https://svn.apache.org/repos/infra/websites/cms/STATUS">STATUS</a> file).</p>
-<p>You'll of course also need a local checkout of the site sources, [https://svn.apache.org/repos/asf/velocity/site(https://svn.apache.org/repos/asf/velocity/site) (the sources for the cms are in /cms/trunk, but the process needs the whole site).</p>
+<p>To build the site locally, you'll need a local checkout of the <a href="https://svn.apache.org/repos/infra/websites/cms">Apache CMS</a> (check the <a href="https://svn.apache.org/repos/infra/websites/cms/STATUS">STATUS</a> file) and of course a local checkout of <a href="https://svn.apache.org/repos/asf/velocity/site">Velocity's site sources</a>.</p>
+<p>Typically, you'll have to:</p>
+<ol>
+<li>define the environment variable MARKDOWN_SOCKET to something like /tmp/markdown</li>
+<li>launch the CMS markdown daemon <code>apache-cms/build/markdownd.py</code></li>
+<li>run <code>apache-cms/build/build_site.pl --source-base velocity/site/cms/trunk --target-base velocity/site/target</code> (adapt the paths)</li>
+<li>copy the generated files from site/target/content to site/production (including the hidden file site/target/.htaccess)</li>
+<li>check the result then commit</li>
+</ol>
+<p>Here's a bash script that you can reuse:</p>
+<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18</pre></div></td><td class="code"><div class="codehilite"><pre><span class="c">#!/bin/bash</span>
+
+<span class="nb">export </span><span class="nv">MARKDOWN_SOCKET</span><span class="o">=</span>/tmp/markdown
+<span class="nv">CMS</span><span class="o">=</span>~/projects/velocity/apache_cms
+<span class="nv">VELOCITY</span><span class="o">=</span>~/projects/velocity
+
+<span class="k">if</span> <span class="o">[[</span> <span class="sb">`</span>pidof markdownd.py<span class="sb">`</span> <span class="o">==</span> <span class="s2">&quot;&quot;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
+   <span class="nv">$CMS</span>/build/markdownd.py
+<span class="k">fi</span>
+
+find <span class="nv">$VELOCITY</span>/site/cms/trunk/ -name <span class="s2">&quot;*~&quot;</span> <span class="p">|</span> xargs rm -v
+rm -rf <span class="nv">$VELOCITY</span>/site/target
+
+<span class="nv">$CMS</span>/build/build_site.pl --source-base <span class="nv">$VELOCITY</span>/site/cms/trunk --target-base <span class="nv">$VELOCITY</span>/site/target
+cp -r <span class="nv">$VELOCITY</span>/site/target/content/* <span class="nv">$VELOCITY</span>/site/production/
+cp <span class="nv">$VELOCITY</span>/site/target/content/.htaccess <span class="nv">$VELOCITY</span>/site/production/
+
+svn status <span class="nv">$VELOCITY</span>/site/production/
+</pre></div>
+</td></tr></table>
+
 <h3 id="additional-notes">Additional Notes<a class="headerlink" href="#additional-notes" title="Permanent link">&para;</a></h3>
 <h4 id="breadcrumbs">Breadcrumbs<a class="headerlink" href="#breadcrumbs" title="Permanent link">&para;</a></h4>
 <p>Breadcrumbs use the full pathname of the file (one path per level). So choose filenames and structure apropriately, as directory names will be used to label each step.</p>