Skip to content

Commit

Permalink
Feature/issue 19 subfolder installation (#21)
Browse files Browse the repository at this point in the history
* fix: #19  slug detection for subfolder installations
  • Loading branch information
mauricerenck authored Aug 20, 2021
1 parent 0c717b9 commit cf09bc1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mauricerenck/komments",
"version": "0.10.4",
"version": "0.10.5",
"description": "A comment and webmention plugin for Kirby 3",
"type": "kirby-plugin",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "komments",
"version": "0.10.4",
"version": "0.10.5",
"description": "A comment and webmention plugin for Kirby 3",
"main": "index.js",
"author": "Maurice Renck",
Expand Down
5 changes: 3 additions & 2 deletions utils/receiveKomment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace mauricerenck\Komments;

use Kirby\Http\Url;
use Kirby\Toolkit\V;
use Kirby\Toolkit\Str;
use Kirby\Data\yaml;
Expand Down Expand Up @@ -46,7 +45,9 @@ public function createKomment($webmention, $spamlevel = 0, $isVerified = false)
public function getPageFromUrl(string $url)
{
if (V::url($url)) {
$path = Url::path($url);
// use kirby->url because it includes the path of a possible subfolder install
$kirbyBaseUrl = kirby()->url();
$path = substr($url, strlen($kirbyBaseUrl));
$languages = kirby()->languages();

if (empty($path)) {
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php return array(
'root' => array(
'pretty_version' => '0.10.4',
'version' => '0.10.4.0',
'pretty_version' => '0.10.5',
'version' => '0.10.5.0',
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -29,8 +29,8 @@
'dev_requirement' => false,
),
'mauricerenck/komments' => array(
'pretty_version' => '0.10.4',
'version' => '0.10.4.0',
'pretty_version' => '0.10.5',
'version' => '0.10.5.0',
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit cf09bc1

Please sign in to comment.