Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ng-projects/scullyDocs/src/assets/scully-routes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"route": "/"},
{"route": "/docs/blog", "title": "Adding Blog Support", "order": 600, "sourceFile": "blog.md"},
{"route": "/docs/blog", "title": "Create a blog", "order": 600, "sourceFile": "blog.md"},
{
"route": "/docs/CODE_OF_CONDUCT",
"title": "Code of Conduct",
Expand Down Expand Up @@ -29,6 +29,12 @@
"order": 100,
"sourceFile": "pre-requisites.md"
},
{
"route": "/docs/pre-requisites_es",
"title": "Requisitos previos",
"order": 100,
"sourceFile": "pre-requisites_es.md"
},
{
"route": "/docs/recommended-plugins",
"title": "List of Plugins",
Expand Down
8 changes: 5 additions & 3 deletions scully/renderPlugins/puppeteerRenderPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ const errorredPages = new Set<string>();

let version = '0.0.0';
try {
const {version: pkgVersion} = jsonc.parse(readFileSync(join(__dirname, '../package.json')).toString());
version = pkgVersion || '0.0.0';
} catch {}
version = jsonc.parse(readFileSync(join(__dirname, '../package.json')).toString()).version || '0.0.0';
} catch {
// this is only for internals builds
version = jsonc.parse(readFileSync(join(__dirname, '../../../package.json')).toString()).version || '0.0.0';
}

export const puppeteerRender = async (route: HandledRoute): Promise<string> => {
const timeOutValueInSeconds = 25;
Expand Down