Skip to content

Commit 321a8c8

Browse files
Merge pull request #68 from ekonstantinidis/move-docs-mkdocs
Init MKdocs
2 parents a5af900 + 4244c3c commit 321a8c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1733
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ demo/db.sqlite3
99
dist/
1010
drfdocs.egg-info/
1111

12+
site/
13+
1214
rest_framework_docs/static/node_modules/
1315
rest_framework_docs/static/rest_framework_docs/js/dist.min.js.map

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ global-exclude __pycache__
66
global-exclude *.py[co]
77
global-exclude package.json
88

9+
prune docs
910
prune rest_framework_docs/static/node_modules
1011

1112
graft rest_framework_docs/static/rest_framework_docs

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
drfdocs.com

docs/changelog.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Changelog"
3+
source_filename: "changelog"
4+
---
5+
6+
### Release 0.0.7
7+
8+
- Fix methods in Live API Endpoints (now compatible with Python 2.7)
9+
- Remove `.<format>` from urls
10+
- Fixed a bug that removes double slashes from the endpoint's url
11+
12+
13+
### Release 0.0.6
14+
15+
- Introducing Live API Endpoints - Test your endpoints from within the docs
16+
- Setting `HIDDEN` is now `HIDE_DOCS`
17+
18+
19+
### Release 0.0.5
20+
21+
- Support both common types of ROOT_URLCONF
22+
23+
24+
### Release 0.0.4
25+
26+
- Allow templates overrides
27+
- More template `blocks` to be overridden
28+
- Improved MANIFEST.in
29+
- Exclude `node_modules/`
30+
31+
32+
### Release 0.0.3
33+
34+
- Fixes a bug where Django's `collectstatic` command was failing because of Glyphicons
35+
36+
37+
### Release 0.0.2
38+
39+
- Search between endpoint paths
40+
- Display docstring for each endpoint
41+
42+
43+
### Release 0.0.1
44+
45+
First release of the project to [pypi](https://pypi.python.org/pypi). Features include:
46+
47+
- List all endpoints that inherit from DRF's `APIView`
48+
- Settings to hide docs view (ie. in Production)
49+
- Override Templates
50+
- Support for Python 2.7, 3.3, 3.4, 3.5
51+
- Support for Django 1.8, 1.9
52+
- Support for Django REST Framework 3 and above

docs/contributing.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
source_filename: contributing
3+
---
4+
5+
### Development
6+
If you want to **use the demo** app to work on this package:
7+
8+
In the project [repository](https://github.com/ekonstantinidis/django-rest-framework-docs) you can find the demo app(at /demo). It is a project with Django & Django Rest Framework that will allow you to work with this project.
9+
10+
From the root of the repository:
11+
12+
# Create the virtual environment
13+
pyvenv env
14+
15+
# Install requirements
16+
env/bin/pip install -r requirements.txt
17+
18+
# Activate the environment
19+
source env/bin/activate
20+
21+
# Cd Into the demo
22+
cd demo/
23+
24+
# Install Django Rest Framework Docs
25+
pip install -e ../
26+
27+
# Run the project
28+
python manage.py runserver
29+
30+
Note: You do not need a database or to run migrate.
31+
32+
33+
If you are looking to develop this package with one of your **own django projects**:
34+
35+
pyvenv env
36+
env/bin/pip install -r requirements.txt
37+
pip install -e ~/Projects/drf-docs/
38+
39+
### Contributing to the project
40+
41+
1. Fork it!
42+
2. Create your feature branch: `git checkout -b my-new-feature`
43+
3. Commit your changes: `git commit -am 'Add some feature'`
44+
4. Push to the branch: `git push origin my-new-feature`
45+
5. Submit a pull request
46+
6. Make sure tests are passing
47+
48+
49+
### Code of Conduct
50+
51+
As contributors and maintainers of this project, and in the interest of
52+
fostering an open and welcoming community, we pledge to respect all people who
53+
contribute through reporting issues, posting feature requests, updating
54+
documentation, submitting pull requests or patches, and other activities.
55+
56+
We are committed to making participation in this project a harassment-free
57+
experience for everyone, regardless of level of experience, gender, gender
58+
identity and expression, sexual orientation, disability, personal appearance,
59+
body size, race, ethnicity, age, religion, or nationality.
60+
61+
Examples of unacceptable behavior by participants include:
62+
63+
* The use of sexualized language or imagery
64+
* Personal attacks
65+
* Trolling or insulting/derogatory comments
66+
* Public or private harassment
67+
* Publishing other's private information, such as physical or electronic
68+
addresses, without explicit permission
69+
* Other unethical or unprofessional conduct
70+
71+
Project maintainers have the right and responsibility to remove, edit, or
72+
reject comments, commits, code, wiki edits, issues, and other contributions
73+
that are not aligned to this Code of Conduct, or to ban temporarily or
74+
permanently any contributor for other behaviors that they deem inappropriate,
75+
threatening, offensive, or harmful.
76+
77+
By adopting this Code of Conduct, project maintainers commit themselves to
78+
fairly and consistently applying these principles to every aspect of managing
79+
this project. Project maintainers who do not follow or enforce the Code of
80+
Conduct may be permanently removed from the project team.
81+
82+
This Code of Conduct applies both within project spaces and in public spaces
83+
when an individual is representing the project or its community.
84+
85+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
86+
reported by contacting a project maintainer at [email protected]. All
87+
complaints will be reviewed and investigated and will result in a response that
88+
is deemed necessary and appropriate to the circumstances. Maintainers are
89+
obligated to maintain confidentiality with regard to the reporter of an
90+
incident.
91+
92+
93+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
94+
version 1.3.0, available at
95+
[http://contributor-covenant.org/version/1/3/0/][version]
96+
97+
[homepage]: http://contributor-covenant.org
98+
[version]: http://contributor-covenant.org/version/1/3/0/

docs/css/styles.css

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
/* @group Misc */
2+
3+
body {
4+
background-color: #FEFEFE;
5+
}
6+
7+
.btn-demo {
8+
display: block;
9+
margin: 20px auto 10px;
10+
max-width: 180px;
11+
}
12+
13+
.btn-edit {
14+
margin-top: 10px;
15+
padding: 5px 10px;
16+
float: right;
17+
}
18+
19+
.side-nav {
20+
margin-top: 0;
21+
}
22+
23+
/* @end Misc */
24+
25+
26+
/* @group Header */
27+
28+
.header .jumbotron {
29+
margin: 30px 0 40px;
30+
padding: 10px 20px 20px;
31+
text-align: center;
32+
}
33+
34+
.header .jumbotron .img-responsive {
35+
display: inline-block;
36+
margin: 5px auto;
37+
}
38+
39+
.header .jumbotron .logo-badge {
40+
max-width: 150px;
41+
}
42+
43+
/* @end Header */
44+
45+
46+
/* @group Content Page */
47+
48+
.page .page-title {
49+
margin-top: 0;
50+
}
51+
52+
/* @end Content Page */
53+
54+
55+
/* @group Footer */
56+
57+
.footer {
58+
text-align: center;
59+
padding: 20px;
60+
margin-bottom: 20px;
61+
}
62+
63+
.footer .links {
64+
padding: 20px 0;
65+
}
66+
67+
.footer .links .fa {
68+
margin: 0 10px;
69+
font-size: 22px;
70+
}
71+
72+
/* @end Footer */
73+
74+
75+
/* @group Scroll to Top */
76+
77+
.scroll-to-top {
78+
padding: 10px;
79+
background-color: #ecf0f1;
80+
color: #18bc9c;
81+
font-size: 12px;
82+
text-decoration: none;
83+
84+
position: fixed;
85+
bottom: 40px;
86+
right: 40px;
87+
display:none;
88+
89+
-webkit-border-radius: 5px;
90+
-moz-border-radius: 5px;
91+
border-radius: 5px;
92+
-moz-background-clip: padding;
93+
-webkit-background-clip: padding-box;
94+
background-clip: padding-box;
95+
}
96+
97+
.scroll-to-top:hover {
98+
text-decoration: none;
99+
}
100+
101+
/* @end Scroll to Top */
102+
103+
104+
105+
/* @group Github Ribbon - SVG */
106+
107+
.github-corner:hover .octo-arm {
108+
animation: octocat-wave 560ms ease-in-out;
109+
}
110+
111+
@keyframes octocat-wave {
112+
0% {
113+
transform: rotate(0deg);
114+
}
115+
20% {
116+
transform: rotate(-25deg);
117+
}
118+
40% {
119+
transform: rotate(10deg);
120+
}
121+
60% {
122+
transform: rotate(-25deg);
123+
}
124+
80% {
125+
transform: rotate(10deg);
126+
}
127+
100% {
128+
transform: rotate(0deg);
129+
}
130+
}
131+
132+
@media (max-width: 768px) {
133+
.github-corner {
134+
display: none;
135+
}
136+
.github-corner:hover .octo-arm {
137+
animation: none;
138+
}
139+
.github-corner .octo-arm {
140+
animation: octocat-wave 560ms ease-in-out;
141+
}
142+
}
143+
144+
/* @end Github Ribbon - SVG */

docs/images/django-logo.png

15.5 KB
Loading

docs/images/docs.png

298 KB
Loading

docs/images/drf-logo.png

35.8 KB
Loading

docs/images/live-api.png

458 KB
Loading

0 commit comments

Comments
 (0)