Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
enfield
Advanced tools
Changelog
Version 0.4.0
pygments
is set to false
config
parameter for converter.convert
APIdate_to_rfc822
filter present in JekyllReadme
Jekyll-like static site generator for node.js that aims to be as compatible as possible with Jekyll.
Core functionality is identical to Jekyll:
/example/
from /example.html
via pretty_urls
configuration variable)There are a few bonus features not present in the default install of Jekyll:
Finally, there are a few missing features:
Generated directly from enfield --help
Enfield is a blog-aware static-site generator modeled after Jekyll
Commands:
build Build your site
help Display global or [command] help documentation.
new Creates a new Jekyll site scaffold in PATH
serve Serve your site locally
Global Options:
-s, --source [DIR]
Source directory (defaults to ./)
-d, --destination [DIR]
Destination directory (defaults to ./_site)
--safe
Safe mode (defaults to false)
--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]
Plugins directory (defaults to ./_plugins)
--layouts
Layouts directory (defaults to ./_layouts)
-h, --help
Display help documentation
-v, --version
Display version information
Enfield will load any .coffee
or .js
file from the _plugins
directory.
The plugin system is modeled after Jekyll Plugins.
The following plugin types are supported:
Custom converters can be added. Note that only items with YAML frontmatter will be converted. All others are ignored.
module.exports = {
"converters": {
"foo": {
"priority": 1,
"matches": function(ext) {
return ext === ".foo";
},
"outputExtension": function(ext) {
return ".html";
},
"convert": function(content, config, callback) {
// Return converted value via callback(err, content)
callback(null, content.replace("foo", ""));
}
}
}
}
Valid priority values: 1 (lowest) - 5 (highest)
Custom Liquid Filters can be added:
module.exports = {
"filters": {
"upcase": function(val) {
return val.toUpperCase();
},
"lowercase": function(val) {
return val.toLowerCase();
}
}
}
module.exports = {
"tags": {
"mytag": function(body, page, site) {
// Body is the content string within the tag
// Page is the object of the current page being converted
// Site is the same data structure passed to liquid templates
// (see generators below)
return "Hello World";
}
}
}
Generators are used to create additional content for your site based on custom logic.
module.exports = {
"generators": {
"bar": function(site, callback) {
// Same data structure as passed to Liquid templates. Including:
// - site.posts
// - site.pages
// - site.tags
// - site.categories
// - site.static_files
// Make sure to callback when you're done
callback(null);
}
}
}
See src/plugins/enfield-generators.coffee
for examples.
MIT
Richard Enfield is a minor character in The Strange Case of Dr. Jekyll and Mr. Hyde.
FAQs
Jekyll-like blog engine for node.js
The npm package enfield receives a total of 8 weekly downloads. As such, enfield popularity was classified as not popular.
We found that enfield demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.