Skip to content

Commit 990f4d3

Browse files
committed
theme added
1 parent 062da78 commit 990f4d3

35 files changed

+1550
-152
lines changed

README.rst

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
===============================
21
Django Wagtail Feeds
3-
===============================
4-
2+
====================
53

64
.. image:: https://img.shields.io/pypi/v/wagtail_feeds.svg
75
:target: https://pypi.python.org/pypi/wagtail_feeds
@@ -10,54 +8,47 @@ Django Wagtail Feeds
108
:target: https://wagtail-feeds.readthedocs.io/en/latest/?badge=latest
119
:alt: Documentation Status
1210

13-
Support RSS Feeds, Facebook Instant Articles and Apple News
11+
Support RSS Feeds, Facebook Instant Articles and Apple News. Syndication feeds come in two flavors:
1412

15-
Syndication feeds come in two flavors:
13+
- **BasicFeed** - A standard `RSS V 2.0.1`_ feed designed to be used without item enclosures.
1614

17-
- **BasicFeed** - A standard `RSS V 2.0.1`_ feed designed to be used without
18-
item enclosures.
15+
- **ExtendedFeed** - An RSS V2/Atom Feed with support for item
16+
enclosures such as images or video. Use this if when want to integrate your feed with services like MailChimp or Flipboard.
1917

20-
- **ExtendedFeed** - An RSS V2/Atom Feed with support for item
21-
enclosures such as images or video. Use this if when want to integrate your
22-
feed with services like MailChimp or Flipboard.
18+
.. _`RSS V 2.0.1` : http://cyber.law.harvard.edu/rss/rss.html
2319
2420
25-
.. _`RSS V 2.0.1` : http://cyber.law.harvard.edu/rss/rss.html
21+
Getting Started
22+
---------------
2623

27-
Instructions
28-
------------
24+
To install Django Wagtail Feeds, run this command in your terminal:
2925

30-
- Install Django Wagtail Feeds::
26+
$ pip install wagtail_feeds
3127

32-
pip install wagtail_feeds
33-
34-
- Run migrations for Wagtail feeds::
28+
Run migrations for Wagtail feeds::
3529

3630
./manage.py migrate wagtail_feeds
3731
38-
- Add Feed settings in the Wagtail admin
32+
To use Django Wagtail Feeds in a project::
3933

40-
.. figure:: admin.png
41-
:alt: Wagtail admin
42-
43-
.. figure:: feed-settings.png
44-
:alt: Feed Settings
34+
import wagtail_feeds
35+
36+
.. figure:: admin.png
37+
:alt: Wagtail admin
38+
39+
.. figure:: feed-settings.png
40+
:alt: Feed Settings
4541
46-
- Add urls for feed::
42+
Add urls for feed::
4743

4844
from wagtail_feeds.feeds import BasicFeed, ExtendedFeed
4945
5046
url(r'^blog/feed/basic$', BasicFeed(), name='basic_feed'),
5147
url(r'^blog/feed/extended$', ExtendedFeed(), name='extended_feed'),
5248
53-
- That's it. Your feed is ready
54-
55-
.. figure:: rss.png
56-
:alt: RSS Feed
5749

5850
Contributing
5951
------------
6052

61-
Contributions are always welcome to improve this project. If you think you've found a bug or are interested in contributing
62-
fork this project and send the pull request. After review, your pull request will be merged. We are always happy to receive
63-
pull requests. If you identify any issue, please raise it in the issues section.
53+
Contributions are welcome, and they are greatly appreciated! Every
54+
little bit helps, and credit will always be given.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Sphinx ReadTheDocs theme.
2+
3+
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
4+
5+
"""
6+
import os
7+
8+
VERSION = (0, 1, 9)
9+
10+
__version__ = ".".join(str(v) for v in VERSION)
11+
__version_full__ = __version__
12+
13+
14+
def get_html_theme_path():
15+
"""Return list of HTML theme paths."""
16+
cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
17+
return cur_dir
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
2+
3+
{% if page_source_suffix %}
4+
{% set suffix = page_source_suffix %}
5+
{% else %}
6+
{% set suffix = source_suffix %}
7+
{% endif %}
8+
9+
<div role="navigation" aria-label="breadcrumbs navigation">
10+
<ul class="wy-breadcrumbs">
11+
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li>
12+
{% for doc in parents %}
13+
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
14+
{% endfor %}
15+
<li>{{ title }}</li>
16+
<li class="wy-breadcrumbs-aside">
17+
{% if pagename != "search" %}
18+
{% if display_github %}
19+
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> Edit on GitHub</a>
20+
{% elif display_bitbucket %}
21+
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-bitbucket"> Edit on Bitbucket</a>
22+
{% elif show_source and source_url_prefix %}
23+
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">View page source</a>
24+
{% elif show_source and has_source and sourcename %}
25+
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> View page source</a>
26+
{% endif %}
27+
{% endif %}
28+
</li>
29+
</ul>
30+
<hr/>
31+
</div>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<footer>
2+
{% if next or prev %}
3+
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4+
{% if next %}
5+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
6+
{% endif %}
7+
{% if prev %}
8+
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
9+
{% endif %}
10+
</div>
11+
{% endif %}
12+
13+
<hr/>
14+
15+
<div role="contentinfo">
16+
<p>
17+
{%- if show_copyright %}
18+
{%- if hasdoc('copyright') %}
19+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
20+
{%- else %}
21+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
22+
{%- endif %}
23+
{%- endif %}
24+
25+
{%- if build_id and build_url %}
26+
{% trans build_url=build_url, build_id=build_id %}
27+
<span class="build">
28+
Build
29+
<a href="{{ build_url }}">{{ build_id }}</a>.
30+
</span>
31+
{% endtrans %}
32+
{%- elif commit %}
33+
{% trans commit=commit %}
34+
<span class="commit">
35+
Revision <code>{{ commit }}</code>.
36+
</span>
37+
{% endtrans %}
38+
{%- elif last_updated %}
39+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
40+
{%- endif %}
41+
42+
</p>
43+
</div>
44+
45+
{%- if show_sphinx %}
46+
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
47+
{%- endif %}
48+
49+
{%- block extrafooter %} {% endblock %}
50+
51+
</footer>
52+
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
{# TEMPLATE VAR SETTINGS #}
2+
{%- set url_root = pathto('', 1) %}
3+
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
4+
{%- if not embedded and docstitle %}
5+
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
6+
{%- else %}
7+
{%- set titlesuffix = "" %}
8+
{%- endif %}
9+
10+
<!DOCTYPE html>
11+
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
12+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
13+
<head>
14+
<meta charset="utf-8">
15+
{{ metatags }}
16+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
17+
{% block htmltitle %}
18+
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
19+
{% endblock %}
20+
21+
{# FAVICON #}
22+
{% if favicon %}
23+
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
24+
{% endif %}
25+
26+
{# CSS #}
27+
28+
{# OPENSEARCH #}
29+
{% if not embedded %}
30+
{% if use_opensearch %}
31+
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
32+
{% endif %}
33+
34+
{% endif %}
35+
36+
{# RTD hosts this file, so just load on non RTD builds #}
37+
{% if not READTHEDOCS %}
38+
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
39+
{% endif %}
40+
41+
{% for cssfile in css_files %}
42+
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
43+
{% endfor %}
44+
45+
{% for cssfile in extra_css_files %}
46+
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
47+
{% endfor %}
48+
49+
{%- block linktags %}
50+
{%- if hasdoc('about') %}
51+
<link rel="author" title="{{ _('About these documents') }}"
52+
href="{{ pathto('about') }}"/>
53+
{%- endif %}
54+
{%- if hasdoc('genindex') %}
55+
<link rel="index" title="{{ _('Index') }}"
56+
href="{{ pathto('genindex') }}"/>
57+
{%- endif %}
58+
{%- if hasdoc('search') %}
59+
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
60+
{%- endif %}
61+
{%- if hasdoc('copyright') %}
62+
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
63+
{%- endif %}
64+
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
65+
{%- if parents %}
66+
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
67+
{%- endif %}
68+
{%- if next %}
69+
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
70+
{%- endif %}
71+
{%- if prev %}
72+
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
73+
{%- endif %}
74+
{%- endblock %}
75+
{%- block extrahead %} {% endblock %}
76+
77+
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
78+
<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
79+
80+
</head>
81+
82+
<body class="wy-body-for-nav" role="document">
83+
84+
<div class="wy-grid-for-nav">
85+
86+
{# SIDE NAV, TOGGLES ON MOBILE #}
87+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
88+
<div class="wy-side-scroll">
89+
<div class="wy-side-nav-search">
90+
{% block sidebartitle %}
91+
92+
{% if logo and theme_logo_only %}
93+
<a href="{{ pathto(master_doc) }}">
94+
{% else %}
95+
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
96+
{% endif %}
97+
98+
{% if logo %}
99+
{# Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #}
100+
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
101+
{% endif %}
102+
</a>
103+
104+
{% if theme_display_version %}
105+
{%- set nav_version = version %}
106+
{% if READTHEDOCS and current_version %}
107+
{%- set nav_version = current_version %}
108+
{% endif %}
109+
{% if nav_version %}
110+
<div class="version">
111+
{{ nav_version }}
112+
</div>
113+
{% endif %}
114+
{% endif %}
115+
116+
{% include "searchbox.html" %}
117+
118+
{% endblock %}
119+
</div>
120+
121+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
122+
{% block menu %}
123+
{% set toctree = toctree(maxdepth=4, collapse=theme_collapse_navigation, includehidden=True) %}
124+
{% if toctree %}
125+
{{ toctree }}
126+
{% else %}
127+
<!-- Local TOC -->
128+
<div class="local-toc">{{ toc }}</div>
129+
{% endif %}
130+
{% endblock %}
131+
</div>
132+
</div>
133+
</nav>
134+
135+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
136+
137+
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
138+
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
139+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
140+
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
141+
</nav>
142+
143+
144+
{# PAGE CONTENT #}
145+
<div class="wy-nav-content">
146+
<div class="rst-content">
147+
{% include "breadcrumbs.html" %}
148+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
149+
<div itemprop="articleBody">
150+
{% block body %}{% endblock %}
151+
</div>
152+
</div>
153+
{% include "footer.html" %}
154+
</div>
155+
</div>
156+
157+
</section>
158+
159+
</div>
160+
{% include "versions.html" %}
161+
162+
{% if not embedded %}
163+
164+
<script type="text/javascript">
165+
var DOCUMENTATION_OPTIONS = {
166+
URL_ROOT:'{{ url_root }}',
167+
VERSION:'{{ release|e }}',
168+
COLLAPSE_INDEX:false,
169+
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
170+
HAS_SOURCE: {{ has_source|lower }}
171+
};
172+
</script>
173+
{%- for scriptfile in script_files %}
174+
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
175+
{%- endfor %}
176+
177+
{% endif %}
178+
179+
{# RTD hosts this file, so just load on non RTD builds #}
180+
{% if not READTHEDOCS %}
181+
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
182+
{% endif %}
183+
184+
{# STICKY NAVIGATION #}
185+
{% if theme_sticky_navigation %}
186+
<script type="text/javascript">
187+
jQuery(function () {
188+
SphinxRtdTheme.StickyNav.enable();
189+
});
190+
</script>
191+
{% endif %}
192+
193+
{%- block footer %} {% endblock %}
194+
195+
</body>
196+
</html>

0 commit comments

Comments
 (0)