Skip to content

Commit

Permalink
Merge pull request #342 from gilbitron/ryanlelek-20210204-dependencies
Browse files Browse the repository at this point in the history
Dependencies: Upgrading packages
  • Loading branch information
ryanlelek authored Feb 4, 2021
2 parents 2933534 + f3720a0 commit eec90e5
Show file tree
Hide file tree
Showing 6 changed files with 3,293 additions and 2,991 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"semi": 0,
"no-path-concat": 1,
"no-undef": 2,
"no-unused-vars": 2
"no-unused-vars": 2,
"no-var": 0
}
}
2 changes: 1 addition & 1 deletion app/core/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function processFile (config, activePageSlug, contentDir, filePath) {
let dirMetadata = {};
try {
const metaFile = await fs.readFile(path.join(contentDir, shortPath, 'meta'));
dirMetadata = contentProcessors.cleanObjectStrings(yaml.safeLoad(metaFile.toString('utf-8')));
dirMetadata = contentProcessors.cleanObjectStrings(yaml.load(metaFile.toString('utf-8')));
} catch (e) {
if (config.debug) {
console.log('No meta file for', contentDir + shortPath);
Expand Down
2 changes: 1 addition & 1 deletion app/functions/contentProcessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function processMeta (markdownContent) {
case _metaRegexYaml.test(markdownContent):
metaArr = markdownContent.match(_metaRegexYaml);
metaString = metaArr ? metaArr[1].trim() : '';
yamlObject = yaml.safeLoad(metaString);
yamlObject = yaml.load(metaString);
meta = cleanObjectStrings(yamlObject);
break;

Expand Down
2 changes: 1 addition & 1 deletion app/functions/create_meta_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function create_meta_info (meta_title, meta_description, meta_sort) {
if (meta_description) { yamlDocument.Description = meta_description; }
if (meta_sort) { yamlDocument.Sort = parseInt(meta_sort, 10); }

return '---\n' + yaml.safeDump(yamlDocument) + '---\n';
return '---\n' + yaml.dump(yamlDocument) + '---\n';
} else {
return '---\n---\n';
}
Expand Down
Loading

0 comments on commit eec90e5

Please sign in to comment.