Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Make unified sections and Vim folds work. #158

Merged
merged 2 commits into from
Jul 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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