Comparing version 0.0.1 to 0.0.2
@@ -0,1 +1,4 @@ | ||
// Shamelessly copied from nico: | ||
// https://github.com/lepture/nico/blob/master/lib/sdk/encode.js | ||
exports.uri = function(text) { | ||
@@ -2,0 +5,0 @@ text = text.replace(/<\/?[^>]*>/g, ''); |
@@ -0,1 +1,4 @@ | ||
// Shamelessly copied from nico: | ||
// https://github.com/lepture/nico/blob/master/lib/sdk/highlight.js | ||
var format = require('util').format; | ||
@@ -12,7 +15,2 @@ var hl = require('highlight.js'); | ||
}; | ||
try { | ||
var rs = require('robotskirt'); | ||
escape = rs.houdini.escapeHTML; | ||
} catch (e) { | ||
} | ||
@@ -19,0 +17,0 @@ exports.render = function(code, language) { |
@@ -0,1 +1,3 @@ | ||
// Shamelessly copied from nico: | ||
// https://github.com/lepture/nico/blob/master/lib/sdk/markdown/marked.js | ||
var markit = require('markit') | ||
@@ -2,0 +4,0 @@ var format = require('util').format |
@@ -35,3 +35,3 @@ var fs = require('fs') | ||
this.url = '/' + (this.path.indexOf('/') >= 0 ? path.dirname(this.path) : '') | ||
this.url = '/' + (this.path.indexOf(path.sep) >= 0 ? path.dirname(this.path) : '') | ||
@@ -38,0 +38,0 @@ this.dest = path.join(this.site.dest, this.path.replace(/\.\w+$/, '.html')) |
@@ -49,3 +49,3 @@ var yaml = require('js-yaml') | ||
var parentFolders = path.relative(this.site.cwd, path.dirname(fpath)) | ||
this.categories = _.without(parentFolders.split('/'), '_posts', '_drafts') | ||
this.categories = _.without(parentFolders.split(path.sep), '_posts', '_drafts') | ||
} | ||
@@ -72,3 +72,3 @@ } | ||
title: this.slug, | ||
categories: this.categories ? this.categories.join('/') : '' | ||
categories: this.categories ? this.categories[0] : '' | ||
} | ||
@@ -75,0 +75,0 @@ |
@@ -25,2 +25,3 @@ | ||
// Shamepless copied from component the manager: | ||
// https://github.com/component/component/blob/master/lib/utils.js | ||
@@ -27,0 +28,0 @@ |
{ | ||
"name": "darko", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"dependencies": { | ||
@@ -17,5 +17,5 @@ "liquid-node": "~0.1.2", | ||
"bin": { | ||
"darko": "bin/darko.js", | ||
"darko-build": "bin/darko-build.js", | ||
"darko-serve": "bin/darko-serve.js" | ||
"darko": "bin/darko", | ||
"darko-build": "bin/darko-build", | ||
"darko-serve": "bin/darko-serve" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -19,6 +19,8 @@ # Darko | ||
- Well, most of Jekyll special filters are not implemented in Darko yet. | ||
- Most of Jekyll special filters are implemented in Darko now. | ||
- See [this list](http://jekyllrb.com/docs/templates/). | ||
- I've got markdownify working though, yay. | ||
- But I've left out textilize. | ||
Tags like post_url are not ready yet. Give me a nudge if you need those. | ||
## Try | ||
@@ -81,1 +83,15 @@ | ||
来说,他们应该不介意直接用 Jekyll 本身。我搞定 80% 就好。 | ||
## Tribute | ||
### nico | ||
The markdown and syntax highlighting part of code are shamelessly copied from | ||
@lepture's static site generator, [nico](https://github.com/lepture/nico). | ||
@lepture's one of my Node.js hero. | ||
### component, commander.js, and others | ||
`util.log`, `util.error`, `util.fatal`, and `util.warn` are all copied from | ||
[component](https://github.com/component/component) the package manager by TJ. |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
89957
96
8
0
1051