blog-engine-sac
Advanced tools
Comparing version 5.7.0 to 5.8.0
export { makeBackGroundPicture }; | ||
import { standard, small} from "../source/media/image/scaleImage.js" | ||
const makeBackGroundPicture = (name) => { | ||
return `<picture class="position-relative"> | ||
<source srcset="/images/${name}.jpg" media="(min-width: 992px)"> | ||
<img class="w100 hauto" src="/images/${name}-s.jpg" alt=""> | ||
<source srcset="/images/${name}.jpg" media="(min-width: 1392px)"> | ||
<source srcset="/images/${name}-${standard}.jpg" media="(min-width: 992px)"> | ||
<img alt="" src="/images/${name}-${small}.jpg" class="w100 hauto"> | ||
</picture>`; | ||
}; |
{ | ||
"name": "blog-engine-sac", | ||
"version": "5.7.0", | ||
"version": "5.8.0", | ||
"description": "static site generator, that uses markdown files as input and outputs web pages", | ||
@@ -26,3 +26,4 @@ "license": "CC0-1.0", | ||
"node-html-parser": "^1.3.1", | ||
"rollup": "^2.32.0" | ||
"rollup": "^2.32.0", | ||
"sharp": "^0.26.2" | ||
}, | ||
@@ -29,0 +30,0 @@ "devDependencies": { |
@@ -12,7 +12,14 @@ # [Blog-engine-sac](https://gitlab.com/GrosSacASac/blog-engine-z) | ||
3. Create a valid package.json file with `npm init` for example | ||
4. Run the command [`npm i blog-engine-sac --ignore-scripts`](https://www.npmjs.com/package/blog-engine-sac) | ||
5. add script `"sac": "node node_modules/blog-engine-sac/source/main.js"` inside package.json | ||
4. Run the command [`npm i blog-engine-sac`](https://www.npmjs.com/package/blog-engine-sac) | ||
5. add scripts inside package.json | ||
```json | ||
"scripts": { | ||
"sac": "node node_modules/blog-engine-sac/source/main.js", | ||
"scaleImages": "node node_modules/blog-engine-sac/source/media/image/scaleImageCli.js" | ||
} | ||
``` | ||
5. follow instructions below to create required files | ||
6. `npm run sac` | ||
7. to view the results use a static file server | ||
7. `npm run scaleImages` | ||
8. to view the results use a static file server | ||
@@ -47,3 +54,3 @@ ### Create a new post | ||
Create a file that describes where to find the external post. For example js-style-guide.json | ||
Create a file that describes where to find the external post. For example js-style-guide.json . Including a post from the web: Add a json file in `source/` with `src` set to the url. | ||
@@ -56,10 +63,9 @@ ```json | ||
#### Including a post from the web | ||
Another Example with this readme file: | ||
Alternative is to add a json file in `source/` with `src` set to the url. Example with this readme file: | ||
```json | ||
{ | ||
"src": "https://gitlab.com/GrosSacASac/blog-engine-z/-/raw/master/README.md", | ||
"lang:": "en" | ||
"lang:": "en", | ||
"Content-Type": "text/markdown" | ||
} | ||
@@ -66,0 +72,0 @@ ``` |
@@ -160,3 +160,3 @@ export { processPost, processExternalPost, supportedFormats, getDetailsFromPost }; | ||
const extension = extname(fullPath).substr(1); | ||
if (!supportedFormats.includes(extension)) { | ||
if (!supportedFormats.includes(extension) && extension !== ``) { | ||
console.warn(`File format from ${fullPath} is ${extension} extension and not recognized. | ||
@@ -163,0 +163,0 @@ Use one of ${supportedFormats.join(`, `)} instead.`); |
@@ -0,0 +0,0 @@ export { consoleOutputEarly, consoleOutputReady }; |
@@ -0,0 +0,0 @@ export { isLocalUrl }; |
Sorry, the diff of this file is too big to display
497066
45
12436
165
12
+ Addedsharp@^0.26.2
+ Addedansi-regex@2.1.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedarray-flatten@3.0.0(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcolor@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddecompress-response@4.2.16.0.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddetect-libc@1.0.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmimic-response@2.1.03.1.0(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addednode-abi@2.30.1(transitive)
+ Addednode-addon-api@3.2.1(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprebuild-install@6.1.4(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@2.3.83.6.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsharp@0.26.3(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.14.0.1(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtar-fs@2.1.2(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwide-align@1.1.5(transitive)