Merge remote-tracking branch 'origin/master' into related_posts-plugin-support
This commit is contained in:
commit
98159f07d0
20 changed files with 221 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "flex",
|
"name": "flex",
|
||||||
"version": "1.1",
|
"version": "1.2",
|
||||||
"description": "A minimalist Pelican theme",
|
"description": "A minimalist Pelican theme",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -143,6 +143,7 @@ main {
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
margin: 4% 8% 2% 8%;
|
margin: 4% 8% 2% 8%;
|
||||||
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.social-share {
|
.social-share {
|
|
@ -2,36 +2,44 @@
|
||||||
<html lang="{{ DEFAULT_LANG }}">
|
<html lang="{{ DEFAULT_LANG }}">
|
||||||
<head>
|
<head>
|
||||||
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
{% if USE_LESS %}
|
{% if USE_LESS %}
|
||||||
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.less">
|
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.less">
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.min.css">
|
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments.min.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css">
|
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/pygments.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/font-awesome.min.css">
|
||||||
|
|
||||||
{% if CUSTOM_CSS %}
|
{% if CUSTOM_CSS %}
|
||||||
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
|
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if FEED_ALL_ATOM %}
|
{% if FEED_ALL_ATOM %}
|
||||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom">
|
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if FEED_ALL_RSS %}
|
{% if FEED_ALL_RSS %}
|
||||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS">
|
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if FAVICON %}
|
{% if FAVICON %}
|
||||||
<link rel="shortcut icon" href="{{ FAVICON }}" type="image/x-icon">
|
<link rel="shortcut icon" href="{{ FAVICON }}" type="image/x-icon">
|
||||||
<link rel="icon" href="{{ FAVICON }}" type="image/x-icon">
|
<link rel="icon" href="{{ FAVICON }}" type="image/x-icon">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="robots" content="{{ ROBOTS }}" />
|
<meta name="robots" content="{{ ROBOTS }}" />
|
||||||
|
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
<meta name="author" content="{{ AUTHOR }}" />
|
<meta name="author" content="{{ AUTHOR }}" />
|
||||||
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
||||||
{% include "partial/og.html" %}
|
{% include "partial/og.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
|
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
<div>
|
<div>
|
||||||
{% if summarise or article.metadata['summary'] or article.metadata['summarize'] %}
|
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
|
||||||
{{ article.summary }}
|
{{ article.summary }}
|
||||||
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">Continue reading</a>
|
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">Continue reading</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
8
tests/content/dev/some-article-10.md
Normal file
8
tests/content/dev/some-article-10.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Title: Some Article 10
|
||||||
|
Date: 2016-01-01 12:00
|
||||||
|
Modified: 2016-01-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-10
|
||||||
|
Summary: I'm a summary
|
||||||
|
|
||||||
|
This is an article with category dev.
|
15
tests/content/dev/some-article-2.md
Normal file
15
tests/content/dev/some-article-2.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
Title: Some Article 2
|
||||||
|
Date: 2016-01-01 12:00
|
||||||
|
Modified: 2016-01-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-2
|
||||||
|
|
||||||
|
This is an article with category dev.
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc hendrerit porttitor ultricies. Ut convallis, dui sed ultricies luctus, ligula urna varius magna, ut interdum odio ex commodo risus. Etiam pretium ipsum ac felis elementum, nec egestas lorem finibus. Nulla sed accumsan risus, a consequat libero. Duis libero nisi, convallis pretium aliquet tincidunt, congue id massa. Mauris ornare efficitur arcu vel accumsan. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce volutpat enim sed erat pretium laoreet. Donec tellus diam, eleifend a metus sed, scelerisque finibus erat. Aliquam quis volutpat ex. Etiam eu malesuada nisl. Donec rutrum finibus justo, eu lobortis dui molestie aliquam. Quisque accumsan vitae tortor eu fermentum. Pellentesque consequat quam ac odio euismod, eget imperdiet mi condimentum. Nulla ullamcorper facilisis enim ac sagittis. Nulla placerat nibh orci.
|
||||||
|
|
||||||
|
Suspendisse tincidunt ullamcorper est vel scelerisque. Mauris vulputate velit eros, non blandit enim euismod ac. Donec urna dui, fringilla id accumsan vitae, egestas id dolor. Nunc suscipit sit amet turpis eget viverra. Quisque non elementum arcu, non viverra nisl. Nullam accumsan tempus suscipit. Nullam eget aliquet arcu, ac maximus massa. Suspendisse dictum neque a dignissim mollis. Fusce laoreet maximus tempor. Etiam a luctus leo. Donec dictum massa et volutpat convallis. Nullam in mauris vel augue aliquam malesuada. In nec est libero. Sed velit lectus, gravida sed ligula id, condimentum ultrices ex.
|
||||||
|
|
||||||
|
Pellentesque malesuada nibh eu turpis imperdiet, a placerat libero efficitur. Donec sit amet nisl dictum, semper dolor vitae, cursus neque. Aenean aliquet felis ipsum, et ultrices urna pretium ut. Etiam posuere, quam in interdum bibendum, nisl enim semper lectus, quis sodales quam nunc vel quam. Praesent lacinia facilisis nunc ut dictum. Vestibulum lacus dui, ullamcorper sed lectus sit amet, hendrerit ultrices libero. Integer facilisis blandit suscipit. Duis interdum vel velit vestibulum molestie. Proin iaculis erat in tincidunt tempor. Nulla imperdiet hendrerit eros, ut congue nunc mattis id. Duis sit amet arcu vel nibh fermentum efficitur. Nunc posuere felis in magna convallis malesuada. Nullam tincidunt sed leo et facilisis. Vivamus vel metus vitae massa feugiat luctus in eget diam. Pellentesque euismod cursus ex.
|
||||||
|
|
||||||
|
Curabitur rutrum iaculis ante, quis rutrum lacus feugiat id. Sed pellentesque, leo sit amet maximus porttitor, mauris nisl tincidunt mi, ut vestibulum diam urna a libero. Aliquam fermentum orci ac lacus laoreet fringilla eu eu dui. Phasellus sagittis ullamcorper sodales. Nunc dui tortor, consectetur in mauris et, vulputate finibus mi. Aenean nec justo non ipsum lobortis tristique vel eget sapien. Nunc porta quam dolor, sed ultricies est vulputate porttitor. In varius, eros aliquam pulvinar tincidunt, turpis justo pretium ligula, quis vulputate justo enim ac nulla. Vestibulum dapibus dapibus urna eu ultricies. Nulla sed elit et est dapibus consectetur sit amet sit amet ex. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam ultrices bibendum nisi at mollis. Vivamus rutrum, nisl vel efficitur hendrerit, lorem urna pulvinar augue, ac feugiat ligula nunc in sapien. Aliquam interdum tempor congue.
|
7
tests/content/dev/some-article-3.md
Normal file
7
tests/content/dev/some-article-3.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 3
|
||||||
|
Date: 2016-01-01 12:00
|
||||||
|
Modified: 2016-01-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-3
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-4.md
Normal file
7
tests/content/dev/some-article-4.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 4
|
||||||
|
Date: 2016-01-01 12:00
|
||||||
|
Modified: 2016-01-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-4
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-5.md
Normal file
7
tests/content/dev/some-article-5.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 5
|
||||||
|
Date: 2016-03-01 12:00
|
||||||
|
Modified: 2016-03-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-5
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-6.md
Normal file
7
tests/content/dev/some-article-6.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 6
|
||||||
|
Date: 2016-03-01 12:00
|
||||||
|
Modified: 2016-03-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-6
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-7.md
Normal file
7
tests/content/dev/some-article-7.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 7
|
||||||
|
Date: 2016-04-01 12:00
|
||||||
|
Modified: 2016-04-01 12:00
|
||||||
|
Tags: article, pelican
|
||||||
|
Slug: some-article-7
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-8.md
Normal file
7
tests/content/dev/some-article-8.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 8
|
||||||
|
Date: 2016-01-01 12:00
|
||||||
|
Modified: 2016-01-01 12:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-8
|
||||||
|
|
||||||
|
This is an article with category dev.
|
7
tests/content/dev/some-article-9.md
Normal file
7
tests/content/dev/some-article-9.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Some Article 9
|
||||||
|
Date: 2016-01-01 08:00
|
||||||
|
Modified: 2016-01-01 08:00
|
||||||
|
Tags: article, pelican, python
|
||||||
|
Slug: some-article-9
|
||||||
|
|
||||||
|
This is an article with category dev.
|
|
@ -4,4 +4,14 @@ Modified: 2016-01-01 12:00
|
||||||
Tags: article, pelican, python
|
Tags: article, pelican, python
|
||||||
Slug: some-article
|
Slug: some-article
|
||||||
|
|
||||||
This is an article with category dev.
|
This is an article with category dev.
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer auctor condimentum libero ac eleifend. Aenean porta luctus turpis quis cursus. Quisque suscipit tempus dignissim. Donec quis massa sed sapien porttitor rutrum et et est. Suspendisse potenti. Nam faucibus lacus lacinia, tincidunt risus fermentum, pellentesque lectus. Mauris et dui elit.
|
||||||
|
|
||||||
|
Curabitur id lacus et turpis finibus sagittis. Donec auctor mauris et diam mattis dictum. Vestibulum massa nulla, interdum at pretium id, vestibulum vitae lacus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec pharetra in lorem eu aliquam. Proin id viverra ante. Phasellus maximus magna mollis, pulvinar arcu posuere, lobortis tortor. Cras ac massa quis nibh maximus auctor. In nec justo porta, rutrum diam vitae, vulputate diam. Suspendisse facilisis mauris et odio congue rhoncus. Quisque vitae quam eros. Donec id auctor odio. Sed auctor quam sed magna pellentesque, id dapibus metus maximus. Suspendisse potenti.
|
||||||
|
|
||||||
|
Phasellus commodo diam ut felis rhoncus ultrices. Morbi vel lectus vel mauris rutrum fermentum at in eros. Vivamus eleifend tincidunt massa sit amet elementum. In in tempor est. Praesent mattis sapien in lacinia euismod. Nulla et convallis quam. Donec pellentesque rutrum neque at efficitur. In fringilla nunc nec commodo sollicitudin. Fusce vel tortor nec justo dignissim posuere. Praesent et leo ac leo pulvinar fringilla vulputate porta nibh.
|
||||||
|
|
||||||
|
Morbi justo risus, lobortis id volutpat nec, lobortis ac elit. Vestibulum volutpat condimentum metus, at feugiat risus egestas id. Nunc facilisis at augue at ultricies. Sed et turpis in turpis rutrum posuere ac vel massa. Maecenas tortor ante, tristique sed velit non, porta fringilla nunc. Aliquam sit amet est vitae tortor feugiat sollicitudin. In vestibulum vitae risus eget placerat. Praesent a enim viverra, efficitur dui in, feugiat lectus.
|
||||||
|
|
||||||
|
Phasellus eu eleifend lacus, ut ultrices diam. Aliquam sed eros aliquet, viverra dolor sed, congue sapien. Aliquam malesuada at purus et dictum. Etiam tincidunt egestas leo, id rhoncus ex maximus non. Quisque interdum diam vitae turpis dapibus vulputate. Sed at tristique lacus, non pellentesque nibh. Vestibulum tempus ultrices tristique. Sed fermentum ac enim quis gravida. Mauris pulvinar arcu orci. Pellentesque feugiat leo nibh, eu tempus eros hendrerit egestas. Nulla nunc tellus, commodo eu tincidunt accumsan, consequat porta mi. Mauris vitae varius metus, eu pretium eros. Praesent lobortis nisi a nunc elementum semper.
|
7
tests/content/stuff/some-article.md
Normal file
7
tests/content/stuff/some-article.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Title: Stuff Article
|
||||||
|
Date: 2016-02-01 12:00
|
||||||
|
Modified: 2016-02-01 12:00
|
||||||
|
Tags: article, world
|
||||||
|
Slug: stuff-article
|
||||||
|
|
||||||
|
This is an article with category stuff.
|
103
tests/develop_server.sh
Executable file
103
tests/develop_server.sh
Executable file
|
@ -0,0 +1,103 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
##
|
||||||
|
# This section should match your Makefile
|
||||||
|
##
|
||||||
|
PY=${PY:-python}
|
||||||
|
PELICAN=${PELICAN:-pelican}
|
||||||
|
PELICANOPTS=
|
||||||
|
|
||||||
|
BASEDIR=$(pwd)
|
||||||
|
INPUTDIR=$BASEDIR/content
|
||||||
|
OUTPUTDIR=$BASEDIR/output
|
||||||
|
CONFFILE=$BASEDIR/pelicanconf.py
|
||||||
|
|
||||||
|
###
|
||||||
|
# Don't change stuff below here unless you are sure
|
||||||
|
###
|
||||||
|
|
||||||
|
SRV_PID=$BASEDIR/srv.pid
|
||||||
|
PELICAN_PID=$BASEDIR/pelican.pid
|
||||||
|
|
||||||
|
function usage(){
|
||||||
|
echo "usage: $0 (stop) (start) (restart) [port]"
|
||||||
|
echo "This starts Pelican in debug and reload mode and then launches"
|
||||||
|
echo "an HTTP server to help site development. It doesn't read"
|
||||||
|
echo "your Pelican settings, so if you edit any paths in your Makefile"
|
||||||
|
echo "you will need to edit your settings as well."
|
||||||
|
exit 3
|
||||||
|
}
|
||||||
|
|
||||||
|
function alive() {
|
||||||
|
kill -0 $1 >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
function shut_down(){
|
||||||
|
PID=$(cat $SRV_PID)
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
if alive $PID; then
|
||||||
|
echo "Stopping HTTP server"
|
||||||
|
kill $PID
|
||||||
|
else
|
||||||
|
echo "Stale PID, deleting"
|
||||||
|
fi
|
||||||
|
rm $SRV_PID
|
||||||
|
else
|
||||||
|
echo "HTTP server PIDFile not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PID=$(cat $PELICAN_PID)
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
if alive $PID; then
|
||||||
|
echo "Killing Pelican"
|
||||||
|
kill $PID
|
||||||
|
else
|
||||||
|
echo "Stale PID, deleting"
|
||||||
|
fi
|
||||||
|
rm $PELICAN_PID
|
||||||
|
else
|
||||||
|
echo "Pelican PIDFile not found"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_up(){
|
||||||
|
local port=$1
|
||||||
|
echo "Starting up Pelican and HTTP server"
|
||||||
|
shift
|
||||||
|
$PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS &
|
||||||
|
pelican_pid=$!
|
||||||
|
echo $pelican_pid > $PELICAN_PID
|
||||||
|
cd $OUTPUTDIR
|
||||||
|
$PY -m pelican.server $port &
|
||||||
|
srv_pid=$!
|
||||||
|
echo $srv_pid > $SRV_PID
|
||||||
|
cd $BASEDIR
|
||||||
|
sleep 1
|
||||||
|
if ! alive $pelican_pid ; then
|
||||||
|
echo "Pelican didn't start. Is the Pelican package installed?"
|
||||||
|
return 1
|
||||||
|
elif ! alive $srv_pid ; then
|
||||||
|
echo "The HTTP server didn't start. Is there another service using port" $port "?"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo 'Pelican and HTTP server processes now running in background.'
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# MAIN
|
||||||
|
###
|
||||||
|
[[ ($# -eq 0) || ($# -gt 2) ]] && usage
|
||||||
|
port=''
|
||||||
|
[[ $# -eq 2 ]] && port=$2
|
||||||
|
|
||||||
|
if [[ $1 == "stop" ]]; then
|
||||||
|
shut_down
|
||||||
|
elif [[ $1 == "restart" ]]; then
|
||||||
|
shut_down
|
||||||
|
start_up $port
|
||||||
|
elif [[ $1 == "start" ]]; then
|
||||||
|
if ! start_up $port; then
|
||||||
|
shut_down
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
usage
|
||||||
|
fi
|
|
@ -62,8 +62,11 @@ CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
|
||||||
|
|
||||||
DELETE_OUTPUT_DIRECTORY = False
|
DELETE_OUTPUT_DIRECTORY = False
|
||||||
|
|
||||||
|
DEFAULT_PAGINATION = 5
|
||||||
|
SUMMARY_MAX_LENGTH = 150
|
||||||
|
|
||||||
DISQUS_SITENAME = "test-test"
|
DISQUS_SITENAME = "test-test"
|
||||||
GOOGLE_ANALYTICS = "UA-XXXXXX-X"
|
GOOGLE_ANALYTICS = "UA-XXXXXX-X"
|
||||||
ADD_THIS_ID = 'ra-XX3242XX'
|
ADD_THIS_ID = 'ra-XX3242XX'
|
||||||
|
|
||||||
USE_LESS = False
|
USE_LESS = True
|
||||||
|
|
Loading…
Reference in a new issue