mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
ESLintify Part 3 (#846)
* ESLintify Part 3 * ESLintify Part 3 * ESLintify Part 3
This commit is contained in:
parent
5ac2cee658
commit
a7a214fb3a
54 changed files with 435 additions and 497 deletions
|
@ -8,10 +8,10 @@
|
|||
const Feed = require('feed');
|
||||
|
||||
const CWD = process.cwd();
|
||||
const siteConfig = require(CWD + '/siteConfig.js');
|
||||
const siteConfig = require(`${CWD}/siteConfig.js`);
|
||||
const readMetadata = require('./readMetadata.js');
|
||||
|
||||
const blogRootURL = siteConfig.url + siteConfig.baseUrl + 'blog';
|
||||
const blogRootURL = `${siteConfig.url + siteConfig.baseUrl}blog`;
|
||||
const siteImageURL =
|
||||
siteConfig.url + siteConfig.baseUrl + siteConfig.headerIcon;
|
||||
const utils = require('../core/utils');
|
||||
|
@ -27,11 +27,10 @@ module.exports = function(type) {
|
|||
const MetadataBlog = require('../core/MetadataBlog.js');
|
||||
|
||||
const feed = new Feed({
|
||||
title: siteConfig.title + ' Blog',
|
||||
description:
|
||||
'The best place to stay up-to-date with the latest ' +
|
||||
siteConfig.title +
|
||||
' news and events.',
|
||||
title: `${siteConfig.title} Blog`,
|
||||
description: `The best place to stay up-to-date with the latest ${
|
||||
siteConfig.title
|
||||
} news and events.`,
|
||||
id: blogRootURL,
|
||||
link: blogRootURL,
|
||||
image: siteImageURL,
|
||||
|
@ -40,7 +39,7 @@ module.exports = function(type) {
|
|||
});
|
||||
|
||||
MetadataBlog.forEach(post => {
|
||||
const url = blogRootURL + '/' + post.path;
|
||||
const url = `${blogRootURL}/${post.path}`;
|
||||
const content = utils.blogPostHasTruncateMarker(post.content)
|
||||
? utils.extractBlogPostBeforeTruncate(post.content)
|
||||
: utils.extractBlogPostSummary(post.content.trim());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue