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

Draft Mode using a Local Variable #1044

Closed
limarta opened this issue Aug 6, 2023 · 1 comment · Fixed by #1045
Closed

Draft Mode using a Local Variable #1044

limarta opened this issue Aug 6, 2023 · 1 comment · Fixed by #1045
Labels
deployment enhancement New feature or request

Comments

@limarta
Copy link

limarta commented Aug 6, 2023

Often when writing blog posts, we need a way to store drafts but hide them during deployment. Currently in Franklin.jl, it is possible to add a file to ignore in config.md to skip the file during the build process. However, this also means serve() will also not display the file. It would be helpful to have a "draft" mode that suppresses pages only at deployment time with a draft=true local variable set. Now if a user wishes to continue editing the page locally, calling serve() locally will still display the page.

Example:

+++
draft = true
+++

# This is a post currently being written but not yet for deployment

Partial content...
@tlienart
Copy link
Owner

tlienart commented Aug 6, 2023

I'm supportive of this, it should be a small addition to be added both here and there: tlienart/Xranklin.jl#254

(for context @limarta , I'm trying to limit feature adds to Franklin.jl as the new version is in prep at Xranklin.jl but it's so huge a rewrite that I'm struggling to bring it over the line, but whatever gets added to Franklin.jl also needs to be added there so I'm trying to limit that and aim for Franklin 0.10.x being something of a LTS).

@tlienart tlienart added deployment enhancement New feature or request labels Aug 6, 2023
tlienart added a commit that referenced this issue Aug 10, 2023
tlienart added a commit that referenced this issue Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants