fix circular import
This commit is contained in:
parent
3488c6f598
commit
eb1aac20c6
|
@ -0,0 +1,14 @@
|
||||||
|
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file
|
||||||
|
|
||||||
|
OPEN_BROWSER_ON_SERVE = True
|
||||||
|
|
||||||
|
DEV_SETTINGS_FILE_BASE = 'pelicanconf.py'
|
||||||
|
PUB_SETTINGS_FILE_BASE = 'publishconf.py'
|
||||||
|
|
||||||
|
SETTINGS = {}
|
||||||
|
|
||||||
|
SETTINGS.update(DEFAULT_CONFIG)
|
||||||
|
|
||||||
|
LOCAL_SETTINGS = get_settings_from_file(DEV_SETTINGS_FILE_BASE)
|
||||||
|
|
||||||
|
SETTINGS.update(LOCAL_SETTINGS)
|
|
@ -8,21 +8,13 @@ import webbrowser
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from livereload import Server
|
from livereload import Server
|
||||||
|
from pelican import main as pelican_main
|
||||||
|
from site_tools import SETTINGS, DEV_SETTINGS_FILE_BASE, PUB_SETTINGS_FILE_BASE
|
||||||
from site_tools.content_manager import create
|
from site_tools.content_manager import create
|
||||||
|
|
||||||
from pelican import main as pelican_main
|
|
||||||
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file
|
|
||||||
|
|
||||||
OPEN_BROWSER_ON_SERVE = True
|
|
||||||
SETTINGS_FILE_BASE = 'pelicanconf.py'
|
|
||||||
SETTINGS = {}
|
|
||||||
SETTINGS.update(DEFAULT_CONFIG)
|
|
||||||
LOCAL_SETTINGS = get_settings_from_file(SETTINGS_FILE_BASE)
|
|
||||||
SETTINGS.update(LOCAL_SETTINGS)
|
|
||||||
|
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
'settings_base': SETTINGS_FILE_BASE,
|
'settings_base': DEV_SETTINGS_FILE_BASE,
|
||||||
'settings_publish': 'publishconf.py',
|
'settings_publish': PUB_SETTINGS_FILE_BASE,
|
||||||
# Output path. Can be absolute or relative to tasks.py. Default: 'output'
|
# Output path. Can be absolute or relative to tasks.py. Default: 'output'
|
||||||
'deploy_path': SETTINGS['OUTPUT_PATH'],
|
'deploy_path': SETTINGS['OUTPUT_PATH'],
|
||||||
# Remote server configuration
|
# Remote server configuration
|
||||||
|
@ -104,7 +96,7 @@ def serve() -> None:
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
def publish():
|
def publish() -> None:
|
||||||
clean()
|
clean()
|
||||||
pelican_run(publish=True)
|
pelican_run(publish=True)
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
# dm/some-post.md
|
|
||||||
|
|
||||||
title: some post
|
|
||||||
author: evilchili
|
|
||||||
tags: ContentType.post
|
|
||||||
date: 2022-08-02 17:59:59.899095
|
|
||||||
status: draft
|
|
||||||
---
|
|
|
@ -1,50 +0,0 @@
|
||||||
---
|
|
||||||
# regions/region-name.md
|
|
||||||
|
|
||||||
title: region name
|
|
||||||
author: evilchili
|
|
||||||
tags: ContentType.region
|
|
||||||
date: 2022-08-02 17:57:41.572598
|
|
||||||
category: regions
|
|
||||||
template: region
|
|
||||||
region:
|
|
||||||
name: region name
|
|
||||||
size: 10
|
|
||||||
terrain: difficult
|
|
||||||
shelter: none
|
|
||||||
water_source: none
|
|
||||||
travel:
|
|
||||||
dc: 10
|
|
||||||
critical_success:
|
|
||||||
critical_fail:
|
|
||||||
forage:
|
|
||||||
dc: 10
|
|
||||||
critical_success:
|
|
||||||
critical_fail:
|
|
||||||
track:
|
|
||||||
dc: 10
|
|
||||||
critical_success:
|
|
||||||
critical_fail:
|
|
||||||
evade:
|
|
||||||
dc: 10
|
|
||||||
critical_success:
|
|
||||||
critical_fail:
|
|
||||||
survey:
|
|
||||||
dc: 10
|
|
||||||
critical_success:
|
|
||||||
critical_fail:
|
|
||||||
encounter_chance: 5
|
|
||||||
special:
|
|
||||||
weather:
|
|
||||||
d1:
|
|
||||||
d2:
|
|
||||||
d3:
|
|
||||||
d4:
|
|
||||||
d5:
|
|
||||||
d6:
|
|
||||||
d7:
|
|
||||||
d8:
|
|
||||||
status: draft
|
|
||||||
---
|
|
||||||
|
|
||||||
Region description goes here.
|
|
|
@ -3,7 +3,7 @@ from jinja2 import Environment, FileSystemLoader
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pelican.writers import Writer
|
from pelican.writers import Writer
|
||||||
from pelican.utils import slugify, sanitised_join
|
from pelican.utils import slugify, sanitised_join
|
||||||
from site_tools.tasks import SETTINGS
|
from site_tools import SETTINGS
|
||||||
|
|
||||||
|
|
||||||
def create(content_type: str, title: str, template_dir: str,
|
def create(content_type: str, title: str, template_dir: str,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user