Git Product home page Git Product logo

rest-wordpress's Introduction

reST-wordpress: Combining two great tastes

Website: https://launchpad.net/rest-wordpress

Why combine WordPress and reStructuredText?

WordPress is practically a de facto standard of Open Source blogging tools. It's a mature platform backed by an intelligent and active community.

reStructuredText (or reST for short) is practically a de facto standard of the Python document-writing community. It's a mature text markup format backed by an intelligent and active community.

Prerequisites

Installation

  1. Copy the plugin.

    Copy the rest.php file to the wp-content/plugins directory underneath the root if your WordPress installation.

  2. Configure plugin options.

    Edit the rest.php file.

    Change the $prefix, $rst2html, $cachedir, $usepipes, and $tmpdir paths as necessary based on the in-line comments documenting each option.

    Save the file.

  3. Configure WordPress options.

    Navigate to Options, then Writing.

    Turn off the option titled WordPress should correct invalidly nested XHTML automatically.

    Click on Update Options to save this change.

    Navigate to Users, then Your Profile.

    Turn off the option titled Use the visual editor when writing.

  4. Activate the plugin.

    Log into your WordPress wp-admin URL.

    Navigate to Plugins.

    Click Activate next to the reStructuredText plugin.

Using reStructuredText

To write a post or page using reStructuredText, simply include this mode line somewhere in your body text, usually as the first line, then publish as normal:

.. -*- mode: rst -*-

The mode line is interpreted in the following ways:

  • The reST-wordpress plugin, as well as many text editors, see the -*- mode: rst -*- part as an indicator that the text is in reStructuredText format.
  • The reStructuredText format treats lines beginning with .. as comment lines.

"More" links

Add a more link to your post by adding this to your text:

.. <!--more-->

The plugin goes through a few hackish hoops to get this to work, but the end result is that you get to comment it out in the reStructuredText source, and have it play along with WordPress.

Limitations

  • You cannot post comments in reStructuredText format.
  • Does not play nice with other markup plugins. Please disable all other markup plugins if you've installed any.
  • One-time configuration is stored in the plugin itself, rather than via a page accessed via wp-admin.
  • The WordPress visual editor does not support reStructuredText. On the other hand, you are probably installing this plugin because you would prefer to use plain text. :)
  • More links look less than ideal in some templates, mainly the index page template of the default WordPress template.

Contributions

  • Pupeno provided improvements in making the plugin template-agnostic around 2007-01-17 (post).
  • Bob Ippolito provided improvements to the caching system around 2004-12-29 (archived post).
  • Matthew Scott converted the concept to a WordPress plugin around 2004-12-23 (archived post).
  • Inspired by a 2004-11-23 post (archived) about using reStructuredText with Drupal.

rest-wordpress's People

Contributors

dwf avatar

Stargazers

 avatar Pietro Malerba avatar

Watchers

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