aboutsummaryrefslogtreecommitdiff
path: root/old_manual.html
blob: 215326c0a2f1a5c87ac33c168c0c9750e4905a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<article id="manual">

<h2 id="manual">Manual</h2>

<h3 id="startup">Startup</h3>

<p>There is'nt a real start of anything when you're using W.</p>

<p>Just type an adress in your web browser, after your W folder. You should see an empty page, not existing yet. You can login to create one at this adress. If you are already logged in, you can juste type <code><i>page_id</i>/add</code>, this will directly create a page at this adress.</p>

<p>This <code><i>page_id</i></code> is the identifier of each page, you cant change it later, this is like a real solid adress, it cant move. It can only contain lowercase letters, numbers, hyphens or underscore charachters.</p>

<p>No visitor can see the full list of pages you've created. The only way to see the whole map of your project, is to be conected at least as an editor, and go to the "homepage", the root adress where W is instaled.</p>

<h3 id="structure">Structure</h3>

<h4>Pages and IDs</h4>

<p>The structure of website is very simple as there is no structure. It's you to link the pages together or not.</p>

<p>A page is defined by a unique <code>id</code>. As it's created, you can access it typing <code>.../<i>your_page_id</i>/</code> or without slash <code>.../<i>your_page_id</i></code></p>

<p>An ID can only contain lowercase letters, numbers, underscore and "-"</p>


<h4 id="attributes">Page attributes</h4>

<h5>Id</h5>

<p>Unique identifier, this is the url that point to your page</p>

<h5>title</h5>

<p>Page title, can use more complex characters than the ID element. It's printed in the explorer tab name. It's the official name of your page.</p>

<h5>Description</h5>

<p>The description attribute is a short informations about your page. It's used to create tooltip, when the mouse hover internal links.</p>

<h5>Tag(s)</h5>

<p>tags are used to create selections of pages. tags are one word only, sepparated by commas and whitespace.</p>

<h5>Privacy level</h5>

<p>Set the level of privacy of your page.
</br><strong>0</strong> -> public
</br><strong>1</strong> -> private <i>reserved to private readers</i>
</br><strong>2</strong> -> not published <i>Nobody but editors can see it.</i> </p>


<h5>Date & time</h5>

<p>You can manualy set a date and time for each pages.</p>

<h4 id="database">Database</h4>

<p>All this pages are stored in your database, as a file by page. You can access them in the <code>.../database/<i>name_of_your_store</i>/</code></p>











<h3 id="editor">Editor</h3>

<p>W use the fives basics html elements to store your content</p>

<ul>
<li>header</li>
<li>nav</li>
<li>aside</li>
<li>main</li>
<li>footer</li>
</ul>

<p>You can use any of them, only one or all at the same time, as you prefer.</p>

<h4 id="elementsyntax">Element syntax</h4>

<p>In any of the five html element you can use to store content, you can use the following syntax, that is specific to W, extending the Markdown syntax :</p>

<h5>quick internal link</h5>

<p>You can create internal link very quickly, only by using the id of your page. The link text will be remplaced by the title associated with this page.</p>

<blockquote>
    [<i>page_id</i>]
</blockquote>

<p>This will output :</p>

<blockquote>
&lt;a href="<i>page->url</i>" class="internal" title="<i>page->description</i>"&gt;<i>page->title</i>&lt;/a&gt;
</blockquote>

<h5>Title shortcut</h5>

<blockquote>
    %TITLE%
</blockquote>

<p>Will output the page <code>title</code> attribute. This can be usefull when templating, or including differents page element.</p>


<h5>Description shortcut</h5>

<blockquote>
    %DESCRIPTION%
</blockquote>

<p>As for the title, this will output the <code>description</code> attribute of the page</p>

<h5>Date shortcut</h5>

<blockquote>
    %DATE% %DATECREATION% %DATEMODIF%
</blockquote>

<p>There are tree dates attributes that can be printed. The <strong>date</strong> attribute, will return the date that can be manualy set in the editor. <strong>datecreation</strong> will return the date of the page creation. <strong>datemodif</strong> will output the last editing date.</p>


<h5>Automatic summary</h5>

<p>You can automatically generate summary, based on the page <code>&lt;h*&gt;</code> elements</p>

<blockquote>
    %SUMMARY%
</blockquote>

<p>This will generate a classic <code>&lt;ul&gt;</code> html list.</p>

<h5>Automatic list by tag</h5>

<p>You can create a html list of links pointing to all the pages using this tag.</p>

<blockquote>
    %TAG:<i>__tag__</i>%
</blockquote>

<p>Let's suppose we are in page3 and we have page2, page3, page5, using this tag, this will output :</p>

<blockquote>
&lt;ul id="<i>tag</i>"&gt;
</br>
&lt;li&gt;
</br>
&lt;a href="<i>2->url</i>" class="internal" title="<i>2->description</i>"&gt;<i>2->title</i>&lt;/a&gt;
</br>
&lt;/li&gt;
</br>
&lt;li&gt;
</br>
&lt;a href="<i>3->url</i>" class="internal actualpage" title="<i>3->description</i>"&gt;<i>3->title</i>&lt;/a&gt;
</br>
&lt;/li&gt;
</br>
&lt;li&gt;
</br>
&lt;a href="<i>5->url</i>" class="internal" title="<i>5->description</i>"&gt;<i>5->title</i>&lt;/a&gt;
</br>
&lt;/li&gt;
</br>
&lt;/ul&gt;
</blockquote>

<p>The list is ordered by the <code>date</code> attribute, that you can set manualy for each page. You may have noticed that the actual page (page 3), has been specified using <code>.actualpage</code> class. This can be usefull to create a menu and highlight the current page.</p>


<h5>Article separator</h5>

<p>You can use the <code>article</code> html element, by separating text using at least <code>====</code>. It is of course possible to use Markdown synthax inside those articles separators</p>

<blockquote>
====</br></br>
<i>some text</i></br></br>
======<i>important</i></br></br>
<i>this is a longer text</i></br></br>
======</br></br>
</blockquote>

<p>This will ouptut :</p>

<blockquote>
&lt;article&gt;</br>
<i>some text</i></br>
&lt;/article&gt;</br>
&lt;article id="<i>important</i>"&gt;</br>
<i>this is a longer textt</i></br>
&lt;/article&gt;</br>
</blockquote>


<p>As you may have noticed, there is also the possibility to add a custom <code>id</code> to any of the articles created that way</p>


<h5>Media list</h5>

<p>As it is too long adding all media of a folder one by one, you can just print the content of an entire folder using this method.</p>

<blockquote>
%MEDIA:<i>__directory__</i>
</blockquote>

<p>Just point to the good directory inside the media folder. This will output html list, creating image elements, audio players, video players, or just basic link, depending on the media type.</p>






<h4 id="bodysyntax">Body syntax</h4>




<h5>Basic including</h5>

<blockquote>%HTML_ELEMENT%</blockquote>


<p>This will include the matching html element from your page's content in your page body. If there is nothing in the corresponding element, it won't print anything. The name of the html element as to be UPPERCASE.</p>

<p>For example :</p>

<blockquote>
%ASIDE%
</br>
</br>
%MAIN%
</blockquote>

<p>Will output :</p>

<blockquote>
&lt;aside class="<i>page_id</i>"&gt;
</br>
__the content of your aside__
</br>

&lt;/aside&gt;
</br>
</br>
&lt;main class="<i>page_id</i>"&gt;
</br>
__the content of your main__
</br>

&lt;/main&gt;


</blockquote>

<p>You can also use one element multiple times.</p>

<h5>Advanced includings</h5>

<blockquote>
    %<i>HTML_ELEMENT</i>:<i>page_id</i>%
</blockquote>

<p>By doing this, you can include the <code>HTML_ELEMENT</code> of the page using this <code>page_id</code> id. You can even nest differents pages source by adding <code>page_id</code> separated by a dot, this would be like :</p>

<blockquote>
    %<i>HTML_ELEMENT</i>:<i>page1_id</i>+<i>page2_id</i>% 
</blockquote>

<p>And you can mix it with the original page content using <code>!</code> identifier</p>

<blockquote>
    %<i>HTML_ELEMENT</i>:<i>page3_id</i>+<i>!</i>%
</blockquote>

<p>This will output :</p>

<blockquote>

&lt;html_element class="<i>page3_id page_id</i>"&gt;
</br>
__content of page1's html element__
</br>
__content of this page html element__
</br>
&lt;/html_element&gt;



</blockquote>

</article>