Skip to content

Commit

Permalink
improved static site output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Sep 13, 2012
1 parent 9e79495 commit 09078fe
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OUTPUT_PATH = './doc/pelican/'
#PATH = 'doc'
REVERSE_ARCHIVE_ORDER = True
CONTENT_STATIC_LOC = '../../'
MD_EXTENSIONS = ['tables']
MD_EXTENSIONS = ['tables', 'def_list']
SUMMARY_MAX_LENGTH = 50

LINKS = (('Moa docs', 'http://mfiers.github.com/Moa/'),
Expand Down
52 changes: 35 additions & 17 deletions lib/python/moa/plugin/system/doc/templates/template.page.jinja2
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
Title: template "{{ t.moa_id }}"
Category: template

{{ t.description }}

{% macro printpar(p) -%}
{{ "%24s"|format('**' + p + '**') }} |
{%- if t.parameters[p]['optional'] == False %} M {% else %} O {% endif %}|
{%- if t.parameters[p]['type'] %}{{ "%10s"|format(t.parameters[p].type)}} {% else %} - {% endif -%}
|{% if t.parameters[p].help %}{{t.parameters[p].help}}{%endif%}
{% endmacro -%}
{{ p }}
: {% if t.parameters[p].help -%}
{{t.parameters[p].help}}
{%- else -%}
*(no help provided)*
{%- endif %}

*type: *
{%- if t.parameters[p]['type'] -%}
{{ t.parameters[p].type }}
{%- else -%}
String
{%- endif %}<br>
optional: {%- if t.parameters[p]['optional'] == True %}yes{% else %}no{% endif %}

{%- macro printfs(f) -%}
{{ "%24s"|format('**' + f + '**') }} |{%- set strip='yes' -%}
{% if t.filesets[f].optional%} O {% else %} M {% endif %}|{%- set strip='yes' -%}
{{ "%10s"|format(t.filesets[f].category) }}|{%- set strip='yes' -%}
{{ "%10s"|format(t.filesets[f].type) }}|{%- set strip='yes' -%}
{% if t.filesets[f].help %}{{ t.filesets[f].help }}{% endif %}
{% endmacro -%}
{%- macro printfs(f) -%}
{{ f }}
: {% if t.filesets[f].help -%}
{{ t.filesets[f].help }}
{%- else -%}
*(no help provided)*
{%- endif %}

*type:* {{ t.filesets[f].type }}<br>
*category:* {{ t.filesets[f].category }}<br>
*optional:* {% if t.filesets[f].optional %}yes{% else %}no{% endif %}

{% endmacro %}

### Description

{{ t.description }}

### Filesets

Name | O | category | type | help
-------------------------|---|----------|----------|-------------------------------------------------------------
{% for p in t.filesets -%}
{{ printfs(p) }}
{%- endfor %}

### Parameters

Name | O | type | help
-------------------------|---|-----------|-------------------------------------------------------------
{% for p in t.parameters -%}
{%- if p[0] != "_" and p[:4] != "moa" %}{{printpar(p)}}{% endif %}
{%- endfor %}

### Private parameters

{% for p in t.parameters -%}
{%- if p[0] == "_" or p[:4] != "moa" %}{{printpar(p)}}{% endif %}
{%- endfor %}

### General

Expand Down
6 changes: 6 additions & 0 deletions lib/python/moa/plugin/system/doc/theme/static/local.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ div.highlight pre {
.social a[href*='stackoverflow.com']:before {content: url('./images/icons/stackoverflow.png'); margin-right: 2px; vertical-align: -3px;}
.social a[href*='twitter.com']:before {content: url('./images/icons/twitter.png'); margin-right: 2px; vertical-align: -3px;}
.social a[href*='weibo.com']:before {content: url('./images/icons/weibo.png'); margin-right: 2px; vertical-align: -3px;}


dl dd {
margin-left: 20px;
margin-bottom: 5px;
}

0 comments on commit 09078fe

Please sign in to comment.