Browse Source

added twitter cards and img detail for cards, cards use the details:img tag. Close #6

master
Sean Clarke 7 months ago
parent
commit
a08fed5da9
9 changed files with 629 additions and 20 deletions
  1. +12
    -2
      app.js
  2. +50
    -2
      model/Post.js
  3. +552
    -10
      package-lock.json
  4. +3
    -1
      package.json
  5. +7
    -5
      partials/header.html
  6. +0
    -0
      web/img/logo.PNG
  7. BIN
      web/img/posts/desktop.png
  8. +0
    -0
      web/img/profile.PNG
  9. +5
    -0
      web/main.css

+ 12
- 2
app.js View File

@@ -1,5 +1,6 @@
var fs = require('fs');
var mkdirp = require('mkdirp-sync');
var copydir = require('copy-dir');

// Models
var Post = require('./model/Post');
@@ -15,6 +16,7 @@ if(!fs.existsSync(site)){
fs.mkdirSync(site + '/css');
fs.mkdirSync(site + '/js');
fs.mkdirSync(site + '/img');
fs.mkdirSync(site + '/img/posts');
}

var allPosts = new Listing();
@@ -80,14 +82,22 @@ fs.copyFile('web/main.js', site + '/js/main.js', (err) => {
if (err) throw err;
console.log('main.js was copied to the _site/js directory');
});
fs.copyFile('web/logo.PNG', site + '/img/logo.PNG', (err) => {
fs.copyFile('web/img/logo.PNG', site + '/img/logo.PNG', (err) => {
if (err) throw err;
console.log('logo.PNG was copied to the _site/img directory');
});
fs.copyFile('web/profile.PNG', site + '/img/profile.PNG', (err) => {
fs.copyFile('web/img/profile.PNG', site + '/img/profile.PNG', (err) => {
if (err) throw err;
console.log('profile.PNG was copied to the _site/img directory');
});
copydir.sync('web/img/posts', site + '/img/posts', {
utimes: true, // keep add time and modify time
mode: true, // keep file mode
cover: true // cover file when exists, default is true
}, function(err) {
if (err) throw err;
console.log('posts/* was copied to the _site/img/posts directory');
});
fs.copyFile('web/favicon.ico', site + '/favicon.ico', (err) => {
if (err) throw err;
console.log('favicon.ico was copied to the _site directory');


+ 50
- 2
model/Post.js View File

@@ -15,8 +15,11 @@ var Post = function(data){

// html url
var html = this.name.split('.')[0] + '.html';
var img = this.name.split('.')[0] + '.png';
this.url = '/posts/' + this.year + '/' + this.name.split('.')[0];
this.html = process.cwd() + '/_site/posts/' + this.year + '/'+ html;
// Image for twitter card etc.
this.img = process.cwd() + '/_site/img/posts/' + img;
// this.url = 'posts/' + this.year + '/' + this.month + '/'+ html;
// this.html = process.cwd() + '/_site/posts/' + this.year + '/' + this.month + '/'+ html;
};
@@ -48,9 +51,12 @@ Post.prototype.getPost = function(){
}

Post.prototype.build = function(){
var html = fs.readFileSync(process.cwd() + '/partials/header.html', 'utf8');
// adding back button
var html = this.header();
// Old way with the partial - kept for emergencies.
// var html = fs.readFileSync(process.cwd() + '/partials/header.html', 'utf8');
// adding back button and home button
html += '<a id="back" title="⬅️ Back" href="#" onclick="back();return false;">⬅️ Back</a>\n';
html += '<a id="home" title="🏡 Home" href="https://snld.xyz">🏡 Home</a>\n';
html += convert.makeHtml(this.getPost());
html += fs.readFileSync(process.cwd() + '/partials/footer.html', 'utf8');

@@ -69,4 +75,46 @@ Post.prototype.generateListing = function(){
return html;
}

Post.prototype.header = function(){
var dets = this.getDetails();

// Image: at least 120×120 pixels and no more than 1MB

var html = `<!DOCTYPE html>\n
<html lang="en">\n
<head>\n
<meta charset="utf-8">\n
<title>snld: ` + dets.title + `</title>\n
<!-- Meta Data -->
<meta name="description" content="snld: The blog of Sean Clarke">\n
<meta name="author" content="Sean Clarke">\n
<meta name="twitter:card" content="summary">\n
<meta name="twitter:site" content="@iamseanland">\n
<meta name="twitter:title" content="` + dets.title + `">\n
<meta name="twitter:description" content="` + dets.desc + `">\n`;

if(dets.img) html += '<meta name="twitter:image" content="' + dets.img + '">\n';
else html += '<meta name="twitter:image" content="' + '/img/profile.PNG' + '">\n';

html += `<!-- Favicon -->\n
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">\n
<!-- Stylesheets -->\n
<!-- <link href="/css/main.css" rel="stylesheet"> -->\n
<link href="https://snld.xyz/css/main.css" rel="stylesheet"> <!-- Used for Testing -->\n
</head>\n
\n
<body>\n
<a href="https://snld.xyz">\n
<div id="header">\n
<img class="profile" src="/img/profile.PNG" />\n
<img class="logo" src="/img/logo.PNG" />\n
</div>\n
</a>\n
<div id="body">\n
`;

return html;

}

module.exports = Post;

+ 552
- 10
package-lock.json View File

@@ -1,9 +1,17 @@
{
"name": "build-a-blog",
"version": "0.1",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"abs": {
"version": "1.3.13",
"resolved": "https://registry.npmjs.org/abs/-/abs-1.3.13.tgz",
"integrity": "sha512-VgsJF4AZDoxLwTRx+TlZ6gpHfSaRUcg1Vhyruqxzpr6lTmh3JMO9667AHAVUGHUD3Li9QqjX2WaTXR6pkGFU+Q==",
"requires": {
"ul": "^5.0.0"
}
},
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
@@ -36,6 +44,11 @@
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"capture-stack-trace": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
"integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw=="
},
"chmodr": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/chmodr/-/chmodr-1.2.0.tgz",
@@ -69,16 +82,80 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"copy-dir": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/copy-dir/-/copy-dir-1.2.0.tgz",
"integrity": "sha512-UeaUFUIHqGV4brjQ9bY2mHll/hoxyCak2emgmYG72LkGKABHBdBDKFw0H5nTKt5OzVBkBhkxCwnniJBAE7EGEw=="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"create-error-class": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
"integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
"requires": {
"capture-stack-trace": "^1.0.0"
}
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
"deffy": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.3.tgz",
"integrity": "sha512-c5JD8Z6V1aBWVzn1+aELL97R1pHCwEjXeU3hZXdigkZkxb9vhgFP162kAxGXl992TtAg0btwQyx7d54CqcQaXQ==",
"requires": {
"typpy": "^2.0.0"
}
},
"duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
"requires": {
"readable-stream": "^2.0.2"
}
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"err": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/err/-/err-1.1.1.tgz",
"integrity": "sha1-65KOLhGjFmSPeCgz0PlyWLpDwvg=",
"requires": {
"typpy": "^2.2.0"
}
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"requires": {
"is-arrayish": "^0.2.1"
}
},
"exec-limiter": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/exec-limiter/-/exec-limiter-3.2.12.tgz",
"integrity": "sha512-2Bj2X3UmPQHIPtYkDW5epEHn1aTtGxP30x8Be6IzXzQzyuavlOdKI4wT56iEt9UUfvI421AHAHHnV+lBIvCcVA==",
"requires": {
"limit-it": "^3.0.0",
"typpy": "^2.1.0"
}
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -92,11 +169,60 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"function.name": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/function.name/-/function.name-1.0.12.tgz",
"integrity": "sha512-C7Tu+rAFrWW5RjXqtKtXp2xOdCujq+4i8ZH3w0uz/xrYHBwXZrPt96x8cDAEHrIjeyEv/Jm6iDGyqupbaVQTlw==",
"requires": {
"noop6": "^1.0.1"
}
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"git-package-json": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/git-package-json/-/git-package-json-1.4.9.tgz",
"integrity": "sha512-F88a40RBqCS6S7layrE4LIhX5TIVYyUJRYxZjAPPLfCZu9zf0R5B3l3wIY8A7hFb3xAU6Df/AHVMoBQ9SaR1Jw==",
"requires": {
"deffy": "^2.2.1",
"err": "^1.1.1",
"gry": "^5.0.0",
"normalize-package-data": "^2.3.5",
"oargv": "^3.4.1",
"one-by-one": "^3.1.0",
"r-json": "^1.2.1",
"r-package-json": "^1.0.0",
"tmp": "0.0.28"
}
},
"git-source": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/git-source/-/git-source-1.1.9.tgz",
"integrity": "sha512-LRWKxFrt1lIrEAdRMrCk9sGbEYQdf3TwDe9pEwR8DMau+2dljQjqqwITJqhYIbA0TkFaxatOXzLhBWW89ZMO7w==",
"requires": {
"git-url-parse": "^5.0.1"
}
},
"git-up": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/git-up/-/git-up-1.2.1.tgz",
"integrity": "sha1-JkSAoAax2EJhrB/gmjpRacV+oZ0=",
"requires": {
"is-ssh": "^1.0.0",
"parse-url": "^1.0.0"
}
},
"git-url-parse": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-5.0.1.tgz",
"integrity": "sha1-/j15xnRq4FBIz6UIyB553du6OEM=",
"requires": {
"git-up": "^1.0.0"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -110,6 +236,44 @@
"path-is-absolute": "^1.0.0"
}
},
"got": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz",
"integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=",
"requires": {
"create-error-class": "^3.0.1",
"duplexer2": "^0.1.4",
"is-redirect": "^1.0.0",
"is-retry-allowed": "^1.0.0",
"is-stream": "^1.0.0",
"lowercase-keys": "^1.0.0",
"node-status-codes": "^1.0.0",
"object-assign": "^4.0.1",
"parse-json": "^2.1.0",
"pinkie-promise": "^2.0.0",
"read-all-stream": "^3.0.0",
"readable-stream": "^2.0.5",
"timed-out": "^3.0.0",
"unzip-response": "^1.0.2",
"url-parse-lax": "^1.0.0"
}
},
"gry": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/gry/-/gry-5.0.8.tgz",
"integrity": "sha512-meq9ZjYVpLzZh3ojhTg7IMad9grGsx6rUUKHLqPnhLXzJkRQvEL2U3tQpS5/WentYTtHtxkT3Ew/mb10D6F6/g==",
"requires": {
"abs": "^1.2.1",
"exec-limiter": "^3.0.0",
"one-by-one": "^3.0.0",
"ul": "^5.0.0"
}
},
"hosted-git-info": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
"integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg=="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -124,11 +288,62 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"is-redirect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ="
},
"is-retry-allowed": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz",
"integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg=="
},
"is-ssh": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz",
"integrity": "sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg==",
"requires": {
"protocols": "^1.1.0"
}
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"iterate-object": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/iterate-object/-/iterate-object-1.3.3.tgz",
"integrity": "sha512-DximWbkke36cnrSfNJv6bgcB2QOMV9PRD2FiowwzCoMsh8RupFLdbNIzWe+cVDWT+NIMNJgGlB1dGxP6kpzGtA=="
},
"limit-it": {
"version": "3.2.9",
"resolved": "https://registry.npmjs.org/limit-it/-/limit-it-3.2.9.tgz",
"integrity": "sha512-3cAf+D47VdMrrzLpV3wIyEHoAACc7FonHMz+I8onocXdnWD2zBeicse851NZ9TUeCEyuBM35Cx82mpdx1WLm2A==",
"requires": {
"typpy": "^2.0.0"
}
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@@ -138,6 +353,11 @@
"path-exists": "^3.0.0"
}
},
"lowercase-keys": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
"integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -147,15 +367,58 @@
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mkdirp-sync": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/mkdirp-sync/-/mkdirp-sync-0.0.3.tgz",
"integrity": "sha512-p3raJmGXoDqceIMqxAgx/DHesLkC+Ni+qTUpVIXuTuvvVcIihAbcTT68w68HHMqW5yEreNB1dl2EBm4TKtnLoQ=="
},
"node-status-codes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz",
"integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8="
},
"noop6": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/noop6/-/noop6-1.0.8.tgz",
"integrity": "sha512-+Al5csMVc40I8xRfJsyBcN1IbpyvebOuQmMfxdw+AL6ECELey12ANgNTRhMfTwNIDU4W9W0g8EHLcsb3+3qPFA=="
},
"normalize-package-data": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"requires": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
},
"oargv": {
"version": "3.4.9",
"resolved": "https://registry.npmjs.org/oargv/-/oargv-3.4.9.tgz",
"integrity": "sha512-24Eatdf7OGezTAU0Yw3HaoO9x+GTFnmBkuFHfWEQtVsIKbD7VMHhyIlDMtxxUxfZKPBPHYsTo8UgGwKr4ySewA==",
"requires": {
"iterate-object": "^1.1.0",
"ul": "^5.0.0"
}
},
"obj-def": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/obj-def/-/obj-def-1.0.7.tgz",
"integrity": "sha512-ahx1PnGDpovRglgczxsKtoYhPhrhYEG1rs3WklAHMTk29DyStqsrGDVISOIGZLF+ewK4m5CFZNuZXIXRQwZUMg==",
"requires": {
"deffy": "^2.2.2"
}
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -164,10 +427,24 @@
"wrappy": "1"
}
},
"one-by-one": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/one-by-one/-/one-by-one-3.2.7.tgz",
"integrity": "sha512-EFE5hyHMGPcesACi1tT6HRmMK23Q74ujX2gjhfGD9qMkz7CxD1AJd5TmBHIEEzuL7h7hKwWh9n9hJ5ClQJnO/Q==",
"requires": {
"obj-def": "^1.0.0",
"sliced": "^1.0.1"
}
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"p-limit": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
"integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"requires": {
"p-try": "^2.0.0"
}
@@ -185,6 +462,52 @@
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"package-json": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz",
"integrity": "sha1-DRW9Z9HLvduyyiIv8u24a8sxqLs=",
"requires": {
"got": "^5.0.0",
"registry-auth-token": "^3.0.1",
"registry-url": "^3.0.3",
"semver": "^5.1.0"
}
},
"package-json-path": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/package-json-path/-/package-json-path-1.0.8.tgz",
"integrity": "sha512-8OCXvm2TmEYoWC7e9AswLC0eoKY3RGbkupbiWa2vaTFaH4vEE3Kr+oeefLVm/7N4me2gYh5SjQYsdwAZLkL87g==",
"requires": {
"abs": "^1.2.1"
}
},
"package.json": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/package.json/-/package.json-2.0.1.tgz",
"integrity": "sha1-+IYFnSpJ7QduZIg2ldc7K0bSHW0=",
"requires": {
"git-package-json": "^1.4.0",
"git-source": "^1.1.0",
"package-json": "^2.3.1"
}
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"requires": {
"error-ex": "^1.2.0"
}
},
"parse-url": {
"version": "1.3.11",
"resolved": "https://registry.npmjs.org/parse-url/-/parse-url-1.3.11.tgz",
"integrity": "sha1-V8FUKKuKiSsfQ4aWRccR0OFEtVQ=",
"requires": {
"is-ssh": "^1.3.0",
"protocols": "^1.4.0"
}
},
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
@@ -195,6 +518,104 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "^2.0.0"
}
},
"prepend-http": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"protocols": {
"version": "1.4.7",
"resolved": "https://registry.npmjs.org/protocols/-/protocols-1.4.7.tgz",
"integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg=="
},
"r-json": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/r-json/-/r-json-1.2.9.tgz",
"integrity": "sha512-E5u25XBE7PpZmH5XwtthAmNvSLMTygDQMpcPtCTUBdvwPaqgIYJrxlRQJhG55Sgz7uC0Tuyh5nqNrsDT3uiefA=="
},
"r-package-json": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/r-package-json/-/r-package-json-1.0.8.tgz",
"integrity": "sha512-y+dKPLBYKcNMY8pNy+m8YLUqeGsEhhOu0wrqfu1yr8yGX+08CzMq2uUV5GSkGA21GcaIyt6lQAiSoD+DFf3/ag==",
"requires": {
"package-json-path": "^1.0.0",
"r-json": "^1.2.1"
}
},
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
}
},
"read-all-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz",
"integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=",
"requires": {
"pinkie-promise": "^2.0.0",
"readable-stream": "^2.0.0"
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"registry-auth-token": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz",
"integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==",
"requires": {
"rc": "^1.1.6",
"safe-buffer": "^5.0.1"
}
},
"registry-url": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz",
"integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=",
"requires": {
"rc": "^1.0.1"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -205,14 +626,32 @@
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"resolve": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
"integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
"requires": {
"path-parse": "^1.0.6"
}
},
"rimraf": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz",
"integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -226,6 +665,39 @@
"yargs": "^14.2"
}
},
"sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"spdx-correct": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
"integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
"requires": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-exceptions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
"integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA=="
},
"spdx-expression-parse": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
"requires": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-license-ids": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@@ -236,6 +708,14 @@
"strip-ansi": "^5.1.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -244,6 +724,68 @@
"ansi-regex": "^4.1.0"
}
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"timed-out": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz",
"integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc="
},
"tmp": {
"version": "0.0.28",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz",
"integrity": "sha1-Fyc1t/YU6nrzlmT6hM8N5OUV0SA=",
"requires": {
"os-tmpdir": "~1.0.1"
}
},
"typpy": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/typpy/-/typpy-2.3.11.tgz",
"integrity": "sha512-Jh/fykZSaxeKO0ceMAs6agki9T5TNA9kiIR6fzKbvafKpIw8UlNlHhzuqKyi5lfJJ5VojJOx9tooIbyy7vHV/g==",
"requires": {
"function.name": "^1.0.3"
}
},
"ul": {
"version": "5.2.14",
"resolved": "https://registry.npmjs.org/ul/-/ul-5.2.14.tgz",
"integrity": "sha512-VaIRQZ5nkEd8VtI3OYo5qNbhHQuBtPtu5k5GrYaKCmcP1H+FkuWtS+XFTSU1oz5GiuAg2FJL5ka8ufr9zdm8eg==",
"requires": {
"deffy": "^2.2.2",
"typpy": "^2.3.4"
}
},
"unzip-response": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz",
"integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4="
},
"url-parse-lax": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
"integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
"requires": {
"prepend-http": "^1.0.1"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"requires": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
}
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",


+ 3
- 1
package.json View File

@@ -1,6 +1,6 @@
{
"name": "build-a-blog",
"version": "0.1",
"version": "0.0.1",
"private": true,
"scripts": {
"build-site": "node app.js",
@@ -8,7 +8,9 @@
},
"dependencies": {
"chmodr": "^1.2.0",
"copy-dir": "^1.2.0",
"mkdirp-sync": "0.0.3",
"package.json": "^2.0.1",
"rimraf": "^3.0.0",
"showdown": "^1.9.1"
}


+ 7
- 5
partials/header.html View File

@@ -10,12 +10,14 @@
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Stylesheets -->
<!-- <link href="/css/main.css" rel="stylesheet"> -->
<link href="https://snld.xyz/css/main.css" rel="stylesheet"> <!-- Used for Testing -->
<link href="https://snld.xyz/css/main.css" rel="stylesheet"> <!-- Used for Testing -->
</head>

<body>
<div id="header">
<img class="profile" src="/img/profile.PNG" />
<img class="logo" src="/img/logo.PNG" />
</div>
<a href="https://snld.xyz">
<div id="header">
<img class="profile" src="/img/profile.PNG" />
<img class="logo" src="/img/logo.PNG" />
</div>
</a>
<div id="body">

web/logo.PNG → web/img/logo.PNG View File


BIN
web/img/posts/desktop.png View File

Before After
Width: 400  |  Height: 289  |  Size: 112 KiB

web/profile.PNG → web/img/profile.PNG View File


+ 5
- 0
web/main.css View File

@@ -85,3 +85,8 @@ a {
a#back {
margin-top: 8px;
}

a#home {
margin-top: 8px;
padding-left: 32px;
}

Loading…
Cancel
Save