Git Product home page Git Product logo

wordpress-antora's Introduction

Wordpress to Antora convertor

Your situation

You currently have a website in Wordpress that consists of "just" blog posts and content pages, and you’re longing for better version control, reuse of content, and just plain text markup to write content.

A static site generator would be a good alternative. Writing in Markdown would be an obvious choices, but maybe too limited for what you want.

Antora is a static site generator for documentation sites. It works with Asciidoc files and git repositories as content sources.

Caution
  1. Antora is NOT designed for blogging

    Antora version 3 opens the way to add extensions. Maybe someone will write an extension that adds a feature that is useful for blogging. Maybe not…​

    If you rely on Wordpress plugins, comments, widgets, and what not, you will need to find your own way to add equivalent features to Antora.

  2. This is EXPERIMENTAL and LIMITED software.

    All it does is unpack your Wordpress posts and pages into individual source files, using Antora’s content structure. It attempts to convert Wordpress’s way of storing content into Asciidoc. This should help you evaluate how much work is still needed.

Prerequisites

  • Node v16 or newer.

Setup

  • Clone this repository.

  • Install dependencies:

    $ npm i
  • Run the conversion of the demo content:

    $ npm run convert
  • Generate the Antora site:

    $ npm run build
  • Start a local server to see the website:

    $ npm run serve

Next

The repository contains an export of a small Wordpress-Antora demo site.

Export all content from your own Wordpress site (WP admin menu Tools > Export) and save the unzipped XML file in the main directory.

  • You can specify which Wordpress export file to convert:

    $ WORDPRESS_EXPORT=my-export.xml npm run convert
  • You can copy and adapt the playbook file and use that:

    $ PLAYBOOK=my-antora-playbook.yml npm run build
  • The convertor adds and overwrites files in the export/ directory.

Tip

Copy everything under /export to the repository for your new website.

You can continue using Wordpress while setting up your new website. Do another export from Wordpress and conversion to Antora, and use version control to merge the changes.

wordpress-antora's People

Contributors

rolfkleef avatar

Watchers

 avatar James Cloos 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.