Skip to content

Commit c701c51

Browse files
author
Emmanouil Konstantinidis
committed
Edit on GitHub Button
1 parent 2438542 commit c701c51

File tree

9 files changed

+30
-21
lines changed

9 files changed

+30
-21
lines changed

docs/contributing.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: "Contributing & Development"
3-
source_filename: "contributing"
2+
source_filename: contributing
43
---
54

65
### Development

docs/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: "Home"
3-
permalink: /
2+
source_filename: index
43
---
54

65
Django REST Framework Docs (DRF Docs) allows you to list all your API Endpoints that inherit from <a href="http://www.django-rest-framework.org/" target="_blank">Django REST Framework</a> **automatically**. Its purpose is to work out of the box and it should take a minimum to install it.

docs/installation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: "Installation"
3-
source_filename: "installation"
2+
source_filename: installation
43
---
54

65
The installation itself should not take more than a couple of minutes. Follow the simple steps below.

docs/live-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: "Live API Endpoints"
3-
source_filename: "live-api"
2+
source_filename: live-api
43
---
54

65
### What is "Live API Endpoints"?
6+
77
Live API Endpoints allow you to test your endpoints from within DRF docs. For each endpoints you can press the little *plug* icon which will bring up a modal with all the endpoint's fields and all the relevant information so that you can make a request instantly.
88

99
It is still in **beta** so if you face any problems - feel free to open an issue/pull request on GitHub.

docs/settings.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: "Settings"
3-
source_filename: "settings"
2+
source_filename: settings
43
---
54

65
### How to set the settings

docs/template/content.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@
99
<div class="page">
1010
{% if page_title %}<h1 class="page-title">{{ page_title }}</h1>{% endif %}
1111
{{ content }}
12+
13+
{% for filename in meta.source_filename %}
14+
<h1>{{filename}}</h1>
15+
<a class="btn btn-default btn-edit" href="https://github.com/ekonstantinidis/django-rest-framework-docs/blob/master/docs/{{ filename }}.md"><i class="fa fa-github"></i> Edit on Github</a>
16+
{% endfor %}
1217
</div>

docs/template/nav.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@
2424
<i class="fa fa-search"></i> Search
2525
</a>
2626
</li>
27+
<li {% if not previous_page %}class="disabled"{% endif %}>
28+
<a rel="next" {% if previous_page %}href="{{ previous_page.url }}"{% endif %}>
29+
<i class="fa fa-arrow-left"></i> Previous
30+
</a>
31+
</li>
32+
<li {% if not next_page %}class="disabled"{% endif %}>
33+
<a rel="prev" {% if next_page %}href="{{ next_page.url }}"{% endif %}>
34+
Next <i class="fa fa-arrow-right"></i>
35+
</a>
36+
</li>
2737
{% if repo_url %}
2838
<li>
2939
<a href="{{ repo_url }}">

docs/templates.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: "Template Customization"
3-
source_filename: "templates"
2+
source_filename: templates
43
---
54

65
### Create the template file
@@ -13,33 +12,32 @@ To edit the template you will have to create a `.html` file to override the orig
1312

1413
### Default Blocks
1514

16-
17-
#### Styles (CSS)
15+
##### Styles (CSS)
1816

1917
{% raw %}
2018
{% block style %}
2119
<link rel="stylesheet" href="{% static "path/to/custom/css/style.css" %}">
2220
{% endblock %}
2321
{% endraw %}
2422

25-
#### GitHub Badge
23+
##### GitHub Badge
2624
To hide the GitHub badge from the page, just override it with an empty block.
2725

2826
{% raw %}{% block github_badge %}{% endblock %}{% endraw %}
2927

30-
#### Title
28+
##### Title
3129

3230
{% raw %}{% block title %}Project Name{% endblock %}{% endraw %}
3331

34-
#### Logo
32+
##### Logo
3533

3634
{% raw %}
3735
{% block logo %}
3836
<a class="navbar-brand" href="http://www.drfdocs.com/">DRF Docs</a>
3937
{% endblock %}
4038
{% endraw %}
4139

42-
#### Jumbotron
40+
##### Jumbotron
4341

4442
{% raw %}
4543
{% block jumbotron %}
@@ -50,7 +48,7 @@ To hide the GitHub badge from the page, just override it with an empty block.
5048
{% endblock %}
5149
{% endraw %}
5250

53-
#### Footer
51+
##### Footer
5452

5553
{% raw %}
5654
{% block footer %}
@@ -82,6 +80,6 @@ File location: `templates/rest_framework_docs/docs.html`
8280
</div>
8381
{% endblock %}
8482

85-
{% block footer %}<div class="footer">Copyright © 2015 Project Name.</div>{% endblock %}
83+
{% block footer %}<div class="footer">Copyright © 2016 Project Name.</div>{% endblock %}
8684

8785
{% endraw %}

rest_framework_docs/templates/rest_framework_docs/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h3>Document Web APIs made with <a href="http://www.django-rest-framework.org/"
7070
<a href="http://www.github.com/ekonstantinidis"><i class="fa fa-github"></i></a>
7171
<a href="http://www.twitter.com/iamemmanouil"><i class="fa fa-twitter"></i></a>
7272
</div>
73-
Copyright © 2015 Emmanouil Konstantinidis.
73+
Copyright © 2016 Emmanouil Konstantinidis.
7474
</div>
7575
{% endblock %}
7676
</div>

0 commit comments

Comments
 (0)