Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Post Processor

Powered by Bun

A JavaScript-based tool for fetching WordPress posts via the public REST API, processing their HTML, and converting the content into Markdown. Built to run in a Node.js environment (with Bun). Optimized for Astro.js frontends. 🚀


📦 Features

  • Fetch posts from any public WordPress site.
  • Convert HTML post content to clean Markdown.
  • Save processed posts locally as .md files.
  • Simple configuration using a .env file.

🛠 Prerequisites

Before you start, make sure you have the following installed:

  • Bun: A fast JavaScript all-in-one toolkit.
  • A WordPress site with the REST API enabled (most public WP sites have it enabled by default).

📥 Installation

  1. Clone the repository:

    git clone [https://github.com/avestair/wordpress-post-processor.git](https://github.com/avestair/wordpress-post-processor.git)
    cd wordpress-post-processor
  2. Install the dependencies:

    bun install

⚙️ Configuration

Configuration is managed through a .env file.

  1. Create a .env file by copying the example file:

    cp .env.example .env
  2. Edit the .env file and add your WordPress site's URL:

    # The base URL of the WordPress site you want to fetch posts from
    WP_BASE_URL="[https://your-wordpress-site.com](https://your-wordpress-site.com)"

🚀 Usage

Once your .env file is configured, you can run the script with a single command:

bun run dev

About

A JavaScript-based tool for fetching WordPress posts via the public REST API, processing their HTML, and converting the content into Markdown. Built to run in a Node.js environment (with Bun). optimized for Astro.js frontends.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages