Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
Rename .path -> .route in README.md
Browse files Browse the repository at this point in the history
The proper property is `.route`.
  • Loading branch information
JoshTheDerf authored Jun 7, 2018
1 parent 7da8757 commit 995aebc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ module.exports = {
// }
postProcess (renderedRoute) {
// Ignore any redirects.
renderedRoute.path = renderedRoute.originalPath
renderedRoute.route = renderedRoute.originalPath
// Basic whitespace removal. (Don't use this in production.)
renderedRoute.html = renderedRoute.html.split(/>[\s]+</gmi).join('><')
// Remove /index.html from the output path if the dir name ends with a .html file extension.
// For example: /dist/dir/special.html/index.html -> /dist/dir/special.html
if (renderedRoute.path.endsWith('.html')) {
renderedRoute.outputPath = path.join(__dirname, 'dist', renderedRoute.path)
if (renderedRoute.route.endsWith('.html')) {
renderedRoute.outputPath = path.join(__dirname, 'dist', renderedRoute.route)
}

return renderedRoute
Expand Down Expand Up @@ -321,8 +321,8 @@ You are expected to adjust those properties as needed, then return the context o
postProcess(context) {
// Remove /index.html from the output path if the dir name ends with a .html file extension.
// For example: /dist/dir/special.html/index.html -> /dist/dir/special.html
if (context.path.endsWith('.html')) {
context.outputPath = path.join(__dirname, 'dist', context.path)
if (context.route.endsWith('.html')) {
context.outputPath = path.join(__dirname, 'dist', context.route)
}

return context
Expand Down

0 comments on commit 995aebc

Please sign in to comment.