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: support HTML formatted posts #507

Closed
markstos opened this issue Jun 5, 2022 · 1 comment
Closed

Jekyll: support HTML formatted posts #507

markstos opened this issue Jun 5, 2022 · 1 comment

Comments

@markstos
Copy link
Contributor

markstos commented Jun 5, 2022

In addition to Markdown, Jekyll also supports posts in HTML format (official reference: https://jekyllrb.com/docs/posts/#the-posts-folder ).

It would great if this tool could import those as well.

Thanks!

@markstos
Copy link
Contributor Author

markstos commented Jun 5, 2022

I've reviewed the code enough now to see how this might be done. I'll take a swing at it now.

markstos added a commit to markstos/migrate that referenced this issue Jun 5, 2022
HTML posts are detected using an ".html" file extension.

Before, the entire contents of Jekyll posts was referred to as
"Markdown". This was not completely accurate, as it is a combination of "front
matter" plus Markdown. And this not accurate at all ilf the file content
was actually html. Now, we use "fileContents" to refer to the whole
file.

Before, the front matter was being parsed twice, once during metadata
processing and a second time for "markdown" processing. Now, frontmatter
only gets processed ones, which should be a small speed-up.

Before, "process-content.js" was almost exclusively updating HTML and
not any other type of content. Now that HTML support has been added,
that's the only thing that it does, so it renamed "process-html.js" to
be more clear.

I'm not sure if Jekyll supports multiple extensions for HTML files like
it does for Markdown files. Here only support for ".html" is added. If
an unknown file type is detected, an error will be thrown.

Fixes TryGhost#507
markstos added a commit to markstos/migrate that referenced this issue Jun 7, 2022
HTML posts are detected using an ".html" file extension.

Before, the entire contents of Jekyll posts was referred to as
"Markdown". This was not completely accurate, as it is a combination of "front
matter" plus Markdown. And this not accurate at all ilf the file content
was actually html. Now, we use "fileContents" to refer to the whole
file.

Before, the front matter was being parsed twice, once during metadata
processing and a second time for "markdown" processing. Now, frontmatter
only gets processed ones, which should be a small speed-up.

Before, "process-content.js" was almost exclusively updating HTML and
not any other type of content. Now that HTML support has been added,
that's the only thing that it does, so it renamed "process-html.js" to
be more clear.

I'm not sure if Jekyll supports multiple extensions for HTML files like
it does for Markdown files. Here only support for ".html" is added. If
an unknown file type is detected, an error will be thrown.

Fixes TryGhost#507
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