New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blog-engine-sac

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blog-engine-sac - npm Package Compare versions

Comparing version 5.6.0 to 5.7.0

2

package.json
{
"name": "blog-engine-sac",
"version": "5.6.0",
"version": "5.7.0",
"description": "static site generator, that uses markdown files as input and outputs web pages",

@@ -5,0 +5,0 @@ "license": "CC0-1.0",

@@ -65,6 +65,6 @@ export { processPost, processExternalPost, supportedFormats, getDetailsFromPost };

const { src } = post;
let contentType;
let contentType = post['Content-Type'];
return fetch(src).then(response => {
if (response.ok) {
contentType = response.headers.get(`Content-Type`);
contentType = contentType || response.headers.get(`Content-Type`);
return response.text();

@@ -161,4 +161,4 @@ }

const extension = extname(fullPath).substr(1);
if (!supportedFormats.includes(extension) && extension !== ``) {
console.warn(`File format from ${fullPath} is ${extension} and not recognized.
if (!supportedFormats.includes(extension)) {
console.warn(`File format from ${fullPath} is ${extension} extension and not recognized.
Use one of ${supportedFormats.join(`, `)} instead.`);

@@ -165,0 +165,0 @@ }

@@ -6,4 +6,10 @@ /* stats.birthtime, can be later than modified date

export { buildSite };
import { textFileContent, writeTextInFile, namesInDirectory } from "filesac";
import slugify from "@sindresorhus/slugify";
import url from "url";
import { load } from '@grossacasacs/left-phalange';
import markdownModule from "markdown";
const { markdown } = markdownModule;
import { generateTags, wordCount, setFinalTags } from "./tags.js";

@@ -17,9 +23,4 @@ import { niceDateString, normalizeDate } from "./dates.js";

import { dirname, parse as parsePath } from "path";
import url from "url";
import { load } from '@grossacasacs/left-phalange';
import {indexFileName} from "../html/links.js";
import markdownModule from "markdown";
const { markdown } = markdownModule;

@@ -38,3 +39,2 @@ import { createPostHtml } from "../html/post.html.js";

const defaultOptionsSource = `${__dirname}/../defaultSettings/default-blog-engine-sac`;
const userOptionsSource = `./blog-engine-sac`;

@@ -45,2 +45,3 @@ const postsPath = `./source/`;

const footerSource = `${postsPath}/extras/footer.md`;
// output

@@ -178,6 +179,6 @@ const builtBlog = `./result`;

const sourceFileNames2 = sourceFileNames.map((file) => {
const sourceFilesPath = sourceFileNames.map((file) => {
return `${postsPath}${file}`;
});
const detailedSources = sourceFileNames2.map(getDetailsFromPost);
const detailedSources = sourceFilesPath.map(getDetailsFromPost);

@@ -184,0 +185,0 @@ /* pass this array so that processPost can use meta information of previous posts*/

@@ -6,2 +6,3 @@ export { processMetaFile };

const processMetaFile = async (detailedSource) => {
// hanldes files without src (src is another file with same base name)
const { title, extension, postFilePath, fullPath, base } = detailedSource;

@@ -8,0 +9,0 @@ if (!supportedFormats.includes(extension)) {

@@ -6,3 +6,3 @@ export { processPostAsMD, formatMD };

const formatMD = [`md`];
const formatMD = [`md`, `markdown`];
const processPostAsMD = function (post) {

@@ -9,0 +9,0 @@ const { content } = post;

@@ -17,3 +17,3 @@ export { processPostAsMulti, formatMulti };

}
const { src } = postObject;
const { src, ...rest } = postObject;
if (!src) {

@@ -24,5 +24,5 @@ return;

// open from file
return processPost(getDetailsFromPost(src), detailedFiles, metas, commonOptions);
return processPost({...rest, ...getDetailsFromPost(src)}, detailedFiles, metas, commonOptions);
}
return processExternalPost({ ...post, src });
return processExternalPost({ ...post, ...postObject });
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc