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

Conversation

@xrav3nz
Copy link
Contributor

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",
    ...
  }
],
...
@parkr
parkr approved these changes Aug 5, 2017
Copy link
Member

parkr left a comment

Beautiful! Thank you!

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Aug 5, 2017

@jekyllbot jekyllbot assigned parkr and ghost Aug 5, 2017
@ashmaroli

This comment has been minimized.

Copy link
Member

ashmaroli commented Aug 5, 2017

Awesome!! 👍

@ghost
ghost approved these changes Aug 5, 2017
@ghost

This comment has been minimized.

Copy link

ghost commented Aug 5, 2017

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit a99186f into jekyll:master Aug 5, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jekyllbot jekyllbot added bug fix labels 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 of 6 tasks complete
parkr added 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.