-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
89 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
import nox | ||
|
||
nox.options.reuse_existing_virtualenvs = True | ||
nox.options.sessions = ['build'] # default session | ||
nox.options.sessions = ["build"] # default session | ||
nox.options.stop_on_first_error = True | ||
|
||
BUILD_CFG = 'pelicanconf.py' | ||
PUBLISH_CFG = 'publishconf.py' | ||
BUILD_CFG = "pelicanconf.py" | ||
PUBLISH_CFG = "publishconf.py" | ||
|
||
|
||
@nox.session | ||
def build(session): | ||
""" Build local version of site """ | ||
session.install('-r', 'requirements.txt') | ||
session.run('pelican', '-s', BUILD_CFG, *session.posargs) | ||
"""Build local version of site""" | ||
session.install("-r", "requirements.txt") | ||
session.run("pelican", "-s", BUILD_CFG, *session.posargs) | ||
|
||
|
||
@nox.session | ||
def rebuild(session): | ||
""" `build` with the delete switch """ | ||
session.install('-r', 'requirements.txt') | ||
session.run('pelican', '-d', '-s', BUILD_CFG, *session.posargs) | ||
"""`build` with the delete switch""" | ||
session.install("-r", "requirements.txt") | ||
session.run("pelican", "-d", "-s", BUILD_CFG, *session.posargs) | ||
|
||
|
||
@nox.session | ||
def serve(session): | ||
""" Build the site and then serve it locally, watching for changes """ | ||
session.install('-r', 'requirements.txt') | ||
"""Build the site and then serve it locally, watching for changes""" | ||
session.install("-r", "requirements.txt") | ||
# It appears that -r causes a build implicitly | ||
#session.run('pelican', '-s', BUILD_CFG, *session.posargs) | ||
session.run('pelican', '-lr', '-s', BUILD_CFG) | ||
# session.run('pelican', '-s', BUILD_CFG, *session.posargs) | ||
session.run("pelican", "-lr", "-s", BUILD_CFG) | ||
|
||
|
||
@nox.session | ||
def publish(session): | ||
""" Build published version of site """ | ||
session.install('-r', 'requirements.txt') | ||
session.run('pelican', '-s', PUBLISH_CFG, *session.posargs) | ||
"""Build published version of site""" | ||
session.install("-r", "requirements.txt") | ||
session.run("pelican", "-s", PUBLISH_CFG, *session.posargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.append(os.curdir) | ||
from pelicanconf import * | ||
|
||
# Publication settings | ||
SITEURL = 'https://jwodder.github.io/kbits' | ||
SITEURL = "https://jwodder.github.io/kbits" | ||
RELATIVE_URLS = False | ||
|
||
FEED_DOMAIN = SITEURL | ||
|
||
FEED_ALL_ATOM = 'feeds/posts.atom.xml' | ||
CATEGORY_FEED_ATOM = 'feeds/category.{slug}.atom.xml' | ||
TAG_FEED_ATOM = 'feeds/tag.{slug}.atom.xml' | ||
FEED_ALL_ATOM = "feeds/posts.atom.xml" | ||
CATEGORY_FEED_ATOM = "feeds/category.{slug}.atom.xml" | ||
TAG_FEED_ATOM = "feeds/tag.{slug}.atom.xml" | ||
AUTHOR_FEED_ATOM = None | ||
|
||
FEED_ALL_RSS = 'feeds/posts.rss' | ||
CATEGORY_FEED_RSS = 'feeds/category.{slug}.rss' | ||
TAG_FEED_RSS = 'feeds/tag.{slug}.rss' | ||
FEED_ALL_RSS = "feeds/posts.rss" | ||
CATEGORY_FEED_RSS = "feeds/category.{slug}.rss" | ||
TAG_FEED_RSS = "feeds/tag.{slug}.rss" | ||
AUTHOR_FEED_RSS = None | ||
|
||
DELETE_OUTPUT_DIRECTORY = True |