Click here for previous articles. It covers everything from setup to common settings.
-How to publish a blog on Amazon S3 with the static blog engine'Pelican'for Pythonista -Various settings of Python static blog generation tool'Pelican' -Try to introduce the theme to Pelican
Pelican, a blog generation engine made by Python, has a "draft" function by default.
I think that Pelican's article will be kept under local / content in reST or md format, but in that state hit the make html command And all articles are indexed and published to the outside world when deployed.
The Drafts function is provided to meet such needs.
I will write metadata at the top of the article, but there
Status: draft
Just write. The above is for md, but for reST
:Status: draft
Wonder.
What happens when you write this is that when you make html, only the relevant article is not indexed, the generated html file does not go to the output folder, and a separate drafts folder is created in it. It will be stored.
If you deploy in that state, it will not be visible to the general public.
http://[ドメイン名]/drafts/[URL]
You can access it with the URL. (The specific URL depends on each environment)
Put it in drafts once, delete the one line described when you are ready to publish after checking work, generate html again → deploy, and the article will be published properly this time. It's easy!
Strictly speaking, drafts are different from "drafts" because they will be accessed once you know the URL. If you don't want to even publish it, you have to make a draft in a place other than the content folder, but for the time being, I accidentally published the article I was about to write along with other articles! In order to avoid such a situation, it may be safer to add the *** Status: draft *** attribute at first.
Recommended Posts