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

Shrink some images, and convert some jpg to png #796

Merged
merged 3 commits into from
Nov 8, 2018
Merged

Shrink some images, and convert some jpg to png #796

merged 3 commits into from
Nov 8, 2018

Conversation

tomap
Copy link
Contributor

@tomap tomap commented Oct 27, 2018

No description provided.

@tomap
Copy link
Contributor Author

tomap commented Oct 27, 2018

the build issue come from mozilla/nunjucks#1161
we will need to wait for the fix

@tomap
Copy link
Contributor Author

tomap commented Oct 28, 2018

It seems yarn install --ignore-engines would solve our issue, or use the lts version of node, as suggested on another pr

@yoshinorin
Copy link
Member

yoshinorin commented Oct 29, 2018

@tomap
I think that lts setting at travisCI is better than yarn install --ignore-engines.
I suppose, npm package's owner set engines with intention.

@JLHwung
Copy link
Contributor

JLHwung commented Oct 29, 2018

I suggest add imagemin-lint-staged in the lint-staged + husky manner:

{
+ "husky": {
+   "hooks": {  
+     "pre-commit": "lint-staged"
+   }
+ },
+ "lint-staged": {
+   "*.{png,jpeg,jpg,gif,svg}": ["imagemin-lint-staged", "git add"]
+ }
}

so that

  • all image will be optimized once they are included in git commit (typically for theme author adding new snapshots)
  • the image will be only optimized once as they are unchanged
  • we don't reply on maintainer to minify them as a task.

@curbengh
Copy link
Contributor

@tomap @yoshinorin I suggest to move travis discussion to a separate issue #798.

@NoahDragon
Copy link
Member

As the travis-ci is fixed, can wait to see this change merged. 😉

# Conflicts:
#	source/themes/screenshots/Amber.png
#	source/themes/screenshots/Icarus.png
#	source/themes/screenshots/syefe.png
@tomap
Copy link
Contributor Author

tomap commented Nov 7, 2018

Build fixed

@NoahDragon NoahDragon merged commit 310d98d into hexojs:master Nov 8, 2018
curbengh pushed a commit to curbengh/hexo-site that referenced this pull request Nov 9, 2018
NoahDragon pushed a commit that referenced this pull request Nov 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants