Navigation Menu

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

hugo import from jekyll See #101 #1469

Closed
wants to merge 1 commit into from

Conversation

coderzh
Copy link
Contributor

@coderzh coderzh commented Oct 1, 2015

Issue #101

hugo import jekyll jekyll_root_path target_path

Implemented:

  • Create new hugo site
  • Create config.yaml
  • Convert all markdown contents.
  • Copy all other files and folders to static

@coderzh coderzh changed the title hugo import from jekyll #101 hugo import from jekyll See #101 Oct 1, 2015
@bep
Copy link
Member

bep commented Oct 1, 2015

This is pure gold! We should test this with a few Jekyll sites on both *nix and Windows, but this will be a big sell for Hugo.

/cc @spf13

@bep
Copy link
Member

bep commented Oct 2, 2015

I tested this on OSX by converting the two first sites on

http://jekyllrb.com/docs/sites/

It worked (almost) flawless. One question: The below site have images under /images. I have no idea what the Jekyll standard says about this, but for this particular case, the images doesn't get copied to /static.

https://github.com/qrush/qrush.github.com

As I said, not sure if this is correct or not.

@coderzh
Copy link
Contributor Author

coderzh commented Oct 3, 2015

@bep Thank you for your thorough testing. Yes, I missed copy some files and folders. The Jekyll structure rule as below:
http://jekyllrb.com/docs/structure/

I have added copyJekyllFilesAndFolders function to fix it, please check it again, thx!

@bep
Copy link
Member

bep commented Oct 3, 2015

Yes, now it works great.

One comment, though, re. below.

simple-hugo is a nice theme, but it is out of our control. It would be better to use a theme in the spf13 repo as an example, maybe the Hyde theme?

Also, isn't git submodule preferred over clones in this case? Not sure. @spf13 ??

hugo import jekyll qrush.github.com qr2
importing...
Congratulations! 72 posts imported!
Now, start hugo by yourself:
$ git clone https://github.com/druzza/simple-hugo.git qr2/themes/simple-hugo

@anthonyfok
Copy link
Member

@coderzh, awesome job with the importer! Just like @bep, this is pure gold! Thank you for your contribution.

I have a big favour to ask you though. Since this is a significantly large contribution, please read http://discuss.gohugo.io/t/switching-to-apache-2-license/173 and sign there if you agree. We would like to switch from "SimPL-2.0" to "Apache License 2.0" in the near future (hopefully). Many thanks!

@coderzh
Copy link
Contributor Author

coderzh commented Oct 4, 2015

@bep The reason why I chose simple-hugo is that it is very simple and clean, I tested Hyde before, it displays a list of whole content of posts in Index Page. When the number of Posts is very large, it doesn't display very good.

And I have found another perfect theme in spf13 repo called herring-cove. As mentioned in:
https://gohugo.io/tutorials/automated-deployments/

So I changed simple-hugo to herring-cove, please have a check, thx!

As the automated-deployments page said, rm .git folder in the theme folder after clone sounds like the official method?

@coderzh
Copy link
Contributor Author

coderzh commented Oct 4, 2015

@anthonyfok Signed already, thx!

@bep
Copy link
Member

bep commented Oct 4, 2015

@coderzh yes, my main issue about the theme was its location. Now we should be all good to go (some documentation will fall in place). Any objections, @spf13 ?

@coderzh coderzh force-pushed the jekyll-import branch 2 times, most recently from c34118d to 1dd7908 Compare October 4, 2015 10:14
@coderzh
Copy link
Contributor Author

coderzh commented Oct 4, 2015

Just modified some code about Error Handling.

@bep
Copy link
Member

bep commented Oct 4, 2015

Could you also fix the commit message in line with the guidelines?


jekyllRoot, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
jww.ERROR.Println("Path error:", args[0])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return here. No point in going in with no Jekyll source.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@coderzh coderzh force-pushed the jekyll-import branch 2 times, most recently from 9defa49 to 1bf1b4c Compare October 4, 2015 11:07
@coderzh
Copy link
Contributor Author

coderzh commented Oct 4, 2015

All done.

usage: hugo import jekyll jekyll_root_path target_path

Implemented:
 * Create new hugo site
 * Create config.yaml
 * Convert all markdown contents.
 * Copy all other files and folders to static

Fixes gohugoio#101
@spf13
Copy link
Contributor

spf13 commented Oct 4, 2015

I haven't tested it yet, but it looks great and I know users will be
thrilled to have this.

On Sun, Oct 4, 2015 at 7:17 AM coderzh notifications@github.com wrote:

All done.


Reply to this email directly or view it on GitHub
#1469 (comment).

@bep
Copy link
Member

bep commented Oct 4, 2015

Merged in 9a2f6c6

Real life testing will probably lead to more requirements, but this is a fantastic start.

@bep bep closed this Oct 4, 2015
@vielmetti
Copy link
Contributor

This is super. (And there's an existing path from Typepad to Jekyll, using https://github.com/koozie/typepad_to_jekyll , so this will be helpful for those making that transition).

@anthonyfok anthonyfok added this to the v0.15 milestone Oct 31, 2015
@OJ
Copy link

OJ commented Nov 25, 2015

Love it! This is super exciting and is the final piece of the puzzle for getting me off Octopress. Great effort, thanks very much to all involved. 👏

@coderzh coderzh deleted the jekyll-import branch February 29, 2016 23:20
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants