"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.cleanUrlPlugin=void0;constcleanUrlPlugin=({normalSuffix="",indexSuffix="/",notFoundPath="/404.html",})=>({name:"clean-url",extendPageData(page){const{regularPath,frontmatter={}}=page;if(!frontmatter.permalink){if(regularPath==="/404.html")// path for 404 pagepage.path=notFoundPath;elseif(regularPath.endsWith(".html"))// normal path// e.g. foo/bar.md -> foo/bar.htmlpage.path=`${regularPath.slice(0,-5)}${normalSuffix}`;elseif(regularPath.endsWith("/"))// index path// e.g. foo/index.md -> foo/page.path=`${regularPath.slice(0,-1)}${indexSuffix}`;}},});exports.cleanUrlPlugin=cleanUrlPlugin;//# sourceMappingURL=clean-url.js.map