Skip to content

Commit

Permalink
Improved generators
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Nov 23, 2024
1 parent c82ba03 commit d733dec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `pidoc` Changelog

## 0.19.0 (tbd)
## 0.18.4 (tbd)

- Fixed path issue with React generator
- Updated to latest version of Piral
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/generators/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { parseMeta } = require('../markdown');
const { generatePage } = require('../pages');
const { getDocsFrom, getName, getTitle, makeFileFilter } = require('../utils');

const rx = /^<!--\n(.*?)\n-->/s;
const rx = /^<!--\n(.*?)\n-->/ms;

function getRoute(basePath, name) {
return (name && `${basePath}/${name}`) || '';
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/tools/generators/react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { readFileSync } = require('fs');
const { resolve, relative } = require('path');
const { parseMeta } = require('../markdown');
const { generated } = require('../constants');
const { parseMeta } = require('../markdown');
const { generatePage } = require('../pages');
const { getDocsFrom, getName, getTitle, makeFileFilter } = require('../utils');

Expand Down Expand Up @@ -60,6 +60,6 @@ exports.build = function (entry, options) {
</PageContent>
</PageLayout>
`;

return generatePage(name, pageMeta, `${prefix}-${name}.${locale}`, head, body, route, pageMeta.title, pageMeta.section, meta);
return generatePage(name, pageMeta, `${prefix}-${name}.${locale}`, head, body, route, pageMeta.title, pageMeta.section, undefined, meta);
};

0 comments on commit d733dec

Please sign in to comment.