https://github.com/pedrosancao/wordimpress
Static site generator library that uses Wordpress API as content source.
https://github.com/pedrosancao/wordimpress
static-site-generator twig wordpress-api wordpress-rest wp-json
Last synced: 8 months ago
JSON representation
Static site generator library that uses Wordpress API as content source.
- Host: GitHub
- URL: https://github.com/pedrosancao/wordimpress
- Owner: pedrosancao
- License: mit
- Created: 2020-07-29T23:44:14.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2021-03-07T14:24:48.000Z (over 5 years ago)
- Last Synced: 2024-05-05T18:02:40.257Z (about 2 years ago)
- Topics: static-site-generator, twig, wordpress-api, wordpress-rest, wp-json
- Language: PHP
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wordimpress





Static site generator library that uses Wordpress API as content source. The library still a prototype.
## Key features
- uses Twig as template engine
- convert images to WebP format
- supports markdown to HTML
## Dependencies
This package rely on these PHP extensions:
- GD
- DOM
- Inotify
Make sure you have them installed.
## Usage
Add Wordimpress to your project using composer:
```bash
composer require pedrosancao/wordimpress
```
---
Create a class implementing `PedroSancao\Wordimpress\Contracts\SiteInterface`, then implement other
interfaces on the namespace `PedroSancao\Wordimpress\Contracts` to add more capabilities, some of them
have traits that implements the interface (`PedroSancao\Wordimpress\BlogData\Has*Trait`).
---
Invoke wordpress command:
`vendor/bin/wordimpress [options] classname`
`classname` is the full qualified name of the class implementing `SiteInterface`
The available options:
- `-p, --production` generate assets production
- `-w, --watch` watch for changes to recompile
- `--html-only` run only HTML generation (prevents `-w`)
---
An example of usage is available on [Bootstrap Template](https://github.com/pedrosancao/wordimpress-bootstrap).
## To do
Check the project's [kanban board](https://github.com/pedrosancao/wordimpress/projects/1).