From b775041d2a32a926a9c02e8964116cfa264fac3b Mon Sep 17 00:00:00 2001 From: interlope Date: Mon, 1 Jun 2026 17:14:21 +0200 Subject: [PATCH] Update README and metadata: Enhance documentation with detailed installation and usage instructions; change author name in metadata. --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++- metadata.json | 2 +- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c70faed..9be1f25 100644 --- a/README.md +++ b/README.md @@ -1 +1,64 @@ -# bludit-github \ No newline at end of file +# bludit-github + +A [Bludit](https://www.bludit.com) plugin that automatically exports your blog articles to a GitHub repository as Markdown files. + +## What it does + +Whenever you create, update, or delete an article in Bludit, the plugin pushes the change to a GitHub repository via the GitHub API. Each article is exported as its own folder containing an `index.md` file: + +``` +my-article/ + index.md +another-post/ + index.md +``` + +Each `index.md` contains a YAML frontmatter block followed by the article content: + +```markdown +--- +title: "My Article" +date: 2026-05-01 +slug: my-article +status: published +tags: + - php + - bludit +description: "Optional meta description" +category: tech +--- + +Article content here... +``` + +## Installation + +1. Copy the `bludit-github` folder into your Bludit `bl-plugins/` directory. +2. Go to **Admin → Plugins** and enable **GitHub Export**. +3. Open the plugin settings and fill in your GitHub credentials. + +## Settings + +| Field | Description | +|---|---| +| Personal Access Token | A GitHub token with `repo` scope. [Generate one here](https://github.com/settings/tokens/new). | +| Repository Owner | Your GitHub username or organization name. | +| Repository Name | The target repository (e.g. `my-blog`). | +| Branch | Branch to push to (default: `main`). | +| Path Prefix | Optional subfolder prefix. Leave empty to export at the repo root. | +| Export drafts | When checked, draft articles are also exported. | + +## Bulk export + +The settings page includes an **Export all articles now** button that pushes all your existing articles to GitHub in one go. Useful on first install or after changing the target repository. + +## Behavior + +- **On article save:** the article's `index.md` is created or updated in the repository. +- **On article delete:** the article's `index.md` is deleted from the repository (GitHub removes the empty folder automatically). +- **Errors** are displayed in the plugin settings panel and never interfere with Bludit's own save process. + +## Requirements + +- Bludit 3.20+ +- PHP with `curl` extension enabled diff --git a/metadata.json b/metadata.json index 991e6b5..f9ff392 100644 --- a/metadata.json +++ b/metadata.json @@ -1,5 +1,5 @@ { - "author": "interlope", + "author": "spleenftw", "email": "", "website": "https://github.com/interlope/bludit-github", "version": "1.0.0",