Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Fix #7 and #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry Anders committed Jun 1, 2017
1 parent abe7d95 commit 99f7fa7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v0.5.2
## 6/1/2017

1. [](#bugfix)
* Fixes [#7](https://github.com/barryanders/grav-plugin-blackhole/issues/7) and [#9](https://github.com/barryanders/grav-plugin-blackhole/issues/9)


# v0.5.1
## 4/9/2017

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Barry Anders
Copyright (c) Sohma

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ bin/plugin blackhole generate https://website.com static

## Author

| [![twitter/barryanders](https://avatars3.githubusercontent.com/u/5648875?v=2&s=70)](http://twitter.com/barryanders "Follow @barryanders on Twitter") |
| ![Sohma](https://avatars3.githubusercontent.com/u/5648875?v=2&s=70) |
|---|
| [Barry Anders](https://barryanders.github.io/) |
| [Sohma](http://sohma.net) |
6 changes: 3 additions & 3 deletions blackhole.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getSubscribedEvents()
public function onPageInitialized()
{
// get page routes
if ($_GET['pages'] == 'all') {
if (!empty($_GET['pages']) && $_GET['pages'] == 'all') {
ob_start();
// get destination from admin plugin
$destination = $this->config->get('plugins.blackhole.destination');
Expand All @@ -35,7 +35,7 @@ public function onPageInitialized()
$routes[] = $route;
}
}
if ($_GET['destination']) {
if (!empty($_GET['destination'])) {
$this->content = $destination;
} else {
$this->content = json_encode($routes, JSON_UNESCAPED_SLASHES);
Expand All @@ -46,7 +46,7 @@ public function onPageInitialized()
public function onOutputRendered()
{
// Push routes to ?pages=all
if ($_GET['pages'] == 'all') {
if (!empty($_GET['pages']) && $_GET['pages'] == 'all') {
ob_end_clean();
echo $this->content;
}
Expand Down
8 changes: 4 additions & 4 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Blackhole
version: 0.5.1
version: 0.5.2
description: Generates an html copy of your website
icon: circle
author:
name: Barry
name: Sohma
homepage: https://github.com/barryanders/grav-plugin-blackhole
keywords: grav, plugin, static, site, generator
bugs: https://github.com/barryanders/grav-plugin-blackhole/issues
docs: https://github.com/barryanders/grav-plugin-blackhole/blob/master/README.md
bugs: https://github.com/itssohma/grav-plugin-blackhole/issues
docs: https://github.com/itssohma/grav-plugin-blackhole/blob/master/README.md
license: MIT

form:
Expand Down

0 comments on commit 99f7fa7

Please sign in to comment.