GithubHelp home page GithubHelp logo

ardeshir / medium-to-hugo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bgadrian/medium-to-hugo

0.0 2.0 0.0 269 KB

Medium stories exporter to markdown/hugo articles.

Makefile 5.99% Go 94.01%

medium-to-hugo's Introduction

Medium to Hugo

Tool for the migration of articles from a medium.com account to a static website generator with markdown like Hugo.

Here is a preview from my own migration (from medium to Hugo): example

Features:

  • transform HTML posts to markdown
  • ignores comments and empty articles
  • SEO friendly (keeps the old URL as an alias)
  • keeps all the metadata and adds most Hugo front Matter, including the alias with the old URL
  • even if one article fails it keeps going
  • marks the drafts as "draft_"
  • Fetch the article TAGS (which are not included in the Medium exporter), compatible with Hugo Related feature
  • Fetch all the Images and puts them in each articles bundle
  • stories are ordered by date (year-month-day_slug)
  • custom .Params: image, images, slug, subtitle
  • minimal HTML cleanup (removed empty URLs, duplicate title and so on)
  • adds #layout... suffix to every image so they can be styles accordingly from plain CSS with exactly same style as on Medium.

Usage

  1. Download your medium data
  2. Unzip it
  3. Download our binary (see Releases)
  4. Run something like ./mediumtohugo /path/to/export/posts /path/to/hugo/content/ posts

In case you need to bypass TLS/SSL checks you can run the binary with ALLOW_INSECURE=true environment variable. This is a case if the medium certificate expires and you want to export your blog with all tags.

Build / Contribute

You need Bash, Go 1.11+

See Issues for a list of TODOs.

medium-to-hugo's People

Contributors

ravbaker avatar bgadrian avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.