asciidoctor / jekyll-asciidoc

:syringe: A Jekyll plugin that converts AsciiDoc source files in your site to HTML pages using Asciidoctor.
https://github.com/asciidoctor/jekyll-asciidoc
MIT License
311 stars 78 forks source link

Posts with revdate set, but not having the date in the file name, are not published #271

Closed wessven closed 3 years ago

wessven commented 3 years ago

I am using Jekyll v3.9.1 and jekyll-asciidoc v3.0.0.

According to the readme:

When you’re ready to publish the post, move the file from the _drafts folder to the posts folder and assign a date to it either by adding it to the filename or by defining the revdate attribute in the AsciiDoc header

(I assume that the "_posts" folder is meant, not a folder named "posts".)

This implies that when I want to publish a post, I do not have to prepend the date to the file name, but only need to ensure that the revdate attribute is set. Unfortunately, no matter how or where I attempt to define revdate, Jekyll does not publish my post unless the date is prepended to the file name.

Is this a bug? Or do I understand the about excerpt from the readme incorrectly? In case of the latter, can the readme please be updated to be clearer?

mojavelinux commented 3 years ago

You are correct that the leading underscore was missing from the posts directory. It was getting swallowed. I fixed that.

As for how to add a date to the post, I think the phrasing was just confusing. The date is always required on the filename. That is a constraint imposed by Jekyll itself. What you can do is also set the revdate in the header so as to refine the date, such as to specify a time and time zone. I updated the language to be clearer about this.

wessven commented 3 years ago

Great, thanks for the clarification!