jekyll-language-plugin icon indicating copy to clipboard operation
jekyll-language-plugin copied to clipboard

Slug must be first in yaml when using links / InvalidURIError

Open espen opened this issue 4 years ago • 1 comments

Posting here because I am unable to replicate this issue using just using yaml in a page with pure Jekyll.

The following works:

api:
  slug: api
  info: 'Try out <a href="https://example.org">the docs</a>'

While this gives error:

api:
  info: 'Try out <a href="https://example.org">the docs</a>'
  slug: api

The error is Invalid scheme format: *text* <a href="https (Addressable::URI::InvalidURIError).

Is there perhaps something with how this plugin parses the yaml that could result in this?

espen avatar Jan 08 '21 16:01 espen

Probably not the best solution but sorting the hash fixes it for me: https://github.com/espen/jekyll-language-plugin/commit/bc90abc17c1c97141862c4d9a564aa52bd2a8da0

espen avatar Mar 15 '21 21:03 espen