Giter Club home page Giter Club logo

jekyll-haml's People

Contributors

felixkiss avatar rstacruz avatar samvincent avatar yaegashi 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  avatar

Watchers

 avatar  avatar

jekyll-haml's Issues

I'm not sure it's an issue but more of a question...

Hi I'm new to Jekyll and liquid tags (but not HAML). With this plugin, I can pull in a basic haml partial using

{% haml footer.hml %}

My problem:
The default Jekyll index page fails to compile when I try to convert index.html to index.haml. How should it be written? This is what I have...

%div#home
    %h1 Blog Posts
    .posts
        {% for post in site.posts %}
            %li
                %span {{ post.date | date_to_string }}
                »
                %a{:href => "{{ post.url }}"}
                    {{ post.title }}
        {% endfor %}

What am I missing? Thanks!

_layout haml not working

In jekyll 3.1.6 _layout haml is not working.

_layouts/test.haml

!!!
%html
  {% include head.html %}
  %body
    {% include header.html %}
    .page-content
      .wrapper
        {{ content }}
    {% include footer.html %}

This does not get converted but the includes are working.

Automatic Excerpts Not whitespace-aware

So I have an issue where excerpts seem to end up causing errors because they aren't gracefully merged with the whitespace-awareness of haml. My workaround so far has been to explicitly define excerpts in the front-matter, but I feel like there's a better solution. I would gladly submit a pull request if anyone could give a thought on how they would like it to work.

undefined method 'transform'

I'm getting the following error when I build:
jekyll 3.3.0 | Error: undefined method 'transform' for #<Jekyll::Renderer:0x007fd77d960f58>

I don't get the error and my site builds successfully when I comment out the jekyll-haml gem.

HAML parsing errors are obfuscated

When trying to run jekyll build I am receiving HAML parse errors, but they don't mention the file/line number which makes troubleshooting difficult.

running jekyll build

$ jekyll build
Configuration file: /Users/bm5k/projects/blog/_config.yml
            Source: /Users/bm5k/projects/blog/www.blog
       Destination: /Users/bm5k/projects/blog/_site
      Generating... (haml):114: Inconsistent indentation: 7 spaces used for indentation, but the rest of the document was indented using 2 spaces. (Haml::SyntaxError)

running haml converter manually

$ haml index.haml index.html
Syntax error on line 119: Inconsistent indentation: 7 spaces used for indentation, but the rest of the document was indented using 2 spaces.
  Use --trace for backtrace.

:markdown filter awareness of redcarpet

When setting the markdown: redcarpet option in _config.yml, it would be nice & desirable that this module would also be aware of this option, and switch the HAML markdown renderer to use redcarpet.

The current solution involves adding an extra plugin manually.

(feature request)

compile_in_place option?

jekyll-sass has a "compile_in_place" flag allows compilation of scss files into css files side-by-side in the jekyll source directory as well as the destination directory. This is very handy for use with GitHub Pages. Could we also have this for jekyll-haml?

any advice using this with jekyll-assets?

This doesn't seem to play nice:

%img{src: "{% asset steps1.jpg %}"}

  Conversion error: Jekyll::HamlConverter encountered an error while converting '_posts/post.haml':
                    (haml):1: syntax error, unexpected tIDENTIFIER, expecting ')' ...e1a6cc8bcbc5bb0085de30e4a378bed.jpg">")).to_s);; _hamlout.bu... ...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (haml):1: syntax error, unexpected ')', expecting end-of-input ...085de30e4a378bed.jpg">")).to_s);; _hamlout.buffer << (">\n".... ... ^

Plugin seems to be without effect

Given a Gemfile:
"""
source "https://rubygems.org"

gem "jekyll"

group :jekyll_plugins do
  gem "jekyll-haml"
end
"""

And `foo.haml` containing `%h1 Foo`
When I run `jekyll b`
Then `_site/foo.html` doesn't exist
And `_site/foo.haml` does exist

Jekyll 3.2, 3.3.0, and latest JH. Not sure what's wrong.

Passing options to includes

Great gem! But I'm having a problem I can't seem to figure out.

I'd like to be able to pass a variable to my includes but it interprets everything after haml as the file name.

{% haml comments.haml author="tom" %} => interprets comments.haml author="tom" as the file
{% include comments.html author="tom" %} => how it would work with html

I think the cause is related to https://github.com/samvincent/jekyll-haml/blob/master/lib/jekyll-haml/tags/haml_partial.rb#L8 where file really refers to an options string, with the first part being the file.

Let me know if I'm just missing something, or if you'd be interested in a PR. Thanks!

Tag attributes are not being interpolated

Hello! First off thanks for creating this, love it!

The issue I'm having is that when I use liquid to assign a value to a tag attribute it's not being interpolated correctly. For example:

%a.button.filled.color-yellow{ href: "{{ '/venue' | relative_url }}" }

is returning an anchor with an empty href attribute. However if I move that liquid tag into the contents of the anchor it renders correctly.

Any assistance you can provide?

Parsing sub-folder files?

I'm using the technique described by Jekyllrb called Named folders containing index HTML files to do subfolders to Clean URLs.

Unfortunately the gem isn't converting any files in the subfolder with the .haml extension, so I'm getting a 504 Forbidden because the browser tries to access the subfolder since index.html doesn't exist.

The haml file still shows up in the rendered _site folder.

Any ideas?

Setting options has no effect

The following code is meant to change the attribute quotes from the default single quote (') to double ("), however it has no effect when called from another (custom) plug-in.

Haml::Template.options[:attr_wrapper] = '"'

Is there another mechanism to specify options for jekyll-haml?

Layouts not being rendered

Hey everyone,

I'm having an issue with my haml layouts not being rendered. My setup is a _layouts/default.haml:

!!!
%html
  %head
    %title title stuff
    [...]

  %body
    = "{{ content }}"

and an index.haml:

---
layout: default

---

%i Hello world!

When I run jekyll serve --watch and head over to localhost:4000 I see that the default.haml is just being outputted haml (it's not being compiled) {{ content }} is outputting the compiled haml as html (as it should).

Any ideas as to what would be causing this? I'm not sure if I overlooked something or not, so hopefully this is a silly mistake on my part...

Thanks in advance, and keep up the great work on this project!
โ€“ Steve

if statements?

How would you use if statements?

        | {% if page.tags %}
            meta[name="keywords" content="{{ page.tags | join: ', ' }}"]
        | {% endif %}

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.