|
13 | 13 | use Hyde\Pages\HtmlPage;
|
14 | 14 | use Hyde\Pages\MarkdownPage;
|
15 | 15 | use Hyde\Pages\MarkdownPost;
|
16 |
| -use Hyde\Pages\VirtualPage; |
17 |
| -use Hyde\Publications\Models\PublicationListPage; |
18 |
| -use Hyde\Publications\Models\PublicationPage; |
19 |
| -use Hyde\Publications\Models\PublicationType; |
20 |
| -use Hyde\Publications\PublicationService; |
21 | 16 | use Illuminate\Support\Collection;
|
22 | 17 |
|
23 | 18 | /**
|
@@ -89,10 +84,6 @@ protected function runDiscovery(): self
|
89 | 84 | $this->discoverPagesFor(DocumentationPage::class);
|
90 | 85 | }
|
91 | 86 |
|
92 |
| - if (Features::hasPublicationPages()) { |
93 |
| - $this->discoverPublicationPages(); |
94 |
| - } |
95 |
| - |
96 | 87 | foreach ($this->kernel->getRegisteredPageClasses() as $pageClass) {
|
97 | 88 | $this->discoverPagesFor($pageClass);
|
98 | 89 | }
|
@@ -127,48 +118,4 @@ protected function parsePagesFor(string $pageClass): Collection
|
127 | 118 |
|
128 | 119 | return $collection;
|
129 | 120 | }
|
130 |
| - |
131 |
| - protected function discoverPublicationPages(): void |
132 |
| - { |
133 |
| - PublicationService::getPublicationTypes()->each(function (PublicationType $type): void { |
134 |
| - $this->discoverPublicationPagesForType($type); |
135 |
| - $this->generatePublicationListingPageForType($type); |
136 |
| - }); |
137 |
| - } |
138 |
| - |
139 |
| - protected function discoverPublicationPagesForType(PublicationType $type): void |
140 |
| - { |
141 |
| - PublicationService::getPublicationsForPubType($type)->each(function (PublicationPage $publication): void { |
142 |
| - $this->addPage($publication); |
143 |
| - }); |
144 |
| - } |
145 |
| - |
146 |
| - protected function generatePublicationListingPageForType(PublicationType $type): void |
147 |
| - { |
148 |
| - $page = new PublicationListPage($type); |
149 |
| - $this->put($page->getSourcePath(), $page); |
150 |
| - |
151 |
| - if ($type->usesPagination()) { |
152 |
| - $this->generatePublicationPaginatedListingPagesForType($type); |
153 |
| - } |
154 |
| - } |
155 |
| - |
156 |
| - /** |
157 |
| - * @deprecated This method will be removed before merging into master. |
158 |
| - * |
159 |
| - * @internal This method will be removed before merging into master. |
160 |
| - */ |
161 |
| - protected function generatePublicationPaginatedListingPagesForType(PublicationType $type): void |
162 |
| - { |
163 |
| - $paginator = $type->getPaginator(); |
164 |
| - |
165 |
| - foreach (range(1, $paginator->totalPages()) as $page) { |
166 |
| - $paginator->setCurrentPage($page); |
167 |
| - $listingPage = new VirtualPage("{$type->getDirectory()}/page-$page", [ |
168 |
| - 'publicationType' => $type, 'paginatorPage' => $page, |
169 |
| - 'title' => $type->name.' - Page '.$page, |
170 |
| - ], view: $type->listTemplate); |
171 |
| - $this->put($listingPage->getSourcePath(), $listingPage); |
172 |
| - } |
173 |
| - } |
174 | 121 | }
|
0 commit comments