Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barryanders/grav-plugin-blackhole
The static site generator for Grav CMS
https://github.com/barryanders/grav-plugin-blackhole
blackhole blackhole-plugin gpm grav grav-plugin static-site-generator
Last synced: 3 months ago
JSON representation
The static site generator for Grav CMS
- Host: GitHub
- URL: https://github.com/barryanders/grav-plugin-blackhole
- Owner: barryanders
- License: other
- Created: 2016-10-06T21:41:22.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T19:09:52.000Z (over 1 year ago)
- Last Synced: 2024-06-19T10:15:11.529Z (5 months ago)
- Topics: blackhole, blackhole-plugin, gpm, grav, grav-plugin, static-site-generator
- Language: PHP
- Homepage:
- Size: 169 KB
- Stars: 169
- Watchers: 8
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- project-awesome - barryanders/grav-plugin-blackhole - The static site generator for Grav CMS (PHP)
README
![Blackhole](https://user-images.githubusercontent.com/5648875/33234047-8bd21c26-d1e5-11e7-80d3-aa98f22235c6.png)
The **⚫ Blackhole** Plugin is for [Grav CMS](http://github.com/getgrav/grav).
## Description
Why Blackhole? Grav is a space term, so I think this plugin should follow suit. Time stops at the event horizon of a black hole, which is exactly what this plugin does to your website. It freezes it in a state. By Increasing **grav**ity to infinity you get a **static** black hole, or in this case you generate a **static** html copy of your **Grav** website.
## Installation
### GPM Installation
The simplest way to install this plugin is via the Grav Package Manager (GPM). From the root of your Grav install type:
`bin/gpm install blackhole`### Manual Installation
If you can't use GPM you can manually install this plugin. Download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`, then rename the folder to `blackhole`.
## Usage
Absolute URLs must be enabled in Grav System Configuration.
### Generate Command
The generate command can be used from the command line or directly in the Grav Admin Panel. Generate your static site. `generate` can also be written as `gen` or `g`.
- **Input URL** (required) - Enter the URL to your live Grav site.
```bash
bin/plugin blackhole generate http://localhost/grav
```#### Options
- **Output URL** `--output-url` or `-d`
The URL of your static site. This determines the domain used in the absolute path of your links.```bash
--output-url https://website.com
```- **Output Path** `--output-path` or `-p`
The directory to which your static site will be written (relative to Grav root).```bash
--output-path ../build
```- **Routes** `--routes` or `-r`
Limit generation to a select list of page routes.```bash
--routes home,about,about/contact
```- **Use Sitemap** `--use-sitemap` or `-m`
Instead of listing all pages use a sitemap generated by the grav [Sitemap plugin](https://github.com/getgrav/grav-plugin-sitemap).
Usefull when your site has multiple languages and/or different URL extension (e.g. .html)
When this option is enabled the --routes option will be ignored.```bash
--use-sitemap /sitemap
```- **Simultaneous Limit** `--simultaneous` or `-s`
Determine how many files will generate at the same time (default: 10).```bash
--simultaneous 10
```- **Assets** `--assets` or `-a`
Copy assets to the output path.- **Force** `--force` or `-f`
Overwrite previously generated files.- **Verbose Mode** `--verbose-mode`
Enable verbose mode.## Author