fortes / enfield Goto Github PK
View Code? Open in Web Editor NEW[Not Maintained!] Jekyll-like static site generator for node.js
License: MIT License
[Not Maintained!] Jekyll-like static site generator for node.js
License: MIT License
The package time
is compatible with io.js using the version 0.11.3
, recently released.
Please update the dep in package.json
and publish a new version (4.0.1?).
Thanks.
Sigh.
I tested on Windows and on Linux.
It seems the generated pages are empty, but the first one, containing all the content of the other pages (the copy of the other assets is ok).
After doing enfield new test && cd test && enfield serve
I get
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\xmr\Desktop\xhmikosr.github.io>enfield new test && cd test && enfield serve
info enfield New site installed in C:\Users\xmr\Desktop\xhmikosr.github.io\test
info enfield Configuration File: _config.yml
info enfield Source: ./
info enfield Destination: _site
info generate Begin generation
[ '_config.yml',
'_layouts/default.html',
'_layouts/post.html',
'_posts/2000-01-01-welcome-to-enfield.md',
'css/main.css',
'css/syntax.css',
'index.html' ]
[ '_posts/2000-01-01-welcome-to-enfield.md' ]
[ 'css/main.css', 'css/syntax.css', 'index.html' ]
This socket is closed.
info generate Generated ./ -> _site
info enfield Generation done
info enfield Running server at http://0.0.0.0:4000
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
I don't see any folder "_site" in test.
I'm on Windows using node.js 0.10.25.
Any chance for a Pygments plugin? There are multiple Pygments wrappers available. I think something like pygmentize-bundled would be quite ideal.
The plugin should conform with Jekyll block syntax. Example:
{% highlight js %}
function add(a, b) {
return a + b;
}
{% endhighlight %}
JSON is more suitable for JS than YAML. Could Enfield also support _config.json
format?
When I run enfield even after fixing the tinyliquid regression I get this:
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:904:11)
at Object.afterWrite (net.js:720:19)
node -v
v0.10.26
Please, update time dependency to 0.11.0 release.
Actually it is 0.10.0 in package.json and the compilation fails with Node.js 0.12.0
Any hint about the following error?
$ enfield -v
enfield 0.4.0
$ enfield build
info enfield Configuration File: _config.yml
info enfield Source: ./
info enfield Destination: _site
info generate Begin generation
ERR! enfield Build failed: ext must be a string
$
Enfield errors and points to this, building with a prior version doesnt have this issue.
leizongmin/tinyliquid@f353d33
mkdir /tmp/issue4
cd /tmp/issue4
echo test > test.html
enfield```
Output:
Building site: . -> ./_site
Error: Missing _layouts directory
Contents after compilation (find
output):
.
./_site
./test.html
.
./_site
./_site/test.html
./test.html
Jekyll compiles the site successfully.
Jekyll output when running in the same directory:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
WARNING: Could not read configuration. Using defaults (and options).
No such file or directory - /tmp/issue4/_config.yml
Building site: /tmp/issue4 -> /tmp/issue4/_site
Successfully generated site: /tmp/issue4 -> /tmp/issue4/_site
Hey is this project still active? If so, when there are multiple posts on the same day, one of them overwrites the content of the others. For example, given post A, B, and C all posted on the same day, the content of A might be B and the content of C might be B. Would love to see this project continue. Thanks for your work.
Destination directory (_site) should be emptied before generating new files.
mkdir -p /tmp/issue7
cd /tmp/issue7/
date > test.html
enfield
find
Output:
.
./_site
./_site/test.html
./test.html
Change project structure:
mv test.html test2.html
enfield
find
Output:
.
./_site
./_site/test.html
./_site/test2.html
./test2.html
.
./_site
./_site/test2.html
./test2.html
No _site/test.html
file left from previous runs.
After doing npm install enfield -g
I get
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\xmr\Desktop\xhmikosr.github.io>enfield new
'coffee' is not recognized as an internal or external command,
operable program or batch file.
which is fixed after installing coffeescript npm install coffee-script -g
.
Maybe this should be stated in README clearly?
mkdir -p /tmp/issue5/_layouts
cd /tmp/issue5
echo -e "---\n---\ntest" > test.md
enfield
cat _site/test.md
Output:
---
---
test
File name and content differs.
File name: _site/test.html
File content:
<p>test</p>
mkdir -p /tmp/issue6/_layouts
cd /tmp/issue6
echo -e "---\na: b\n---\ntest{{ c }}test" > test.md
enfield
cat _site/test/index.html
Output:
<p>testundefinedtest</p>
<p>testtest</p>
It seems paginator is not called.
_config.yml
appname: Home
paginate: 10
index.html fragment
<dl class="posts dl-horizontal">
{% for post in paginator.posts %}
<dt class="muted"> {{ post.date | date_to_string }} </dt>
<dd><a href="{{ post.url }}"> {{ post.title }} </a></dd>
{% endfor %}
</dl>
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="/" class="previous">Previous</a>
{% elsif paginator.previous_page %}
<a href="/page{{paginator.previous_page}}" class="previous">Previous</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page_number ">Page: {{paginator.page}} of {{paginator.total_pages}}</span>
{% if paginator.next_page %}
<a href="/page{{paginator.next_page}}" class="next ">Next</a>
{% else %}
<span class="next ">Next</span>
{% endif %}
</div>
enfield output
<dl class="posts dl-horizontal">
</dl>
<div class="pagination">
<span class="previous">Previous</span>
<span class="page_number ">Page: of </span>
<span class="next ">Next</span>
</div>
Resource: https://github.com/albertosantini/albertosantini.github.com/blob/master/index.html
C:\Users\xmr\Desktop\enfield>npm test
> [email protected] test C:\Users\xmr\Desktop\enfield
> NODE_ENV=test mocha --recursive --reporter tap --compilers coffee:coffee-script
'NODE_ENV' is not recognized as an internal or external command,operable program or batch file.
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
Have you thought about using shelljs or even better Grunt.js?
Jekyll 2.0.0 (WIP) supports native Sass and CoffeeScript compiling. It should be easier to implement Less (Sass is Ruby thing) and CoffeeScript support in Enfield as it's JS program.
CS and Less support should be documented better, with code examples.
Also, _less/
should be used for Less (like _sass/
for Sass in Jekyll 2.0.0).
Waiting on a fix from the pygments library: sunkarapk/pygments.js#6
Could be an issue with Tinyliquid, but I thought I'd post it here as well just in case.
Error message:
ERR! generate Liquid error from /: Filter where is undefined at line 12, column 9
Related code:
{% assign latestwork = site.projects | where:'category','latest' %}
Let me know if there's any other info I can provide.
cd /tmp/
mkdir -p issue/_layouts
cd issue/
echo -e "---\n---\ntest" > test1.html
echo -e "---\na: b\n---\ntest" > test2.html
find
Output:
.
./test1.html
./_layouts
./test2.html
enfield
find _site/
Output:
_site/
_site/test1.html
_site/test2
_site/test2/index.html
_site/
_site/test1.html
_site/test2.html
I guess HTML files are renamed here:
https://github.com/fortes/enfield/blob/master/src/enfield.coffee#L266
.html
files depending on front matter is also confusing.I have a few projects with hundreds of pages I would love to switch to some JavaScript based Jekyll alternative. Are you going to fix this, or is it an intentional feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.