Ticket #423: quickstart.txt

File quickstart.txt, 6.9 KB (added by bjmr, 22 months ago)

quickstart.txt from bjmr's repo 8/2

Line 
1How it will be:
2---------------
3
4Lumiera website is meant to live through uWiki
5(see link:http://git.pipapo.org/uWiki.html[] )
6uWiki is still in development, so for now, the website is built from AsciiDoc and git.
7
8How it is now:
9--------------
10
11Website pages come from TXT files, written with AsciiDoc markup, that are
12committed to the Lumiera git repository and converted to HTML with
13an AsciiDoc script. The pages have two external CSS (stylesheets),
14 one for the layout and one for styling the Asciidoc markup.
15
16
17Editing a Webpage
18~~~~~~~~~~~~~~~~~
19
20 1. Get the site from git repository(repo)
21        a. Use git gui (or cola) and clone the repository from
22           link:http://git.lumiera/org/git/website-staging[]  (master branch)
23        b. Of course one can use the command line, I presume you already know git.
24           repo: link:http://git.lumiera/org/git/website-staging[]
25
26 2. Edit the txt(s) by following the directions in "Write Asciidoc Now!" below
27
28 3. View the effect of your edits:
29        a. Locally by running build_website.sh in your git repo
30        b. Remove generated html files by searching the repo for ".html" and
31           deleting all (BJMR's quick'n'dirty method)
32
33 4. Use git (or gui) to commit locally.
34        a. Please summarize what/why on line 1 of the commit note
35        b. On line 3 detail what you've done.
36        c. These commit notes are the way we understand the work you've done
37
38 5. Check for other's edits & push
39        a. You will need a git account \~usr@git.lumiera.org to push to the server
40        b. Use a fetch or pull command from the master repo (on git.lumiera.org
41           server)
42        b. If there is nothing new from the server (repo up-to-date) See "d"
43        d. If changes are made check what files are different from the server:
44           merge, see "d"
45...If they conflict with someone else's edits either carefully merge and check the results
46...or ask someone (like the author of the edits) on irc/email  irc.freenode.net #lumiera
47        d. Push your edits to the server (origin, master branch)
48
49Editing Pages in Asciidoc
50~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52All the website pages are built with txt files using Asciidoc markup.
53If you've ever used a wiki markup, Asciidoc is similar.
54
55An AsciiDoc cheatsheet: link:http://powerman.name/doc/asciidoc[]
56The cheatsheet is a great reference to have open while editing and shows many
57more advanced features than covered here.
58
59To know a lot about AsciiDoc markup see AsciiDoc website at:
60link:http://www.methods.co.nz/asciidoc/[]
61
62I use gedit text editor, bundled with GNOME. I also use:
63 link:https://launchpad.net/asciidoc-gtk-highlight[Asciidoc Syntax Highlighter]
64to add highlighting like one could with html, script or code.
65
66But here is a quick overview of our document style...
67
68CAUTION: If any features are causing problems/not functioning as described,
69check your code, then let us know!
70
71Headers/Titles & Lists
72^^^^^^^^^^^^^^^^^^^^^^^
73----------------------------------------
74Very top title of the page
75===========================
76^the '=' signs make it the page header
77----------------------------------------
78
79Make sure for titles/headers the underlining is the whole length of the content,
80otherwise it may not display correctly.
81One trick is to add an extra mark past the content above.
82Also, be very careful to leave a line return above and below titles and headers.
83
84Because I spend a lot of time looking at the asciidoc files,
85 I like the "underline" style of titles/headers:
86
87Header/Title size 1
88--------------------
89^For major sections of the document, in some pages there may only be 1
90
91Header/Title size 2
92~~~~~~~~~~~~~~~~~~~~
93^For sub-sections, I use these alot because they aren't huge on screen,
94 but render with a line below in html
95
96Header/Title size 1
97^^^^^^^^^^^^^^^^^^^^
98^Break up steps or details with this, in html has no underline/hr
99
100Header/Title size 1
101++++++++++++++++++++
102^Haven't used one yet :)
103
104 * Make simple
105 * Lists
106 * With asterisk '*'
107
108. Make Complicated
109.. Lists
110... with periods '.'
111. The number of periods
112... determine
113.. how far indented
114. the
115..... text
116.. will be
117
118Links
119^^^^^^
120
121To add a 'link': use 'link:<~url>[<Visible link Text>]'
122
123=> replace: <...> and leave the brackets '[]' at the end,
124 even if you don't fill them.
125
126link:{l}/index.html[Home Page]
127
128For troubleshooting and archival purposes, we are having the full (absolute) url
129 of links and images added with a simple command. As the build script runs,
130it uses an 'attribute tag' in layout1.conf to replace:
131 \{l} with \http://staging.lumiera.org
132When the site moves from staging.lumiera.org to the main url,
133the 'l' attribute will be modified accordingly.
134
135TIP: In your local git repo duplicate layout1.conf, and chage the value of 'l'
136
137--------------------------------------------------------------------------------
138l=http://staging.lumiera.org   to:
139l=/foo/...yourgitrepo
140
141DO NOT add a trailing / to the location,
142these are written into the actual link in the Asciidoc page
143--------------------------------------------------------------------------------
144
145Images
146^^^^^^^
147Similar to links:
148
149'image:<~url.img[<Alt text>]'
150image:{l}/images/lao.png[<penguin>]
151You can have a thumbnail image link to the full-size with:
152image:<~url1.img>["<Alt text>", width=<###>, link="<~url1.img>]
153
154Design and Style Editing
155~~~~~~~~~~~~~~~~~~~~~~~~~
156
157The style breaks down as this:
158
159Layout of the html-page elements are in link:/layout1.css[] &
160link:/layout1.conf[], which are used by the build_website.sh.
161
162At present, there should be little reason to edit the html in the '.conf' file,
163as almost all layout and styling can be done through the '.css'.
164
165The CSS files are decently documented with ' /* -- comments -- */ ' to explain
166the structure and hopefully function of the elements. Make sure to look over the
167html and css relationship and get some understanding of how it works. First see
168the header in link:/layout1.conf to understand the configuration of
169site elements, and then move on from there.
170
171Styling for how Asciidoc markup appears in the #layout-content area of the page
172is in link:/xhtml11.css[]
173Use this to change fonts & colors, link decoration, spacing, etc.
174
175* To edit the style of the credits page edit link:/project/credits.css[]
176and link:/project/credits.conf[]
177
178
179What happens when you push to the server
180-----------------------------------------
181
182Push the changes to git.
183That will activate 'post-receive', a git hook that automatically checks
184the files out and run 'build-website.sh', a script that converts
185the AsciiDoc TXT sources to HTML webpages.
186
187The full path of the 'post-receive' git hook is:
188/var/www-staging/.git/hooks/post-receive
189
190The full path of the 'build-website.sh' script is:
191/var/www-staging/build_website.sh  +
192or locally: .../~sitegitrepo/build_website.sh
193
194The task of the 'build-website.sh' script is to run the asciidoc command
195to create not just HTML pages but real webpages pointing to external CSS.
196This script contains the list of TXT files to be converted to HTML webpages.
197
198