| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 # CMS # | 1 # CMS # |
| 2 | 2 |
| 3 We use this CMS for [adblockplus.org](https://github.com/adblockplus/web.adblock plus.org/) | 3 We use this CMS for [adblockplus.org](https://github.com/adblockplus/web.adblock plus.org/) |
| 4 and related websites. It converts a directory with content data into static | 4 and related websites. It converts a directory with content data into static |
| 5 files. You are free to use it for other projects but please keep in mind that we | 5 files. You are free to use it for other projects but please keep in mind that we |
| 6 make no stability guarantees whatsoever and might change functionality any time. | 6 make no stability guarantees whatsoever and might change functionality any time. |
| 7 | 7 |
| 8 ## How to use ## | 8 ## How to use ## |
| 9 | 9 |
| 10 ### Running the test server ### | 10 ### Running the test server ### |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 In the case above the contents of `includes/foo.md` or `includes/foo.tmpl` will | 201 In the case above the contents of `includes/foo.md` or `includes/foo.tmpl` will |
| 202 be inserted (whichever is present). | 202 be inserted (whichever is present). |
| 203 | 203 |
| 204 #### Markdown format (md) #### | 204 #### Markdown format (md) #### |
| 205 | 205 |
| 206 This format should normally be used, it allows the pages to be defined using the | 206 This format should normally be used, it allows the pages to be defined using the |
| 207 [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax. Raw HTML | 207 [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax. Raw HTML |
| 208 tags are allowed and can be used where Markdown syntax isn't sufficient. The | 208 tags are allowed and can be used where Markdown syntax isn't sufficient. The |
| 209 [Python-Markdown Extra](https://pythonhosted.org/Markdown/extensions/extra.html) | 209 [Python-Markdown Extra](https://pythonhosted.org/Markdown/extensions/extra.html) |
| 210 extension is active and allows specifying custom attributes for the generated | 210 extension is active and allows specifying custom attributes for the generated |
| 211 HTML tags, and HTML block elements that contain Markdown. | 211 HTML tags, HTML block elements that contain Markdown and more. |
|
Sebastian Noack
2015/11/26 14:23:51
I think there isn't supposed to be a comma before
Sebastian Noack
2015/11/26 14:23:51
Apparently, that is not the only thing the extra e
saroyanm
2015/11/26 14:29:48
Maybe make sense to make description more general,
kzar
2015/11/26 14:41:24
Done.
| |
| 212 | 212 |
| 213 Any content between `<head>` and `</head>` tags will be inserted into the head | 213 Any content between `<head>` and `</head>` tags will be inserted into the head |
| 214 of the generated web page, this is meant for styles, scripts and the like. | 214 of the generated web page, this is meant for styles, scripts and the like. |
| 215 Other pages should be linked by using their name as link target (relative links) , | 215 Other pages should be linked by using their name as link target (relative links) , |
| 216 these links will be resolved to point to the most appropriate page language. | 216 these links will be resolved to point to the most appropriate page language. |
| 217 Embedding localizable images works the same, use the image name as image source. | 217 Embedding localizable images works the same, use the image name as image source. |
| 218 | 218 |
| 219 Localizable strings can be specified inline with the following syntax: | 219 Localizable strings can be specified inline with the following syntax: |
| 220 | 220 |
| 221 {{string_name String contents in default language}} | 221 {{string_name String contents in default language}} |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 filter is invoked. For more information on Jinja2 filters see | 314 filter is invoked. For more information on Jinja2 filters see |
| 315 [official documentation](http://jinja.pocoo.org/docs/dev/api/#writing-filters). | 315 [official documentation](http://jinja.pocoo.org/docs/dev/api/#writing-filters). |
| 316 | 316 |
| 317 ### Custom functions and variables ### | 317 ### Custom functions and variables ### |
| 318 | 318 |
| 319 The `globals` directory can define custom Jinja2 globals which will be available | 319 The `globals` directory can define custom Jinja2 globals which will be available |
| 320 in all Jinja2 templates. Typically, this is used for custom functions. The file | 320 in all Jinja2 templates. Typically, this is used for custom functions. The file |
| 321 name should match the name of the function or variable to be defined, and export | 321 name should match the name of the function or variable to be defined, and export |
| 322 a variable with that name. E.g. `globals/myfunction.py` can define a function | 322 a variable with that name. E.g. `globals/myfunction.py` can define a function |
| 323 called `myfunction` that will become available to all Jinja2 templates. | 323 called `myfunction` that will become available to all Jinja2 templates. |
| LEFT | RIGHT |