Skip to content
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

stefanor
Copy link
Member

@stefanor 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.

Copy link
Member

@drnlm drnlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@hodgestar hodgestar Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hodgestar
Copy link
Member

Looks good to me.

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 merged commit 2b14be8 into master Nov 10, 2016
@stefanor stefanor deleted the pages-in-git branch November 10, 2016 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants