Use /docs for tests as well drop old Python versions.
This commit is contained in:
Alexandre Vicenzi 2019-10-19 22:01:40 +02:00
parent 3760c9ba13
commit f77b28c726
16 changed files with 2 additions and 299 deletions

View file

@ -1,13 +1,8 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
install:
- pip install -U pelican markdown
before_script:
- git clone https://github.com/getpelican/pelican-plugins plugins
script: pelican -s tests/pelicanconf.py
- pip install -r docs/requirements.txt
script: pelican -s docs/pelicanconf.py
notifications:
email: false

View file

@ -1,8 +0,0 @@
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.

View file

@ -1,15 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,17 +0,0 @@
Title: Some Article
Date: 2016-01-01 12:00
Modified: 2016-01-01 12:00
Tags: article, pelican, python
Slug: some-article
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.

View file

@ -1,5 +0,0 @@
Title: About
Date: 2016-01-01 12:00
Modified: 2016-01-01 12:00
This is an about page.

View file

@ -1,8 +0,0 @@
Title: Hidden
Date: 2016-01-01 12:00
Modified: 2016-01-01 12:00
Status: hidden
This is a hidden page.
It will have `noindex, nofollow` as the value of the `robots` `<meta>` tag.

View file

@ -1,7 +0,0 @@
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.

View file

@ -1,103 +0,0 @@
#!/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

View file

@ -1,80 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# Optional 'neighbors' plugin adds previous/next post buttons to articles.
PLUGIN_PATHS = ['../plugins']
PLUGINS = ['i18n_subsites', 'neighbors']
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n',
'jinja2.ext.autoescape',
'jinja2.ext.with_']}
AUTHOR = u'Test'
SITEURL = u'http://localhost:8000'
SITENAME = u"Test Blog"
SITETITLE = AUTHOR
SITESUBTITLE = u'Test'
SITEDESCRIPTION = u'%s\'s Thoughts and Writings' % AUTHOR
SITELOGO = u'https://www.example.com/img/profile.png'
FAVICON = SITEURL + '/images/favicon.ico'
BROWSER_COLOR = '#333'
ROBOTS = u'index, follow'
THEME = u'../'
PATH = u'content'
TIMEZONE = u'America/Sao_Paulo'
DEFAULT_LANG = u'en'
OG_LOCALE = u'en_US'
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
USE_FOLDER_AS_CATEGORY = True
MAIN_MENU = True
LINKS = (('Portfolio', '//alexandrevicenzi.com'),)
SOCIAL = (('linkedin', 'https://br.linkedin.com/in/test'),
('github', 'https://github.com/test'),
('google', 'https://google.com/+Test'),
('rss', '//www.example.com/feeds/all.atom.xml'))
MENUITEMS = (('Archives', '/archives.html'),
('Categories', '/categories.html'),
('Tags', '/tags.html'),)
CC_LICENSE = {
'name': 'Creative Commons Attribution-ShareAlike',
'version': '4.0',
'slug': 'by-sa'
}
COPYRIGHT_YEAR = 2016
STATUSCAKE = {
'trackid': 'test-test',
'days': 7,
'rumid': 1234,
}
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
DELETE_OUTPUT_DIRECTORY = False
DEFAULT_PAGINATION = 5
SUMMARY_MAX_LENGTH = 150
DISQUS_SITENAME = "test-test"
GOOGLE_ANALYTICS = "UA-XXXXXX-X"
ADD_THIS_ID = 'ra-XX3242XX'
USE_LESS = True