Publish site-pskov with en/ru docs
This commit is contained in:
@@ -64,9 +64,17 @@
|
||||
text-align: left;
|
||||
color: #444;
|
||||
}
|
||||
#footer
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
#lang
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<title>
|
||||
pskov_1.0.0
|
||||
PSKOV
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -74,6 +82,10 @@
|
||||
<strong id="title">PSKOV</strong>
|
||||
<a href="pskov_1.0.0.html">Tool</a>
|
||||
<a href="education.html">Education</a>
|
||||
<div id="lang">
|
||||
<a href="../en/education.04.lang.html">EN</a>
|
||||
<a href="../ru/education.04.lang.html">RU</a>
|
||||
</div>
|
||||
</div>
|
||||
<center><h1>
|
||||
Education: 04. Language
|
||||
@@ -101,7 +113,7 @@ Education: 04. Language
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<ul>
|
||||
<li><a href="#localization">01. Localization</a></li>
|
||||
<li><a href="#cfg">02. Investigate <code>cfg</code> file</a></li>
|
||||
<li><a href="#cfg">02. Investigate <code>pskov.cfg</code> file</a></li>
|
||||
<li><a href="#item">03. Investigate template files</a></li>
|
||||
<li><a href="#md">04. Investigate Markdown files</a></li>
|
||||
<li><a href="#gen">05. Launch LFSA and generate the site</a></li>
|
||||
@@ -112,7 +124,7 @@ Education: 04. Language
|
||||
<p>Now that you have your web site in English you start to wonder why there's no Russian version, you're Russian after all!</p>
|
||||
<p>You set on to create the following <a href="https://github.com/OGStudio/site-pskov-sample/tree/master/02.Language">directory structure</a>:</p>
|
||||
<ul>
|
||||
<li><code>cfg</code></li>
|
||||
<li><code>pskov.cfg</code></li>
|
||||
<li><code>en/item.template</code></li>
|
||||
<li><code>en/about.md</code></li>
|
||||
<li><code>en/cv.md</code></li>
|
||||
@@ -122,8 +134,8 @@ Education: 04. Language
|
||||
</ul>
|
||||
<p>Let's look at the contents of these files closer.</p>
|
||||
<p><a name="cfg"/></p>
|
||||
<h2 id="02investigatecfgfile">02. Investigate <code>cfg</code> file</h2>
|
||||
<p><code>cfg</code> file has the following contents:</p>
|
||||
<h2 id="02investigatepskovcfgfile">02. Investigate <code>pskov.cfg</code> file</h2>
|
||||
<p><code>pskov.cfg</code> file has the following contents:</p>
|
||||
<pre><code>input = en;ru
|
||||
item = item.template
|
||||
</code></pre>
|
||||
@@ -185,14 +197,14 @@ item = item.template
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>PSKOV_ITEM_URL</code></td>
|
||||
<td>Provides generated page's file name: <code><slug>.html</code></td>
|
||||
<td>Provides generated page's file name</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>As you see, <code>PSKOV_ITEM_URL</code> is all you need to have your page in as many languages as you please.</p>
|
||||
<p><a name="md"/></p>
|
||||
<h2 id="04investigatemarkdownfiles">04. Investigate Markdown files</h2>
|
||||
<p><code>en/about.md</code> and <code>en/cv.md</code> files look almost exactly as <a href="education.03.site.html">before</a>. <code>ru/about.md</code> and <code>ru/cv.md</code> are simply Russian variants of the same pages.</p>
|
||||
<p><code>en/about.md</code> and <code>en/cv.md</code> files look almost exactly as <a href="education.03.site.html">before</a>. <code>ru/about.md</code> and <code>ru/cv.md</code> are simply Russian variants of corresponding pages.</p>
|
||||
<p>For example, <code>ru/cv.md</code> has the following contents:</p>
|
||||
<pre><code> Title: Резюме
|
||||
Slug: cv
|
||||
@@ -208,11 +220,11 @@ item = item.template
|
||||
| Учёба | Императорская Академия художеств |
|
||||
| Звания | * академик ИАХ (1898) <br> * действительный член ИАХ (1903) |
|
||||
</code></pre>
|
||||
<p><strong>Note</strong>: Russian page has exactly the same <code>Slug:</code> value as English one.</p>
|
||||
<p><strong>Note</strong>: Russian page has exactly the same <code>Slug</code> value as English one.</p>
|
||||
<p><a name="gen"/></p>
|
||||
<h2 id="05launchlfsaandgeneratethesite">05. Launch LFSA and generate the site</h2>
|
||||
<p>Launch <a href="http://opengamestudio.org/lfsa">LFSA</a> so that it points to directory with the files we just observed:</p>
|
||||
<pre><code>$ /path/to/lfsa-201905.py /path/to/dir/02.Language
|
||||
<pre><code>$ /path/to/lfsa_1.0.0.py /path/to/dir/02.Language
|
||||
</code></pre>
|
||||
<p>Generate the site:</p>
|
||||
<ul>
|
||||
@@ -235,7 +247,7 @@ item = item.template
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>PSKOV_ITEM_URL</code></td>
|
||||
<td>Provides generated page's file name: <code><slug>.html</code></td>
|
||||
<td>Provides generated page's file name</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -257,6 +269,11 @@ item = item.template
|
||||
</tbody>
|
||||
</table>
|
||||
</div></center>
|
||||
<div id="footer">
|
||||
The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
|
||||
from <a href="http://github.com/ogstudio/site-pskov">this source code</a>.
|
||||
The site is hosted by <a href="https://pages.github.com">GitHub Pages</a>.
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user