Render rst file to doc/source
This change renders dynamic rst file to doc/source instead of candidate directory so that they gets published by infra docs jobs. This is just to be able to access the source rst file on docs-draft.openstack.org host. Change-Id: I2435531d091ff051338c4ba9a495834d6653ab68
This commit is contained in:
parent
2e929687cc
commit
c97fdd8b65
6
.gitignore
vendored
6
.gitignore
vendored
@ -8,11 +8,11 @@ reference/projects/*.rst
|
|||||||
*.pyc
|
*.pyc
|
||||||
AUTHORS
|
AUTHORS
|
||||||
ChangeLog
|
ChangeLog
|
||||||
candidates/ptl.rst
|
|
||||||
candidates/tc.rst
|
|
||||||
candidates/events.rst
|
|
||||||
.projects*yaml
|
.projects*yaml
|
||||||
.projects*.pkl
|
.projects*.pkl
|
||||||
.testrepository
|
.testrepository
|
||||||
doc/source/archive_toc.rst
|
doc/source/archive_toc.rst
|
||||||
doc/source/*/*.rst
|
doc/source/*/*.rst
|
||||||
|
doc/source/ptl.rst
|
||||||
|
doc/source/tc.rst
|
||||||
|
doc/source/events.rst
|
||||||
|
@ -30,7 +30,7 @@ def render_template(template, data, **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
def render_list(list_type, candidates_list):
|
def render_list(list_type, candidates_list):
|
||||||
output_file = os.path.join(utils.CANDIDATE_PATH, "%s.rst" % list_type)
|
output_file = os.path.join(".", "doc", "source", "%s.rst" % list_type)
|
||||||
template_name = "%s.jinja" % list_type
|
template_name = "%s.jinja" % list_type
|
||||||
template_dir = os.path.join(".", "doc", "source", "_exts")
|
template_dir = os.path.join(".", "doc", "source", "_exts")
|
||||||
with open(output_file, "w") as out:
|
with open(output_file, "w") as out:
|
||||||
|
@ -42,7 +42,7 @@ def build_timer(app):
|
|||||||
outdated = ''
|
outdated = ''
|
||||||
ev['date_str'] = "%s%s, %s UTC%s" % (outdated, d, h, outdated)
|
ev['date_str'] = "%s%s, %s UTC%s" % (outdated, d, h, outdated)
|
||||||
ev['name_str'] = "%s%s%s" % (outdated, ev['name'], outdated)
|
ev['name_str'] = "%s%s%s" % (outdated, ev['name'], outdated)
|
||||||
output_file = os.path.join(utils.CANDIDATE_PATH, "events.rst")
|
output_file = os.path.join(".", "doc", "source", "events.rst")
|
||||||
with open(output_file, "w") as out:
|
with open(output_file, "w") as out:
|
||||||
template_dir = os.path.join(".", "doc", "source", "_exts")
|
template_dir = os.path.join(".", "doc", "source", "_exts")
|
||||||
loader = jinja2.FileSystemLoader(template_dir)
|
loader = jinja2.FileSystemLoader(template_dir)
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
OpenStack Election
|
OpenStack Election
|
||||||
==================
|
==================
|
||||||
|
|
||||||
.. include:: ../../candidates/events.rst
|
.. include:: events.rst
|
||||||
|
|
||||||
See `Election system`_, `PTL details`_ and `TC details`_.
|
See `Election system`_, `PTL details`_ and `TC details`_.
|
||||||
|
|
||||||
.. Below is the official list of candidates for the current round.
|
.. Below is the official list of candidates for the current round.
|
||||||
|
|
||||||
.. TODO: Change from ptl.rst to tc.rst when TC rounds starts
|
.. TODO: Change from ptl.rst to tc.rst when TC rounds starts
|
||||||
.. .. include:: ../../candidates/tc.rst
|
.. .. include:: tc.rst
|
||||||
|
|
||||||
|
|
||||||
Previous elections
|
Previous elections
|
||||||
|
Loading…
Reference in New Issue
Block a user