New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a management command to load pages from markdown pages on disk #314

Merged
merged 2 commits into from Nov 10, 2016

Conversation

Projects
None yet
3 participants
@stefanor
Member

stefanor commented Oct 9, 2016

Fixes: #150. Mostly. Without locking pages, as that probably isn't
necessary for now.

Pages are layed out matching the URL structure, with jekyll-style front
matter to describe metadata.

Not declaring a pyyaml dependency, as it's only needed in this management command, and thus rather optional.

@drnlm

Some documentation about the format, or more help about the format, would be nice, but otherwise seems fine.

/app/pages/ ← PAGE_DIR
/app/pages/index.md ← Home Page: /
/app/pages/about.md ← Container Page: /about/

This comment has been minimized.

@hodgestar

hodgestar Nov 8, 2016

Member

It seems a bit more natural for this to be /app/pages/about/index.md?

This comment has been minimized.

@stefanor

stefanor Nov 8, 2016

Member

Yes, it does. But that doesn't match how we actually render pages. The root index page is a hack. This closely mirrors the DB structure.

This comment has been minimized.

@hodgestar

hodgestar Nov 8, 2016

Member

Although that doesn't match Wafer's internals that well. Happy for you to make a choice on this.

Pages must be stored as markdown in a directory, in the same hierarchy
as the desired URL structure.
The ``PAGE_DIR`` setting should be an absolute path to root directory of this

This comment has been minimized.

@hodgestar

hodgestar Nov 8, 2016

Member

I would say Django setting here just to be clearer that this lives in settings.py.

@hodgestar

This comment has been minimized.

Member

hodgestar commented Nov 8, 2016

Looks good to me.

@drnlm

drnlm approved these changes Nov 10, 2016

stefanor added some commits Oct 9, 2016

Add a management command to load pages from markdown pages on disk
Fixes: #150. Mostly. Without locking pages, as that probably isn't
necessary for now.

Pages are layed out matching the URL structure, with jekyll-style front
matter to describe metadata.

@stefanor stefanor force-pushed the pages-in-git branch from 65b5de1 to 91b9b24 Nov 10, 2016

@stefanor stefanor merged commit 2b14be8 into master Nov 10, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@stefanor stefanor deleted the pages-in-git branch Nov 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment