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

Jekyll: Drafts are not imported #510

Closed
markstos opened this issue Jun 6, 2022 · 0 comments
Closed

Jekyll: Drafts are not imported #510

markstos opened this issue Jun 6, 2022 · 0 comments

Comments

@markstos
Copy link
Contributor

markstos commented Jun 6, 2022

There is a code in lib/process-post.js to process files in a "drafts" folder, but the code path is inaccessible because in lib/read-zip.js, only content in the "posts" folder is read, ignoring anything in the "drafts" folder.

As mentioned in a recent PR, the correct folder names are "_posts" and "_drafts".

The fix is to update the regex in lib/read-zip.js to also pass along content in _drafts as well.

markstos added a commit to markstos/migrate that referenced this issue Jun 7, 2022
First, the intent was to read files in the `_drafts/` folder was well,
but the Regex was not matching it.

Second, the intent was to match against the path stored in the the
zipfile, but that was broken. Confusingly, "entryName" holds just the
file name while "zipEntry.entryName" holds the full path. The fix is
to switch "entryName" we use.

Third, only the bare file name was being reported when skipped. It's
more useful to see the full path within the zip, in case the problem is
with the folder structure in there.

Fixes TryGhost#510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant