| 1 | How it will be: |
|---|
| 2 | --------------- |
|---|
| 3 | |
|---|
| 4 | Lumiera website is meant to live through uWiki |
|---|
| 5 | (see link:http://git.pipapo.org/uWiki.html[] ) |
|---|
| 6 | uWiki is still in development, so for now, the website is built from AsciiDoc and git. |
|---|
| 7 | |
|---|
| 8 | How it is now: |
|---|
| 9 | -------------- |
|---|
| 10 | |
|---|
| 11 | Website pages come from TXT files, written with AsciiDoc markup, that are |
|---|
| 12 | committed to the Lumiera git repository and converted to HTML with |
|---|
| 13 | an AsciiDoc script. The pages have two external CSS (stylesheets), |
|---|
| 14 | one for the layout and one for styling the Asciidoc markup. |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | Editing 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 | |
|---|
| 49 | Editing Pages in Asciidoc |
|---|
| 50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 51 | |
|---|
| 52 | All the website pages are built with txt files using Asciidoc markup. |
|---|
| 53 | If you've ever used a wiki markup, Asciidoc is similar. |
|---|
| 54 | |
|---|
| 55 | An AsciiDoc cheatsheet: link:http://powerman.name/doc/asciidoc[] |
|---|
| 56 | The cheatsheet is a great reference to have open while editing and shows many |
|---|
| 57 | more advanced features than covered here. |
|---|
| 58 | |
|---|
| 59 | To know a lot about AsciiDoc markup see AsciiDoc website at: |
|---|
| 60 | link:http://www.methods.co.nz/asciidoc/[] |
|---|
| 61 | |
|---|
| 62 | I use gedit text editor, bundled with GNOME. I also use: |
|---|
| 63 | link:https://launchpad.net/asciidoc-gtk-highlight[Asciidoc Syntax Highlighter] |
|---|
| 64 | to add highlighting like one could with html, script or code. |
|---|
| 65 | |
|---|
| 66 | But here is a quick overview of our document style... |
|---|
| 67 | |
|---|
| 68 | CAUTION: If any features are causing problems/not functioning as described, |
|---|
| 69 | check your code, then let us know! |
|---|
| 70 | |
|---|
| 71 | Headers/Titles & Lists |
|---|
| 72 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|---|
| 73 | ---------------------------------------- |
|---|
| 74 | Very top title of the page |
|---|
| 75 | =========================== |
|---|
| 76 | ^the '=' signs make it the page header |
|---|
| 77 | ---------------------------------------- |
|---|
| 78 | |
|---|
| 79 | Make sure for titles/headers the underlining is the whole length of the content, |
|---|
| 80 | otherwise it may not display correctly. |
|---|
| 81 | One trick is to add an extra mark past the content above. |
|---|
| 82 | Also, be very careful to leave a line return above and below titles and headers. |
|---|
| 83 | |
|---|
| 84 | Because I spend a lot of time looking at the asciidoc files, |
|---|
| 85 | I like the "underline" style of titles/headers: |
|---|
| 86 | |
|---|
| 87 | Header/Title size 1 |
|---|
| 88 | -------------------- |
|---|
| 89 | ^For major sections of the document, in some pages there may only be 1 |
|---|
| 90 | |
|---|
| 91 | Header/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 | |
|---|
| 96 | Header/Title size 1 |
|---|
| 97 | ^^^^^^^^^^^^^^^^^^^^ |
|---|
| 98 | ^Break up steps or details with this, in html has no underline/hr |
|---|
| 99 | |
|---|
| 100 | Header/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 | |
|---|
| 118 | Links |
|---|
| 119 | ^^^^^^ |
|---|
| 120 | |
|---|
| 121 | To 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 | |
|---|
| 126 | link:{l}/index.html[Home Page] |
|---|
| 127 | |
|---|
| 128 | For 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, |
|---|
| 130 | it uses an 'attribute tag' in layout1.conf to replace: |
|---|
| 131 | \{l} with \http://staging.lumiera.org |
|---|
| 132 | When the site moves from staging.lumiera.org to the main url, |
|---|
| 133 | the 'l' attribute will be modified accordingly. |
|---|
| 134 | |
|---|
| 135 | TIP: In your local git repo duplicate layout1.conf, and chage the value of 'l' |
|---|
| 136 | |
|---|
| 137 | -------------------------------------------------------------------------------- |
|---|
| 138 | l=http://staging.lumiera.org to: |
|---|
| 139 | l=/foo/...yourgitrepo |
|---|
| 140 | |
|---|
| 141 | DO NOT add a trailing / to the location, |
|---|
| 142 | these are written into the actual link in the Asciidoc page |
|---|
| 143 | -------------------------------------------------------------------------------- |
|---|
| 144 | |
|---|
| 145 | Images |
|---|
| 146 | ^^^^^^^ |
|---|
| 147 | Similar to links: |
|---|
| 148 | |
|---|
| 149 | 'image:<~url.img[<Alt text>]' |
|---|
| 150 | image:{l}/images/lao.png[<penguin>] |
|---|
| 151 | You can have a thumbnail image link to the full-size with: |
|---|
| 152 | image:<~url1.img>["<Alt text>", width=<###>, link="<~url1.img>] |
|---|
| 153 | |
|---|
| 154 | Design and Style Editing |
|---|
| 155 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 156 | |
|---|
| 157 | The style breaks down as this: |
|---|
| 158 | |
|---|
| 159 | Layout of the html-page elements are in link:/layout1.css[] & |
|---|
| 160 | link:/layout1.conf[], which are used by the build_website.sh. |
|---|
| 161 | |
|---|
| 162 | At present, there should be little reason to edit the html in the '.conf' file, |
|---|
| 163 | as almost all layout and styling can be done through the '.css'. |
|---|
| 164 | |
|---|
| 165 | The CSS files are decently documented with ' /* -- comments -- */ ' to explain |
|---|
| 166 | the structure and hopefully function of the elements. Make sure to look over the |
|---|
| 167 | html and css relationship and get some understanding of how it works. First see |
|---|
| 168 | the header in link:/layout1.conf to understand the configuration of |
|---|
| 169 | site elements, and then move on from there. |
|---|
| 170 | |
|---|
| 171 | Styling for how Asciidoc markup appears in the #layout-content area of the page |
|---|
| 172 | is in link:/xhtml11.css[] |
|---|
| 173 | Use this to change fonts & colors, link decoration, spacing, etc. |
|---|
| 174 | |
|---|
| 175 | * To edit the style of the credits page edit link:/project/credits.css[] |
|---|
| 176 | and link:/project/credits.conf[] |
|---|
| 177 | |
|---|
| 178 | |
|---|
| 179 | What happens when you push to the server |
|---|
| 180 | ----------------------------------------- |
|---|
| 181 | |
|---|
| 182 | Push the changes to git. |
|---|
| 183 | That will activate 'post-receive', a git hook that automatically checks |
|---|
| 184 | the files out and run 'build-website.sh', a script that converts |
|---|
| 185 | the AsciiDoc TXT sources to HTML webpages. |
|---|
| 186 | |
|---|
| 187 | The full path of the 'post-receive' git hook is: |
|---|
| 188 | /var/www-staging/.git/hooks/post-receive |
|---|
| 189 | |
|---|
| 190 | The full path of the 'build-website.sh' script is: |
|---|
| 191 | /var/www-staging/build_website.sh + |
|---|
| 192 | or locally: .../~sitegitrepo/build_website.sh |
|---|
| 193 | |
|---|
| 194 | The task of the 'build-website.sh' script is to run the asciidoc command |
|---|
| 195 | to create not just HTML pages but real webpages pointing to external CSS. |
|---|
| 196 | This script contains the list of TXT files to be converted to HTML webpages. |
|---|
| 197 | |
|---|
| 198 | |
|---|