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
base: master
from

Conversation

Projects
None yet
6 participants
@coderzh
Contributor

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 from hugo import from jekyll #101 to hugo import from jekyll See #101 Oct 1, 2015

@bep

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

anthonyfok commented Oct 3, 2015

@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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

coderzh commented Oct 4, 2015

@anthonyfok Signed already, thx!

@bep

This comment has been minimized.

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

This comment has been minimized.

Contributor

coderzh commented Oct 4, 2015

Just modified some code about Error Handling.

@bep

This comment has been minimized.

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])

This comment has been minimized.

@bep

bep Oct 4, 2015

Member

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

This comment has been minimized.

@coderzh

coderzh Oct 4, 2015

Contributor

Done.

targetDir, err := filepath.Abs(filepath.Clean(args[1]))
if err != nil {
jww.ERROR.Println("Path error:", args[1])

This comment has been minimized.

@bep

bep Oct 4, 2015

Member

Return.

This comment has been minimized.

@coderzh

coderzh Oct 4, 2015

Contributor

Done.

@coderzh

This comment has been minimized.

Contributor

coderzh commented Oct 4, 2015

All done.

hugo import from jekyll
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 #101
@spf13

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

vielmetti commented Oct 5, 2015

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

This comment has been minimized.

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 coderzh:jekyll-import branch Feb 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment