Skip to content

Commit fbc58f6

Browse files
committed
Merge branch 'master' of github.com:hydephp/develop
2 parents d1c3bac + e6ba28c commit fbc58f6

File tree

3 files changed

+7
-43
lines changed

3 files changed

+7
-43
lines changed

packages/framework/src/Pages/Concerns/UsesFlattenedOutputPaths.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

packages/framework/src/Pages/DocumentationPage.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
*/
1919
class DocumentationPage extends BaseMarkdownPage
2020
{
21-
use Concerns\UsesFlattenedOutputPaths;
22-
2321
public static string $sourceDirectory = '_docs';
2422
public static string $outputDirectory = 'docs';
2523
public static string $template = 'hyde::layouts/docs';

packages/framework/tests/Unit/DocumentationPageTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* @covers \Hyde\Pages\DocumentationPage
1919
* @covers \Hyde\Framework\Factories\Concerns\HasFactory
2020
* @covers \Hyde\Framework\Factories\NavigationDataFactory
21-
* @covers \Hyde\Pages\Concerns\UsesFlattenedOutputPaths
2221
*/
2322
class DocumentationPageTest extends TestCase
2423
{
@@ -32,9 +31,14 @@ public function test_can_get_current_page_path()
3231
{
3332
$page = DocumentationPage::make('foo');
3433
$this->assertEquals('docs/foo', $page->getRouteKey());
34+
}
3535

36+
public function test_can_get_current_custom_page_path()
37+
{
3638
config(['hyde.output_directories.documentation-page' => 'documentation/latest/']);
3739
(new HydeServiceProvider($this->app))->register();
40+
41+
$page = DocumentationPage::make('foo');
3842
$this->assertEquals('documentation/latest/foo', $page->getRouteKey());
3943
}
4044

@@ -169,10 +173,10 @@ public function test_has_table_of_contents()
169173
$this->assertFalse(DocumentationPage::hasTableOfContents());
170174
}
171175

172-
public function test_compiled_pages_originating_in_subdirectories_get_output_to_root_docs_path()
176+
public function test_compiled_pages_originating_in_subdirectories_retain_subdirectory_structure()
173177
{
174178
$page = DocumentationPage::make('foo/bar');
175-
$this->assertEquals('docs/bar.html', $page->getOutputPath());
179+
$this->assertEquals('docs/foo/bar.html', $page->getOutputPath());
176180
}
177181

178182
public function test_page_has_front_matter()

0 commit comments

Comments
 (0)