Skip to content

Commit

Permalink
allow readme/index.md for pages dir index (ionic-team#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
camwiegert authored Jun 12, 2019
1 parent 3f7394e commit e9a9381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build-pages/page-types/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getMarkdownPaths = (cwd: string): Promise<string[]> =>

export const toPage = async (path: string) => {
return {
path: path.replace(PAGES_DIR, '/docs').replace(/\.md$/, ''),
path: path.replace(PAGES_DIR, '/docs').replace(/(\/(index|readme))\.md$/i, ''),
github: await getGitHubData(path),
...renderMarkdown(await readMarkdown(path))
};
Expand Down

0 comments on commit e9a9381

Please sign in to comment.