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

New file import_wp.go for importing WordPress export files #3559

Closed
wants to merge 1 commit into from

Conversation

eklausme
Copy link

@eklausme eklausme commented Jun 4, 2017

As indicated in #100 this is the integration to Hugo from a stand-alone Go-program.

@bep
Copy link
Member

bep commented Jul 1, 2017

@eklausme this looks extensive and the code looks solid. To add this as a command to Hugo, though, we need to know that it is

  1. Useful
  2. Robust i.e. handles "most Word Press" versions without us having to tweak it all the time.

If I understand it, this importer handles XML export files. I remember doing a WP conversion myself at one time, and found that I lost lots of stuff doing it this way (custom shortcodes etc.), and went with a conversion that used the WP rendered output as the base for conversion.

@SchumacherFM have done some work in this are, and may share some thoughts?

@SchumacherFM
Copy link
Contributor

I get rarely feedback regarding the PHP WordPress to Hugo converter script. But AFAIK most people install it into their WP installations, hack on it, and then export all the pages and throw away the whole WP installation.

Maintaining the WP XML in Go within the Hugo binary can be a huge task.

Maybe and this is just an idea: Instead of implementing the import_wp.go into Hugo, you can just run it standalone and mention the importer besides my Wordpress PHP plugin. After some time you can see from the feedback from the community on how intensive the maintenance would be. If it runs well without lots of modifications ... add it to the Hugo binary.

@eklausme
Copy link
Author

User Feedback

Previous Feedback

I collected various comments made during the last 4 years regarding issue #100, i.e., adding Hugo import feature from WordPress.

spf13 commented on Oct 9, 2013: 'hugo import ....'

anthonyfok commented on Jan 21, 2015: ...and had all of my 1800+ posts, images, etc. converted for use with Hugo in less than an hour. ... create a hugo import ... command which essentially does similar things as the PHP code, but all written in Go?

bep commented on Jan 21, 2015: I couldn't get the "Wordpress to Hugo Exporter" to work. Issues with newer WP versions.

cgsmith commented on Apr 30, 2015: It would be nice to have it just parse the Wordpress XML ...

eklausme (me) commented on Apr 24: I am very much interested in seeing this as hugo import wordpress.

To summarize the above: The creator of Hugo, spf13, wants an import feature; an approved committer, anthonyfok, wants it written in Go and run quickly; bep seems to have some issues with the import facilities provided thus far.

The proposed pull request is a direct response to the above comments: Written in Go, being fast, and working directly on the export file without any need to install plugins in WordPress, which by the way is not possible with wordpress.com.

Recent Feedback

I had written on this import functionality in April 2017, this blog post has now been viewed more than 100 times. I haven't received any comments so far. This could mean either:

  1. People download my code and everything works just fine.
  2. People recognize they have to install Go and compile a program on their own and are scared off.
  3. None of the above, e.g., just serve reader's curiosity.

WordPress Version Problems

Regarding the version issue mentioned above by bep, I tested a WordPress export file from 2013 and 2015 which I still have in my backup directory. Both versions were imported to Hugo flawlessly. I checked the output of both with theme Hugo Bootstrap v4 Blog. Blog from 2013 was converted in 0.1 seconds, blog from 2015 was converted in 1.1 seconds.

If bep could test his troublesome WordPress export file with this converter, or send me his problematic file, then I will take a look.

Proposal

Following the initial proposal from spf13, it would lower the burden for the usual food blogger, travel blogger, parenting blogger, etc., to just have a single binary and import ones own stuff into Hugo and see results almost immediately and then play with content and themes, but not with technical specialities, like compiling, PATH variables, etc.

If there are still problems I am still around and eager to assist in case of any glitches.

@bep
Copy link
Member

bep commented Nov 27, 2017

To summarize the above: The creator of Hugo, spf13, wants an import feature; an approved committer, anthonyfok, wants it written in Go and run quickly; bep seems to have some issues with the import facilities provided thus far.

If @spf13 chimes in with a "I will support/maintain this future", then we can consider.

@stale
Copy link

stale bot commented Feb 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Feb 25, 2018
@stale stale bot closed this Mar 11, 2018
@github-actions
Copy link

github-actions bot commented Feb 6, 2022

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 6, 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

4 participants