website: resolve unlinked content, add check (#1157)
* website: add back unlinked pages to match previous state * website: add unlinked content check
This commit is contained in:
1 parent
727d1c7085
commit
0ffcbb35b5
5 files changed
+308
-1
No files matched your search
@@ -3,8 +3,16 @@ import DocsPage from '@hashicorp/react-docs-page'
|
||||
import {
|
||||
generateStaticPaths,
|
||||
generateStaticProps,
|
||||
} from '@hashicorp/react-docs-page/server'
|
||||
} from 'components/_temp-enable-hidden-pages'
|
||||
|
||||
/**
|
||||
* DEBT: short term patch for "hidden" docs-sidenav items.
|
||||
* See components/_temp-enable-hidden-pages for details.
|
||||
* Revert to importing from @hashicorp/react-docs-page/server
|
||||
* once https://app.asana.com/0/1100423001970639/1200197752405255/f
|
||||
* is complete.
|
||||
**/
|
||||
const NAV_DATA_FILE_HIDDEN = 'data/docs-nav-data-hidden.json'
|
||||
const NAV_DATA_FILE = 'data/docs-nav-data.json'
|
||||
const CONTENT_DIR = 'content/docs'
|
||||
const basePath = 'docs'
|
||||
@@ -24,6 +32,7 @@ export async function getStaticPaths() {
|
||||
fallback: false,
|
||||
paths: await generateStaticPaths({
|
||||
navDataFile: NAV_DATA_FILE,
|
||||
navDataFileHidden: NAV_DATA_FILE_HIDDEN,
|
||||
localContentDir: CONTENT_DIR,
|
||||
}),
|
||||
}
|
||||
@@ -33,6 +42,7 @@ export async function getStaticProps({ params }) {
|
||||
return {
|
||||
props: await generateStaticProps({
|
||||
navDataFile: NAV_DATA_FILE,
|
||||
navDataFileHidden: NAV_DATA_FILE_HIDDEN,
|
||||
localContentDir: CONTENT_DIR,
|
||||
product: { name: productName, slug: productSlug },
|
||||
params,
|
||||
|
||||
Reference in new issue
Block a user