@uniweb/core 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/website.js +7 -12
package/package.json
CHANGED
package/src/website.js
CHANGED
|
@@ -18,21 +18,19 @@ export default class Website {
|
|
|
18
18
|
this.description = config.description || ''
|
|
19
19
|
this.url = config.url || ''
|
|
20
20
|
|
|
21
|
-
// Store
|
|
21
|
+
// Store layout panels (header, footer, left, right)
|
|
22
22
|
// These come from top-level properties set by content-collector
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.rightPage = right || pages.find((p) => p.route === '/@right') || null
|
|
23
|
+
this.headerPage = header || null
|
|
24
|
+
this.footerPage = footer || null
|
|
25
|
+
this.leftPage = left || null
|
|
26
|
+
this.rightPage = right || null
|
|
28
27
|
|
|
29
28
|
// Store 404 page (for SPA routing)
|
|
30
29
|
// Convention: pages/404/ directory
|
|
31
30
|
this.notFoundPage = notFound || pages.find((p) => p.route === '/404') || null
|
|
32
31
|
|
|
33
|
-
// Filter out
|
|
34
|
-
const
|
|
35
|
-
const regularPages = pages.filter((page) => !specialRoutes.includes(page.route))
|
|
32
|
+
// Filter out 404 from regular pages array
|
|
33
|
+
const regularPages = pages.filter((page) => page.route !== '/404')
|
|
36
34
|
|
|
37
35
|
// Store original page data for dynamic pages (needed to create instances on-demand)
|
|
38
36
|
this._dynamicPageData = new Map()
|
|
@@ -792,9 +790,6 @@ export default class Website {
|
|
|
792
790
|
|
|
793
791
|
// Filter pages based on navigation type and visibility
|
|
794
792
|
const isPageVisible = (page) => {
|
|
795
|
-
// Always exclude special pages (header/footer are already separated)
|
|
796
|
-
if (page.route.startsWith('/@')) return false
|
|
797
|
-
|
|
798
793
|
// Always exclude dynamic route template pages (e.g., /blog/:slug)
|
|
799
794
|
// These are templates for generating pages, not actual navigable pages
|
|
800
795
|
if (page.route.includes(':')) return false
|