Comments (15)
This project may be helpful:
https://github.com/davidwinter/wordpress-to-jekyll
Any markdown generated that works with jekyll should work with Middleman.
from middleman-blog.
I've tried out wordpress-to-jekyll but I had to modify it a bit to populate frontmatter with the correct info and output files in the right directory structure, as well as to ignore non-published posts. That script is also pretty primitive - it dumps the raw HTML without converting to Markdown, though for my purposes I don't really care what format old posts are in as long as they still display correctly.
If there were a nice way for Middleman extensions to contribute Thor actions to the main middleman executable I'd be willing to write a quick wordpress importer command in Ruby. Failing that, I might just write a standalone one. What do you think?
from middleman-blog.
Excellent idea regarding expanding the middleman
executable. Shouldn't be hard, though the whole CLI needs a refactor badly.
I'll make a ticket.
from middleman-blog.
Jekyll now has its own migrators that should produce middleman-compatible posts:
https://github.com/mojombo/jekyll/tree/master/lib/jekyll/migrators
There's also this python thing that looks hard to run:
https://github.com/thomasf/exitwp
I wonder whether it's worth having our own importer - it'd basically be a duplicate of Jekyll's. Perhaps just instructions on how to use their importer to create the posts?
from middleman-blog.
Maybe we can wrap their migrators with a middleman-migrator
extension which provides a CLI?
from middleman-blog.
I used exitwp to convert my Wordpress export to markdown. I had to postprocess URL's and some frontmatter.
from middleman-blog.
Looks like some progress has been made by @salmansqadeer with wordpress-to-middleman 👍
from middleman-blog.
Wonderful @salamansqadeer! When it's stable, we can work to make it into a build-in template or extension.
from middleman-blog.
Thanks guys! Glad to see that you find it useful. I have currently made it as stable as I think I will be able to get it in the near term. The translation from HTML to markdown is a little bit broken, but I fear that is more the fault of the html2md gem that Im using as opposed to any details in my actual code. I'll look into finding a better gem / writing my own html to markdown converter down the line to make sure this is seamless.
I also need to add support for downloading images and saving them in the right folder structure, but I would be happy to get some advice on how best to implement that as it may be a bit beyond my skill set.
Cheers!
from middleman-blog.
Just stumbled on the ruby-wpdb gem. Looks like it might help.
from middleman-blog.
Inspired by @salmansqadeer's initial work, I built upon wordpress-to-middleman to create a wp2middleman gem. The gem creates a wp2mm command line utility that migrates the posts contained in a Wordpress XML export file to middleman-style markdown files.
This is just a rough first pass; I haven't yet released it to Rubygems. Please let me know if you have any feedback or further ideas. Hopefully it's relevant in some capacity to this issue.
Thanks!
from middleman-blog.
👍
from middleman-blog.
@bhollis Thoughts on closing this? Looks like there are now a few options for doing this which weren't available 2 years ago...
@mdb Another 👍 from me 😄
from middleman-blog.
Honestly, I'd really love if we could pick a solution and either move it into core or depend on the gem. Then we'd add official docs for it.
from middleman-blog.
Seems these have not been kept up to date though and the documentation is now out of sync for these - its there any progress on an official one?
from middleman-blog.
Related Issues (20)
- Add more informations in head of article HOT 2
- Extension should not fail to activate if middleman-core/cli is missing
- Paging on untagged posts HOT 1
- How to make paginate work with localize blog? HOT 2
- Cyrillic tags stopped working in 4.0.2 HOT 2
- Support i18n mount_at_root option in permalinks HOT 3
- 4.0.2 regression bug when specifying the blog in the front-matter HOT 7
- feed.xml error on multi-blog site HOT 1
- RuntimeError flag --blog HOT 1
- 4.0.2 on RubyGems.org has different dependencies to the git repo HOT 3
- Very poor and outdated blog template which does not match with default template HOT 4
- Iterating through blog.tags spits out extraneous frontmatter HOT 5
- How to get links to all calendar/tag pages HOT 5
- Calendar and tag pages without .html aren't rendered within layout automatically HOT 1
- How to configure URLs of articles with underscore HOT 6
- `middleman article` generates incorrect yaml when the title contains characters that should be escaped HOT 1
- Middleman blog frontmatter evaluating files under build directory HOT 3
- preserve i18n locale on non-localized article page HOT 2
- YAML error on Ruby 3.1.0 HOT 7
- Paginate is showing as false even if set in config.rb to true HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from middleman-blog.