forked from openvswitch/openvswitch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_DOC
78 lines (57 loc) · 2.77 KB
/
_DOC
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
OVS Jekyll website
------------------
What we use of jekyll:
- the templating engine, to format yaml data into html (for the navbar),
to use jekyll variables (page.url, site.url, page.title)
- the layout mechanism. Each page includes only its specific content and
declare its layout (which is a html file that contains the logo,
the navbar, the footer...)
What we do not use:
- blog specific mechanisms: we do not have blogs, we do not have posts.
We do not have a _post/ directory.
Layouts
-------
The skel (_layouts/skel.html) layout contains the header (logo+navbar) and
the footer. It displays it content into a center ~900px-wide div. It is
directly used only for the homepage.
The page (_layouts/page.html) layout "inherits" from the skel layout and adds
a series of widgets (updates, recent releases, ...) and the title inside the
mainpage div.
Almost every page uses this.
The pagenosidewidget (_layouts/pagenosidewidget.html.html) layout "inherits"
from the skel layout and adds only the title inside the mainpage div.
The CSS that we use is inspired by the wordpress output (but it's supposed
to be directly maintainable). It uses heavily fixed sized elements (i.e. we
explicitly specify the size in px).
Layouts rely on includes
Includes
--------
We use includes to split html in multiple files. For example the side widgets
are on _include/side_widgets.html.
Navigation bar
--------------
- Style:
The navbar is only a nested series of <ul> <li> elements (this is in line
with current best practices).
The navbar display behavior (display/hide submenus) is implemented only in
CSS, in a style tag inside header.html. It should support an unlimited
number of nested submenus
- Content:
Jekyll (at least the safe version used by github pages) does not support
a way to generate a page list. Therefore we manually list the pages that
we want to appear in the navbar (in order) in _data/nav.yml. The url
attribute is relative to the parent page.
A bit of templating magic (recursively including menulist.html, with
different include.* variables) allows us to generate the <ul><li> elements
The skel layout includes _includes/header.html which includes
_includes/menulist.html
Pages
-----
Jekyll allows us to write page content in html or markdown. Most of the pages
are HTML now, since that is the output of the wordpress importer. Pages that
require advanced styling (e.g. the homepage) should be in html too.
Currently all the pages use a directory URL (e.g. http://openvswitch.org/support/)
The page is stored in a file called index.html (or index.markdown)
Each page has a yaml preamble that contains the title, the layout that we
want, and some other information extracted by wordpress that it might be worth
keeping.