-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
There was a problem hiding this 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/ |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
.
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.
65b5de1
to
91b9b24
Compare
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.