mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 12:52:31 +02:00
feat(v2): add support for front matter id in blog (#1666)
This commit is contained in:
parent
05b28b5520
commit
ff105bf774
1 changed files with 2 additions and 2 deletions
|
@ -80,12 +80,12 @@ module.exports = function(context, opts) {
|
||||||
const {frontMatter, excerpt} = parse(fileString);
|
const {frontMatter, excerpt} = parse(fileString);
|
||||||
|
|
||||||
blogPosts.push({
|
blogPosts.push({
|
||||||
id: blogFileName,
|
id: frontMatter.id || blogFileName,
|
||||||
metadata: {
|
metadata: {
|
||||||
permalink: normalizeUrl([
|
permalink: normalizeUrl([
|
||||||
baseUrl,
|
baseUrl,
|
||||||
routeBasePath,
|
routeBasePath,
|
||||||
fileToUrl(blogFileName),
|
frontMatter.id || fileToUrl(blogFileName),
|
||||||
]),
|
]),
|
||||||
source,
|
source,
|
||||||
description: frontMatter.description || excerpt,
|
description: frontMatter.description || excerpt,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue