Skip to content

Commit

Permalink
Merge pull request #487 from akutz/feature/api-docs
Browse files Browse the repository at this point in the history
Embed Apiary Docs
  • Loading branch information
akutz authored Mar 28, 2017
2 parents 9b22f02 + d7f81d7 commit 1229996
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .docs/.themes/yeti/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,19 @@

</head>

<body>
<body {% if page_title == "API" %}class="body-api"{% endif %}>

{% include "nav.html" %}
{% if page_title == "API" %}
<!-- import the apiary embed js -->
<script src="https://api.apiary.io/seeds/embed.js"></script>
{{ content }}
{% else %}
<div class="container {% if not page_title %}index{% endif %}">
<div class="col-md-3">{% include "toc.html" %}</div>
<div class="col-md-9" role="main">{% include "content.html" %}</div>
</div>
{% endif %}

<script src="{{ base_url }}/js/jquery-1.10.2.min.js"></script>
<script src="{{ base_url }}/js/bootstrap-3.0.3.min.js"></script>
Expand All @@ -64,6 +70,7 @@
<script src="{{ path }}"></script>
{%- endfor %}
-->

</body>

</html>
4 changes: 4 additions & 0 deletions .docs/.themes/yeti/css/emccode.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ a.headerlink.hiddenanchor {
padding: 0 !important;
margin: 0 !important;
}

body.body-api {
padding-top: 45px;
}
12 changes: 12 additions & 0 deletions .docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script>
var embed = new Apiary.Embed({
"subdomain": "libstorage",
"preferences": {
"console": false,
"collapseMachineColumnByDefault": true,
"fluidHumanColumn": true,
"permalinks": true,
"displayHttpMethods": true
}
});
</script>
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pages:
- Project Guidelines: dev-guide/project-guidelines.md
- Build Reference: dev-guide/build-reference.md
- Release Process: dev-guide/release-process.md
- API: api.md
- About:
- Contributing: about/contributing.md
- License: about/license.md
Expand Down

0 comments on commit 1229996

Please sign in to comment.