mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Moved templates in pelican_quistart.py to a directory
This commit is contained in:
parent
8a842c0de7
commit
7c53cc8955
3 changed files with 105 additions and 92 deletions
58
pelican/tools/templates/Makefile.in
Normal file
58
pelican/tools/templates/Makefile.in
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
PELICAN=$pelican
|
||||
PELICANOPTS=$pelicanopts
|
||||
|
||||
BASEDIR=$$(PWD)
|
||||
INPUTDIR=$$(BASEDIR)/src
|
||||
OUTPUTDIR=$$(BASEDIR)/output
|
||||
CONFFILE=$$(BASEDIR)/pelican.conf.py
|
||||
|
||||
FTP_HOST=$ftp_host
|
||||
FTP_USER=$ftp_user
|
||||
FTP_TARGET_DIR=$ftp_target_dir
|
||||
|
||||
SSH_HOST=$ssh_host
|
||||
SSH_USER=$ssh_user
|
||||
SSH_TARGET_DIR=$ssh_target_dir
|
||||
|
||||
DROPBOX_DIR=$dropbox_dir
|
||||
|
||||
help:
|
||||
@echo 'Makefile for a pelican Web site '
|
||||
@echo ' '
|
||||
@echo 'Usage: '
|
||||
@echo ' make html (re)generate the web site '
|
||||
@echo ' make clean remove the generated files '
|
||||
@echo ' ftp_upload upload the web site using FTP '
|
||||
@echo ' ssh_upload upload the web site using SSH '
|
||||
@echo ' dropbox_upload upload the web site using Dropbox '
|
||||
@echo ' rsync_upload upload the web site using rsync/ssh'
|
||||
@echo ' '
|
||||
|
||||
|
||||
html: clean $$(OUTPUTDIR)/index.html
|
||||
@echo 'Done'
|
||||
|
||||
$$(OUTPUTDIR)/%.html:
|
||||
$$(PELICAN) $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS)
|
||||
|
||||
clean:
|
||||
rm -fr $$(OUTPUTDIR)
|
||||
mkdir $$(OUTPUTDIR)
|
||||
|
||||
dropbox_upload: $$(OUTPUTDIR)/index.html
|
||||
cp -r $$(OUTPUTDIR)/* $$(DROPBOX_DIR)
|
||||
|
||||
ssh_upload: $$(OUTPUTDIR)/index.html
|
||||
scp -r $$(OUTPUTDIR)/* $$(SSH_USER)@$$(SSH_HOST):$$(SSH_TARGET_DIR)
|
||||
|
||||
rsync_upload: $$(OUTPUTDIR)/index.html
|
||||
rsync -e ssh -P -rvz --delete $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
|
||||
|
||||
ftp_upload: $$(OUTPUTDIR)/index.html
|
||||
lftp ftp://$$(FTP_USER)@$$(FTP_HOST) -e "mirror -R $$(OUTPUTDIR) $$(FTP_TARGET_DIR) ; quit"
|
||||
|
||||
github: $$(OUTPUTDIR)/index.html
|
||||
ghp-import $$(OUTPUTDIR)
|
||||
git push origin gh-pages
|
||||
|
||||
.PHONY: html help clean ftp_upload ssh_upload rsync_upload dropbox_upload github
|
||||
25
pelican/tools/templates/pelican.conf.py.in
Normal file
25
pelican/tools/templates/pelican.conf.py.in
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*- #
|
||||
|
||||
AUTHOR = u"$author"
|
||||
SITENAME = u"$sitename"
|
||||
SITEURL = '/'
|
||||
|
||||
TIMEZONE = 'Europe/Paris'
|
||||
|
||||
DEFAULT_LANG='$lang'
|
||||
|
||||
# Blogroll
|
||||
LINKS = (
|
||||
('Pelican', 'http://docs.notmyidea.org/alexis/pelican/'),
|
||||
('Python.org', 'http://python.org'),
|
||||
('Jinja2', 'http://jinja.pocoo.org'),
|
||||
('You can modify those links in your config file', '#')
|
||||
)
|
||||
|
||||
# Social widget
|
||||
SOCIAL = (
|
||||
('You can add links in your config file', '#'),
|
||||
)
|
||||
|
||||
DEFAULT_PAGINATION = $default_pagination
|
||||
Loading…
Add table
Add a link
Reference in a new issue