Skip to content

Commit

Permalink
Merged #158. POC: Make unified sections and Vim folds work.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Jul 8, 2016
2 parents 65be259 + cd7bf4a commit 03e5d63
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python:
- "2.7"

# command to install dependencies
install: "pip install -q yaml2rst sphinx==1.3.4"
install: "pip install -r docs/requirements.txt"

# command to run tests
script: ./test.sh -W
Expand Down
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
6 changes: 5 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
yaml2rst
sphinx==1.3.4

## TODO: 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 03e5d63

Please sign in to comment.