Skip to content

Commit 2b3023f

Browse files
pfctdayelisepelme
authored andcommitted
Theme tweaks, add second/launch post (#8)
* Make devserver command work properly * Make posts subdir under content. Fix image embedding * Theme tweaks' * theme tweaks * New post
1 parent 492ac24 commit 2b3023f

File tree

13 files changed

+70
-52
lines changed

13 files changed

+70
-52
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ else
4545
cd $(OUTPUTDIR) && $(PY) -m pelican.server 8000
4646
endif
4747

48-
devserver:
48+
devserver: html
4949
ifdef PORT
5050
$(BASEDIR)/develop_server.sh restart $(PORT)
5151
else

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ Now you should be able to run the blog and see it in your browser:
2525

2626

2727
## How to write a new article
28-
This blog uses [pelican](http://docs.getpelican.com/)
28+
This blog uses [pelican](http://docs.getpelican.com/).
2929

3030

3131
# Publishing
3232

3333
Publishing is done automatically for all commits in the master branch. Most of
34-
the time, just push your changes and have them deployed.
34+
the time, just push your changes and have them deployed.
3535

3636
It is also possible to deploy directly from your local machine by
3737
running `make publish`.
38+
39+
If you don't want to check out the repository, you can use the Github web interface to add a new file under a subdirectory of "content".

content/2015/we-have-a-blog.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Title: We have a blog
2+
Date: 2015-07-25 22:00
3+
Tags: meta, europython
4+
Authors: pelme
5+
Summary: Short version for index and feeds
6+
7+
And we have a blog.
8+
9+
This was a nice hacking day! A photo from the EuroPython 2015 sprints in Bilbao.
10+
11+
![We're legion]({attach}images/legion.jpg){.img-rounded}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Title: Blog 1.0
2+
Date: 2016-06-24 12:00
3+
Tags: meta, sprint2016
4+
Authors: pfctdayelise
5+
Summary: Launch of the pytest blog
6+
7+
Welcome to the launch of the official pytest blog!
8+
9+
Pytest has grown from strength to strength over the past few years, and it's overdue that we have an official blog for releases and other project announcements.
10+
11+
There is now a [pytest planet](http://planet.pytest.org/), which is a blog aggregator. If you have your own blog and can tag some entries as 'pytest', we invite you to [add your RSS feed there](https://github.com/fschulze/planet.pytest.org/blob/master/feeds.cfg).
12+
13+
There is also the [pytest tricks](http://hackebrot.github.io/pytest-tricks/) blog, so if you have a small demonstration of how to use a cool pytest feature, that might be the place for it. If you don't have your own blog, you can submit a guest post to either pytest-tricks or the main pytest blog.
14+
15+
It might be obvious that we're not the most gifted web designers, so we definitely welcome improvements at [the Github repository](https://github.com/pytest-dev/blog.pytest.org). This blog was first talked about at EuroPython 2015, so 11 months later, we thought it was more important to get it out there than to perfect the theme. Thanks to Javier Gonel and Andreas Pelme for their work to get it started.
16+
17+
In upcoming months there are lots of things happening, with wrapping up the pytest development sprint and preparing for pytest 3.0. Stay tuned!

pelicanconf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
EMAIL = 'pytest-dev@python.org'
1010

1111
PATH = 'content'
12-
STATIC_PATHS = ('extra/favicon.ico', 'CNAME')
12+
STATIC_PATHS = ('extra/favicon.ico', 'CNAME', 'posts')
1313
EXTRA_PATH_METADATA = {
1414
'extra/favicon.ico': {'path': 'favicon.ico'},
1515
'CNAME': {'path': 'CNAME'},
@@ -35,6 +35,7 @@
3535
PLUGIN_PATHS = ['pelican-plugins']
3636
PLUGINS = ['assets', 'sitemap']
3737

38+
ARTICLE_PATHS = ['posts']
3839
ARTICLE_URL = '{date:%Y}/{slug}/'
3940
ARTICLE_SAVE_AS = '{date:%Y}/{slug}/index.html'
4041
PAGE_URL = '{slug}/'
@@ -45,5 +46,6 @@
4546

4647

4748
RESOURCE_LINKS = [
48-
('http://pytest.org/latest/', 'Documentation'),
49+
('http://planet.pytest.org', 'Planet Pytest'),
50+
('http://pytest.org/latest/', 'pytest.org'),
4951
]

theme/static/css/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@
1616
margin-left: auto;
1717
margin-right: auto;
1818
}
19+
20+
abbr {
21+
color: gray;
22+
font-size: 80%;
23+
}

theme/templates/archives.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ <h2>Archives:</h2>
66
<table class="archives">
77
{% for article in dates %}
88
<tr>
9-
<td>{{ article.locale_date }}</td>
10-
<td><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></td>
9+
<td class="archivedate">{{ article.locale_date }}</td>
10+
<td class="archivetitle"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></td>
1111
</tr>
1212
{% endfor %}
1313
</table>

theme/templates/base.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,24 @@
1919
<div class="row">
2020
<div class="col-md-offset-1 col-md-3">
2121
<p class="logo">
22-
<a href="{{ SITEURL }}"><img src="{{ SITEURL }}/theme/img/pytest1.png"></a>
22+
<a href="{{ SITEURL }}/"><img src="{{ SITEURL }}/theme/img/pytest1.png"></a>
2323
</p>
24-
<h3>About pytest</h3>
24+
<h3>about</h3>
2525
<p>
2626
pytest is a mature full-featured Python testing tool that helps
27-
you write better programs.
27+
you write better programs.
2828
</p>
2929

30-
<h3>Categories</h3>
31-
<ul>
32-
{% for cat, null in categories %}
33-
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
34-
{% endfor %}
35-
</ul>
36-
37-
<h3>Resources</h3>
30+
<h3>blog resources</h3>
3831
<ul>
32+
<li><a href="{{ SITEURL }}/">Front page</a></live>
33+
<li><a href="{{ SITEURL }}/tags.html">Tags</a></li>
3934
<li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
4035
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS</a> </li>
36+
<li><a href="https://github.com/pytest-dev/blog.pytest.org">On Github</a>
37+
</ul>
38+
<h3>pytest resources</h3>
39+
<ul>
4140
{% for url, title in RESOURCE_LINKS %}
4241
<li><a href="{{ url }}">{{ title }}</a></li>
4342
{% endfor %}

0 commit comments

Comments
 (0)