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

Metadata stripped after import jekyll #5576

Closed
pjw91 opened this issue Dec 29, 2018 · 5 comments · Fixed by #6532
Closed

Metadata stripped after import jekyll #5576

pjw91 opened this issue Dec 29, 2018 · 5 comments · Fixed by #6532

Comments

@pjw91
Copy link

@pjw91 pjw91 commented Dec 29, 2018

Steps to reproduce:

  1. jekyll new jy
  2. hugo import jekyll jy hugoout
  3. less hugoout/content/post/*.markdown

There's no front matter in the output file, only the markdown content.

After git-bisect, it seems that this bugs is introduced in #5324.
More precisely, it works incorrectly since 129c27e.
In that version, hugo panic at commands/import_jekyll.go:533; if comments that line out, it output an empty json-front-matter:

---
{}
---
content...

After the last commit in that issue, there's no front-matter in the output files.

@scivision

This comment has been minimized.

Copy link

@scivision scivision commented Jan 22, 2019

I also am having this with Hugo 0.52 and 0.53 at least. Workaround was to temporarily install Hugh 0.49.2 (before the changes noted above) and that imported Jekyll site, preserving the YaML front matter.

Thanks for bisecting this, it saved a lot of time!!

@Tarek-g

This comment has been minimized.

Copy link

@Tarek-g Tarek-g commented Feb 13, 2019

hugo import Jekyll: without Front Matter
the Another way to Migrate to Hugo from Jekyll not work ...

@sheldonhull

This comment has been minimized.

Copy link

@sheldonhull sheldonhull commented Mar 18, 2019

For windows users, a quick fix that just worked for me as a newer user trying this out:

choco uninstall hugo-extended -y
choco install hugo-extended -y --version 0.49.2

Once that's done, you can switch back to latest by just running

choco upgrade hugo-extended -y
@astrodad

This comment has been minimized.

Copy link

@astrodad astrodad commented May 24, 2019

I'm using 0.55.6 and have the same issue, however I am unable to figure out how to use a previous version of Hugo using brew.

@LindsayHill

This comment has been minimized.

Copy link

@LindsayHill LindsayHill commented Aug 1, 2019

Same issue still exists with hugo 0.56.3. brew doesn't seem to be able to install an older version, so I downloaded a binary from here. That let me do the initial import, then switch to a more recent version of Hugo.

trimbo added a commit to trimbo/hugo that referenced this issue Nov 25, 2019
Prior refactor had eliminated writing FrontMatter for Jekyll imports. This
fixes that bug as well as adds a regression test.

Also removed unused site var, replaced some raw strings, and added regression
test for \r\n removal.

Fixes gohugoio#5576
@bep bep closed this in #6532 Nov 25, 2019
bep added a commit that referenced this issue Nov 25, 2019
Prior refactor had eliminated writing FrontMatter for Jekyll imports. This
fixes that bug as well as adds a regression test.

Also removed unused site var, replaced some raw strings, and added regression
test for \r\n removal.

Fixes #5576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.