Compare commits
5 Commits
2396106339
...
cb275ad95d
Author | SHA1 | Date | |
---|---|---|---|
cb275ad95d | |||
1c371e8c1f | |||
c06db053ab | |||
3c5e06dd0d | |||
379ef48078 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
build/
|
||||
export/
|
||||
.venv/
|
||||
*.conf
|
||||
|
2
Makefile
2
Makefile
@ -1,3 +1,3 @@
|
||||
clean:
|
||||
rm --recursive --force build
|
||||
rm --recursive --force export
|
||||
rm --force nginx.conf
|
||||
|
9
build.py
9
build.py
@ -122,6 +122,12 @@ class ConfigSerializer(msh.Schema):
|
||||
f"Post slugs used multiple times: {set([item for item in slugs if slugs.count(item) > 1])}"
|
||||
)
|
||||
|
||||
@msh.post_load
|
||||
def _remove_future(self, data: Dict[str, Any], *args, **kwargs) -> PostContainer:
|
||||
posts = [item for item in data["posts"] if item.date >= datetime.date.today()]
|
||||
data["posts"] = posts
|
||||
return data
|
||||
|
||||
|
||||
def get_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser()
|
||||
@ -131,7 +137,6 @@ def get_args() -> argparse.Namespace:
|
||||
parser.add_argument(
|
||||
"-c", "--check", action="store_true", help="Check the config without building"
|
||||
)
|
||||
parser.add_argument("-p", "--publish", action="store_true", help="Publish the site")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@ -139,7 +144,7 @@ def main():
|
||||
args = get_args()
|
||||
|
||||
cwd = Path.cwd().resolve()
|
||||
output = cwd / "build"
|
||||
output = cwd / "export"
|
||||
explore = output / "explore"
|
||||
|
||||
with Path(args.config).resolve().open() as infile:
|
||||
|
59
config.yaml
59
config.yaml
@ -7,6 +7,33 @@ static:
|
||||
- index.html
|
||||
- robots.txt
|
||||
posts:
|
||||
- title: Talcott's "Castle on the Mountain" does not dissapoint
|
||||
slug: heubline-tower
|
||||
location:
|
||||
title: Simsbury, CT
|
||||
link: https://maps.google.com
|
||||
date: "2020-01-01"
|
||||
banner: https://cdn.enp.one/img/backgrounds/cl-photo-denver.jpg
|
||||
media: []
|
||||
|
||||
- title: The three hundred year old fort with delusions of grandeur
|
||||
slug: fort-revere
|
||||
location:
|
||||
title: Hull, MA
|
||||
link: https://maps.google.com
|
||||
date: "2020-01-01"
|
||||
banner: https://cdn.enp.one/img/backgrounds/cl-photo-denver.jpg
|
||||
media: []
|
||||
|
||||
- title: Supervillian lair or air traffic control station?
|
||||
slug: jss-north-truro
|
||||
location:
|
||||
title: North Truro, MA
|
||||
link: https://maps.google.com
|
||||
date: "2020-01-01"
|
||||
banner: https://cdn.enp.one/img/backgrounds/cl-photo-denver.jpg
|
||||
media: []
|
||||
|
||||
- title: A 1:1 recreation of the set for Star Trek the Original Series
|
||||
slug: star-trek-set-tours
|
||||
location:
|
||||
@ -17,16 +44,22 @@ posts:
|
||||
links:
|
||||
- title: Star Trek Set Tours
|
||||
link: https://www.startrektour.com/
|
||||
media:
|
||||
- title: Foo Bar Baz
|
||||
content: Fizz buzz, lorem ipsum dolher, siamet
|
||||
source: https://cdn.enp.one/img/backgrounds/cl-network.jpg
|
||||
- title: Foo Bar Baz
|
||||
content: Fizz buzz, lorem ipsum dolher, siamet
|
||||
source: https://cdn.enp.one/img/backgrounds/cl-network.jpg
|
||||
- title: Foo Bar Baz
|
||||
content: Fizz buzz, lorem ipsum dolher, siamet
|
||||
source: https://cdn.enp.one/img/backgrounds/cl-network.jpg
|
||||
- title: Foo Bar Baz
|
||||
content: Fizz buzz, lorem ipsum dolher, siamet
|
||||
source: https://cdn.enp.one/img/backgrounds/cl-network.jpg
|
||||
media: []
|
||||
|
||||
- title: The most successful forest conservation project in the USA
|
||||
slug: mount-greylock
|
||||
location:
|
||||
title: North Adams, MA
|
||||
link: https://maps.google.com
|
||||
date: "2020-01-01"
|
||||
banner: https://cdn.enp.one/img/backgrounds/cl-photo-denver.jpg
|
||||
media: []
|
||||
|
||||
- title: Ghosts of parties past are the last inhabitants of this magnificent forest castle
|
||||
slug: castle-of-madame-sherri
|
||||
location:
|
||||
title: Chesterfield, NH
|
||||
link: https://maps.google.com
|
||||
date: "2020-01-01"
|
||||
banner: https://cdn.enp.one/img/backgrounds/cl-photo-denver.jpg
|
||||
media: []
|
||||
|
@ -1,3 +1,8 @@
|
||||
error_page 404 error/404.html;
|
||||
location = error/404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location = robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
|
Loading…
x
Reference in New Issue
Block a user