Coder Social home page Coder Social logo

enfield's People

Contributors

albertosantini avatar andreloureiro avatar bebraw avatar fortes avatar mathiasbynens avatar xhmikosr avatar zlatanvasovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enfield's Issues

Compatibility with io.js

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.

0.4.0 generates only the first page

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).

enfield new doesn't build

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.

Pygments Plugin

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 config

JSON is more suitable for JS than YAML. Could Enfield also support _config.json format?

Unhandled 'error' event

I've used jekyll before, but first time trying enfield. I get this error:

screen shot 2015-07-16 at 14 34 10

What's wrong here?
Thanks.

Node v0.10 breaks enfield?

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

Update time dep to 0.11.0

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

ERR! enfield Build failed: ext must be a string

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
$

Fails to build _site when no _layouts present

Steps to reproduce:

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

Should be:

.
./_site
./_site/test.html
./test.html

Details:

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

Multiple posts on the same day

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 not emptied before generation

Destination directory (_site) should be emptied before generating new files.

Steps to reproduce:

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

Output when generating with Jekyll:

.
./_site
./_site/test2.html
./test2.html

No _site/test.html file left from previous runs.

coffeescript needs to be installed globally

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?

Pages with empty frontmatter are not converted

Steps to reproduce:

mkdir -p /tmp/issue5/_layouts
cd /tmp/issue5
echo -e "---\n---\ntest" > test.md
enfield
cat _site/test.md

Output:


---

---
test

Output with Jekyll:

File name and content differs.
File name: _site/test.html
File content:

<p>test</p>

"undefined" used when tag variable is not found

Steps to reproduce:

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>

Output when converting with Jekyll:

<p>testtest</p>

Pagination

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

`npm test` fails on Windows

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?

Less and CoffeeScript support

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).

Filter "where" is undefined

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.

HTML pages renamed to "index.html" when they contain front matter

Steps to reproduce:

Create directory structure:

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

Compile:

enfield
find _site/

Output:

_site/
_site/test1.html
_site/test2
_site/test2/index.html

Should be:

_site/
_site/test1.html
_site/test2.html

Details:

I guess HTML files are renamed here:
https://github.com/fortes/enfield/blob/master/src/enfield.coffee#L266

  • This is inconsistent with Jekyll.
  • Inconsistent handling of .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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.