Metadata-Version: 2.4
Name: sg-text-forge
Version: 0.1.2
Summary: MkDocs plugin and build pipeline for Markdown text projects with EPUB generation
Project-URL: Homepage, https://github.com/shared-goals/text-forge
Project-URL: Repository, https://github.com/shared-goals/text-forge
Project-URL: Issues, https://github.com/shared-goals/text-forge/issues
Project-URL: Documentation, https://github.com/shared-goals/text-forge#readme
Author-email: Bongiozzo <sergey.polyakov@hotmail.com>
Maintainer-email: Bongiozzo <sergey.polyakov@hotmail.com>
License: MIT
License-File: LICENSE
Keywords: documentation,epub,markdown,mkdocs,mkdocs-plugin,publishing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.11
Requires-Dist: click<8.2.2,>=8.1.7
Requires-Dist: livereload>=2.7.1
Requires-Dist: mkdocs-git-committers-plugin-2>=2.5.0
Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.5.0
Requires-Dist: mkdocs-material>=9.6.22
Requires-Dist: mkdocs>=1.6.1
Requires-Dist: pyyaml>=6.0.3
Description-Content-Type: text/markdown

# text-forge

MkDocs plugin + GitHub Action for building text-based websites with EPUB, live editor, and GitHub integration.

## Quick Start

### GitHub Action (Publish Site)

```yaml
# .github/workflows/publish.yml
- uses: shared-goals/text-forge@main
  with:
    mkdocs_config: mkdocs.yml
    docs_dir: text/ru
    site_dir: public/ru
```

### Local Development

```bash
./install.sh  # Install dependencies
make serve    # Start dev server with editor
```

## Features

### ✅ Live Editor Widget
- Browser-based markdown editor with real-time preview
- Pyodide + pymdown-extensions (client-side rendering)
- Works on localhost (local saves in `make serve`) and production (GitHub commits)
- Auto-detects environment (local vs production)
- Russian translations

### ✅ GitHub Integration
- Save to GitHub via Personal Access Token (PAT)
- Commits directly to repository
- Auto-triggers GitHub Actions workflow
- Localhost auto-saves to disk

### ✅ EPUB Generation
- Combines markdown chapters via `mkdocs.yml` nav
- Converts PyMdown blocks to Pandoc format
- Generates EPUB with custom CSS
- CLI: `text-forge epub --config=mkdocs.yml`

### ✅ GitHub Actions
- Composite action in `action.yml`
- Builds site + EPUB in one workflow
- Publishes to GitHub Pages
- Example: [whattodo/publish.yml](https://github.com/bongiozzo/whattodo/blob/master/.github/workflows/publish.yml)

