Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delegate StaticFile#to_json to StaticFile#to_liquid #6273

Merged
merged 1 commit into from Aug 5, 2017
Merged

delegate StaticFile#to_json to StaticFile#to_liquid #6273

merged 1 commit into from Aug 5, 2017

Conversation

xrav3nz
Copy link
Contributor

@xrav3nz xrav3nz commented Aug 4, 2017

fixes #6259.

In order to make the output prettier and more expressive, it seems better to jsonify StaticFileDrop instead of StaticFile for the additional information. Delegation feels more natural to me in this situation.

Open to suggestions and feedbacks is welcome, especially on ways to improve the test. Cheers!


site | jsonify

Before:

...
"static_files": [
  "#Jekyll::StaticFile:0x005570s01cd1d0"
],
...

After:

...
"static_files": [
  {
    "name": "base.js",
    "path": "/assets/base.js",
    "basename": "base",
    "extname": ".js",
    ...
  }
],
...

Copy link
Member

@parkr parkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! Thank you!

@parkr
Copy link
Member

parkr commented Aug 5, 2017

/cc @jekyll/stability

@jekyllbot jekyllbot assigned parkr and ghost Aug 5, 2017
@ashmaroli
Copy link
Member

Awesome!! 👍

@ghost
Copy link

ghost commented Aug 5, 2017

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit a99186f into jekyll:master Aug 5, 2017
jekyllbot added a commit that referenced this pull request Aug 5, 2017
@parkr parkr mentioned this pull request Aug 12, 2017
6 tasks
parkr pushed a commit that referenced this pull request Aug 12, 2017
parkr added a commit that referenced this pull request Aug 12, 2017
Backport #6273 for v3.5.x: delegate `StaticFile#to_json` to `StaticFile#to_liquid`
@jekyll jekyll locked and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StaticFile should alias to_json to to_liquid
4 participants