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

feat: Add automated screenshots for starter projects #223

Open
anishkny opened this issue Oct 27, 2019 · 7 comments
Open

feat: Add automated screenshots for starter projects #223

anishkny opened this issue Oct 27, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@anishkny
Copy link

anishkny commented Oct 27, 2019

hi @zachleat @gerwitz and team,

First off, keep up the amazing work and looking forward to v1!

This is a proposal. What do you folks feel if the list of starter projects had automatically generated screenshots per entry.

I was thinking of using puppeteer (headless Chrome driver) to generate screenshots for the demo sites at build time. Pictures really add a lot of value e.g. Hugo Theme Gallery.

I have a working prototype but wanted to gather thoughts before going too far: PR, Demo.

Screen Shot 2019-10-27 at 8 57 00 AM

I am no CSS expert - so I am totally open to styling and other presentation tweaks.

Eventually this idea can also be extended to Source Code Samples.

@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Nov 3, 2019

Where would Pupeteer run?

@gerwitz
Copy link
Contributor

gerwitz commented Nov 3, 2019

I think thumbnails to add visual interest to the catalog would be great. Though re-rendering them on every site build feels very heavy.

Maybe this could be a pre-build step, as with Zach's use of Grunt on his site, or Gulp on many.

@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Nov 3, 2019

Okay, so running on the developer's machine instead as part of a CI?

@gerwitz
Copy link
Contributor

gerwitz commented Nov 3, 2019

¯_(ツ)_/¯ there's a trade-off to be made between generating thumbnails as a "dev-time" activity vs. part of the build process. I guess it depends on how builds are performed (e.g. are there processing time costs, is puppeteer available…).

I do worry about introducing a build manager tot his project because it implies a standard, but that's a terrible reason to avoid pre-processing.

@Ryuno-Ki
Copy link
Contributor

Ryuno-Ki commented Nov 3, 2019

NPM comes with kinda one: run-scripts. It works okay for me.
I was a Grunt-lover before. Not happy with the likes of Gulp or Brunch.
Webpack feels overcomplicated and parcel too opinionated.

So I stick to npm run-scripts and rollup, in case I need a bundler. :-)

@zachleat
Copy link
Member

We do have a screenshots script in place although I don’t think it runs for starters yet!

npm run get-new-screenshots

@zachleat zachleat added the enhancement New feature or request label Aug 22, 2020
@anishkny
Copy link
Author

Ah ok I see now there’s a screenshot generation step. Will try to update the PR to integrate starter screenshot generation into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants