Skip to content

Commit

Permalink
POC: Make unified sections and Vim folds work.
Browse files Browse the repository at this point in the history
Related to: #156

Is currently based on development version of yaml2rst.
  • Loading branch information
ypid committed Jul 8, 2016
1 parent 65be259 commit 28c6f4a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,20 @@
[submodule "docs/ansible/roles/ansible-resources"]
path = docs/ansible/roles/ansible-resources
url = https://github.com/debops/ansible-resources
ignore = untracked
[submodule "docs/ansible/roles/ansible-slapd"]
path = docs/ansible/roles/ansible-slapd
url = https://github.com/debops/ansible-slapd
ignore = untracked
[submodule "docs/ansible/roles/ansible-ruby"]
path = docs/ansible/roles/ansible-ruby
url = https://github.com/debops/ansible-ruby
ignore = untracked
[submodule "docs/ansible/roles/ansible-golang"]
path = docs/ansible/roles/ansible-golang
url = https://github.com/debops/ansible-golang
ignore = untracked
[submodule "docs/ansible/roles/ansible-nodejs"]
path = docs/ansible/roles/ansible-nodejs
url = https://github.com/debops/ansible-nodejs
ignore = untracked
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
# Generate documentation on the fly based on Ansible default variables
import yaml2rst

try:
for element in os.listdir('ansible/roles'):
if os.path.isdir('ansible/roles/' + element):
yaml2rst.convert_file('ansible/roles/' + element + '/defaults/main.yml', 'ansible/roles/' + element + '/docs/defaults.rst')
except:
pass
for element in os.listdir('ansible/roles'):
if os.path.isdir('ansible/roles/' + element):
yaml2rst.convert_file(
'ansible/roles/' + element + '/defaults/main.yml',
'ansible/roles/' + element + '/docs/defaults.rst',
strip_regex=r'\s*(:?\[{3}|\]{3})\d?$',
)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
yaml2rst
## Install unreleased develop version until htgoebel makes a release.
# yaml2rst
https://github.com/ypid/yaml2rst/archive/feature/expose-strip_regex.zip

0 comments on commit 28c6f4a

Please sign in to comment.