-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
not hidden automatically page with draft = true #1792
Comments
The bug is reproduced in version v 0.16-DEV |
It is It feels like this is a question that would be better suited to the Hugo Discussion Forum. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug. |
@bep documentation says # include content marked as draft
buildDrafts: false I expect to get in a case 3 page 404. Not right? $ hugo new site testdraft
$ cd testdraft
[case 1]
$ echo '+++
draft = true
+++' > content/page1.md
$ nohup hugo server > hugo_server.log 2>&1 & echo $$! > hugo_server.pid
[1] 51329
$ curl -I http://127.0.0.1:1313/page1/
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Mon, 25 Jan 2016 04:18:03 GMT
Content-Length: 19
[case 2]
$ echo '+++
draft = false
+++' > content/page1.md
$ curl -I http://127.0.0.1:1313/page1/
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Content-Type: text/html; charset=utf-8
Last-Modified: Mon, 25 Jan 2016 04:18:33 GMT
Date: Mon, 25 Jan 2016 04:18:35 GMT
[case 3]
$ echo '+++
draft = true
+++' > content/page1.md
$ curl -I http://127.0.0.1:1313/page1/
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Content-Type: text/html; charset=utf-8
Last-Modified: Mon, 25 Jan 2016 04:18:33 GMT
Date: Mon, 25 Jan 2016 04:19:07 GMT
$ hugo_server.log
|
This is still a bug in v0.95.0, should not be closed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If you change page draft = false on draft = true then the page still available. After restarting hugo, page becomes is not available
hugo v0.15 running, follow command
hugo server --source=$(PATH) --port=$(PORT) --appendPort=false --baseURL=$(BASEURL)
Config
The text was updated successfully, but these errors were encountered: