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

Commit

Permalink
v0.8.4: reverted to previous route method
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry authored and Barry committed Sep 1, 2017
1 parent 742c70e commit 715313d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#v0.8.4
## 9/1/2017

1. [](#bugfix)
* Reverted to previous route method because collections are inadequate

# v0.8.3
## 8/18/2017

1. [](#improved)
* Remove modular pages from routes [#18](https://github.com/barrymode/grav-plugin-blackhole/pull/18)
* Remove modular pages from routes ([#18](https://github.com/barrymode/grav-plugin-blackhole/pull/18))
2. [](#bugfix)
* Fixed output-url [#19](https://github.com/barrymode/grav-plugin-blackhole/pull/19)
* Fixed output-url ([#19](https://github.com/barrymode/grav-plugin-blackhole/pull/19))

# v0.8.2
## 8/1/2017
Expand All @@ -18,7 +24,7 @@
1. [](#new)
* Added timer
2. [](#bugfix)
* Fixed memory growth problem [#16](https://github.com/barrymode/grav-plugin-blackhole/issues/16)
* Fixed memory growth problem ([#16](https://github.com/barrymode/grav-plugin-blackhole/issues/16))

# v0.8.0
## 7/30/2017
Expand All @@ -38,25 +44,25 @@
1. [](#improved)
* Minor optimizations of the file generation method
2. [](#bugfix)
* Fixed mkdir errors [#12](https://github.com/barrymode/grav-plugin-blackhole/issues/12)
* Fixed mkdir errors ([#12](https://github.com/barrymode/grav-plugin-blackhole/issues/12))

# v0.7.0
## 6/18/2017

1. [](#new)
* Feature: only render pages that have changed/been modified. [#12](https://github.com/barrymode/grav-plugin-blackhole/issues/12)
* Feature: only render pages that have changed/been modified. ([#12](https://github.com/barrymode/grav-plugin-blackhole/issues/12))

# v0.6.0
## 6/18/2017

1. [](#new)
* Portal function solves [#10](https://github.com/barrymode/grav-plugin-blackhole/issues/10)
* Portal function solves ([#10](https://github.com/barrymode/grav-plugin-blackhole/issues/10))

# v0.5.1
## 6/1/2017

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

# v0.5.0
## 4/9/2017
Expand Down
11 changes: 8 additions & 3 deletions blackhole.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ public function onPageInitialized() {
$output_path = $this->config->get('plugins.blackhole.output_path');

// get all routes from grav
$routes = $this->grav['pages']->all()->nonModular()->toArray();
// empty the home page slug
$routes[$this->grav['pages']->all()->current()->path()]['slug'] = '';
$routes = $this->grav['pages']->routes();

// unset modular pages
foreach ($routes as $path => $dir) {
if (strpos($path, '/_') !== false) {
unset($routes[$path]);
}
}

if (!empty($_GET['output_path'])) {
$this->content = $output_path;
Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Blackhole
version: 0.8.3
version: 0.8.4
description: Generates an html copy of your website
icon: circle
author:
Expand Down
3 changes: 1 addition & 2 deletions cli/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ function generate($bh_route, $bh_file_path, $grav_page_data) {
// make pages in output path
if (count($pages)) {
$rollingCurl = new \RollingCurl\RollingCurl();
foreach ($pages as $grav_file_path => $grav_route) {
$grav_slug = '/' . $grav_route->slug;
foreach ($pages as $grav_slug => $grav_file_path) {
$request = new \RollingCurl\Request($input_url . $grav_slug);
$request->grav_file_path = $grav_file_path;
$request->bh_route = preg_replace('/\/\/+/', '/', $event_horizon . $grav_slug);
Expand Down

0 comments on commit 715313d

Please sign in to comment.