Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Commit

Permalink
feat($core): enable .html suffix by default
Browse files Browse the repository at this point in the history
This change respects Yuque's convention
  • Loading branch information
ulivz committed Feb 8, 2019
1 parent 4a22650 commit 9a5167f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
// repoUrl: 'https://www.yuque.com/ant-design/course',
home: {
actionText: 'Getting Started →',
actionLink: '/intro/',
actionLink: '/intro.html',
heroImage: 'https://cdn.nlark.com/yuque/0/2019/png/242808/1549571925285-2372b0a0-0234-421c-a139-00ea16f1a106.png',
footer: `Copyright © ULIVZ`,
features: [
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module.exports = (opts, ctx) => {
? postContent
: `# ${title} \n\n ${postContent}`

const permalink = `/${slug}/`
const permalink = `/${slug}.html`
await ctx.addPage({
content,
frontmatter,
Expand Down
4 changes: 2 additions & 2 deletions lib/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function getLeaf({
title,
slug
}) {
return [`/${slug}/`, title]
return [`/${slug}.html`, title]
}

/**
Expand All @@ -141,7 +141,7 @@ function getBranch({
children: []
}
if (slug && slug !== '#') {
group.path = `/${slug}/`
group.path = `/${slug}.html`
}
return group
}
Expand Down

0 comments on commit 9a5167f

Please sign in to comment.