在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:noflo/noflo-jekyll开源软件地址:https://github.com/noflo/noflo-jekyll开源编程语言:CoffeeScript 78.5%开源软件介绍:noflo-jekyllFlow-based reimplementation of the Jekyll static site generator. This provides several advantages for Node.js and especially NoFlo developers:
However, as with any reimplementation of a application being actively developed, there are also some potential caveats to observe. StructureNoFlo Jekyll has been implemented as a NoFlo graph. Most of the logic is handled by various existing NoFlo components, but there are also some places where implementing things as a custom component made sense. Over 85% of the codebase is completely reusable, however. Here is how the main flow looks like when visualized using NoFlo UI: You can find the main flow and the different subgraphs from the graphs folder. InstallationIf you want to use this as a command-line executable, then the easiest option is to install it globally with:
If you want to use it as a library inside a bigger application, then just install it as a dependency by:
Command-line usageSince this project aims for feature parity with Jekyll, the command-line usage is similar. To generate a site, run:
Usage in Node.js applicationsThe site generation graph can also be used as a library in Node.js applications. var Jekyll, generator;
Jekyll = require('noflo-jekyll').Jekyll;
// Prepare the site generator
generator = new Jekyll('source_dir', 'target_dir');
// Event handling
generator.on('start', function () {
console.log("Build started");
});
generator.on('error', console.error);
generator.on('end', function (end) {
var seconds = end.uptime / 1000;
console.log("Build finished in " + seconds);
});
// Start the process
generator.run(); Usage in NoFlo graphsThe main site generation flow is exposed as the
Known issues and differences with Ruby JekyllTemplate incompatibilitiesThe Liquid Templating library we use, liquid-node does not cover 100% of the Liquid spec, so some template parameters that work with Jekyll might not yet work. We're working with the liquid-node developers to improve the coverage, and this is something you can also help with. Please report an issue if you are using something that doesn't work! Newer Jekyll featuresWhen this project was started, Jekyll was still in the pre-1.0 stage, and its development had stopped. Since then, its development resumed, and 1.0 added features that we don't yet provide. These include:
Please report any issues you encounter with these or other Jekyll features. No web serverThe Ruby Jekyll includes a rudimentary web server for testing purposes. As that is outside of the scope of static site generation, this feature was not included into the NoFlo Jekyll implementation. You can serve the generated pages in many ways, including grunt-contrib-connect, simple-server, or NoFlo webserver. Testing and developmentPull requests are welcome for any missing Jekyll features or other issues! If you want to work with the repository, it is best to be able to test it locally. Our main body of tests consists of a Jekyll website source in If you find things NoFlo Jekyll doesn't handle correctly, add them to that Jekyll site source, and then run Ruby Jekyll fixture regeneration with:
After this you should be able to run the tests with:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论