/ ‘Makefile’
+ ‘publishconf-localhost.py’
This commit is contained in:
parent
459346564b
commit
8915f89049
2 changed files with 39 additions and 1 deletions
15
Makefile
15
Makefile
|
|
@ -7,6 +7,8 @@ INPUTDIR=$(BASEDIR)/content
|
|||
OUTPUTDIR=$(CURDIR)/public
|
||||
CONFFILE=$(BASEDIR)/pelicanconf.py
|
||||
PUBLISHCONF=$(BASEDIR)/publishconf.py
|
||||
CONFFILELOCAL=$(BASEDIR)/pelicanconf-localhost.py
|
||||
PUBLISHCONFLOCAL=$(BASEDIR)/publishconf-localhost.py
|
||||
|
||||
|
||||
DEBUG ?= 0
|
||||
|
|
@ -72,4 +74,15 @@ publish:
|
|||
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
|
||||
|
||||
|
||||
.PHONY: html help clean regenerate serve serve-global devserver publish
|
||||
devserver-local:
|
||||
ifdef PORT
|
||||
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILELOCAL) $(PELICANOPTS) -p $(PORT)
|
||||
else
|
||||
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILELOCAL) $(PELICANOPTS)
|
||||
endif
|
||||
|
||||
publish-local:
|
||||
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONFLOCAL) $(PELICANOPTS)
|
||||
|
||||
|
||||
.PHONY: html help clean regenerate serve serve-global devserver publish devserver-local publish-local
|
||||
|
|
|
|||
25
publishconf-localhost.py
Normal file
25
publishconf-localhost.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*- #
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# This file is only used if you use `make publish` or
|
||||
# explicitly specify it as your config file.
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.curdir)
|
||||
from pelicanconf import *
|
||||
|
||||
SITEURL = '/site/ci/losttr'
|
||||
#SITEURL = '/'
|
||||
RELATIVE_URLS = False
|
||||
|
||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
# Following items are often useful when publishing
|
||||
|
||||
#DISQUS_SITENAME = ""
|
||||
#GOOGLE_ANALYTICS = ""
|
||||
Loading…
Reference in a new issue