refactor(v2): merge linkify function used in blog and docs and align properties (#4402)

* refactor(v2): merge linkify function used in blog and docs

* refactor(v2): rename docsDirPath and docsDirPathLocalized ad update types

* refactor(v2): rename blogPostsBySource and update types

* improve replaceMarkdownLinks api

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
Armano 2021-03-12 15:11:08 +01:00 committed by GitHub
parent bfe52cdae3
commit 2f53b1a895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 240 additions and 237 deletions

View file

@ -254,7 +254,7 @@ describe('simple website', () => {
sidebar: 'docs',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, currentVersion.docsDirPath)),
posixPath(path.relative(siteDir, currentVersion.contentPath)),
'hello.md',
),
title: 'Hello, World !',
@ -276,7 +276,7 @@ describe('simple website', () => {
sidebar: 'docs',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, currentVersion.docsDirPath)),
posixPath(path.relative(siteDir, currentVersion.contentPath)),
'foo',
'bar.md',
),
@ -424,7 +424,7 @@ describe('versioned website', () => {
slug: '/foo/barSlug',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, currentVersion.docsDirPath)),
posixPath(path.relative(siteDir, currentVersion.contentPath)),
'foo',
'bar.md',
),
@ -446,7 +446,7 @@ describe('versioned website', () => {
slug: '/',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, currentVersion.docsDirPath)),
posixPath(path.relative(siteDir, currentVersion.contentPath)),
'hello.md',
),
title: 'hello',
@ -467,7 +467,7 @@ describe('versioned website', () => {
slug: '/',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, version101.docsDirPath)),
posixPath(path.relative(siteDir, version101.contentPath)),
'hello.md',
),
title: 'hello',
@ -488,7 +488,7 @@ describe('versioned website', () => {
slug: '/foo/baz',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, version100.docsDirPath)),
posixPath(path.relative(siteDir, version100.contentPath)),
'foo',
'baz.md',
),
@ -649,7 +649,7 @@ describe('versioned website (community)', () => {
slug: '/team',
source: path.posix.join(
'@site',
posixPath(path.relative(siteDir, version100.docsDirPath)),
posixPath(path.relative(siteDir, version100.contentPath)),
'team.md',
),
title: 'team',