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

Randomize Featured Chapter and Quote #373

Closed
tunetheweb opened this issue Nov 8, 2019 · 1 comment
Closed

Randomize Featured Chapter and Quote #373

tunetheweb opened this issue Nov 8, 2019 · 1 comment
Labels
development Building the Almanac tech stack enhancement New feature or request
Milestone

Comments

@tunetheweb
Copy link
Member

tunetheweb commented Nov 8, 2019

At the moment the "Featured Chapter" on the home page is hardcoded. While that's fine for now, it would be good to serve a random one each time the page is refreshed.

Thoughts on how it might work:

  • Chapters mark quotes with a special span tag with a specific class name (quote?) or id (ids must be unique so quote-1, quote-2 or such like?) in the markdown.
  • The npm run generate script pulls them out (with regex?) into quote file(s).
  • The index.html EJS template pulls one in at random when called.
@rviscomi rviscomi added development Building the Almanac tech stack enhancement New feature or request labels Nov 8, 2019
@rviscomi rviscomi added this to the Après Ski milestone Nov 8, 2019
@tunetheweb tunetheweb changed the title Randomized Features Chapter and Quote Randomized Featured Chapter and Quote Dec 27, 2019
@tunetheweb tunetheweb changed the title Randomized Featured Chapter and Quote Randomize Featured Chapter and Quote Dec 27, 2019
@tunetheweb
Copy link
Member Author

@rviscomi I'm going to close this.

I know in #614 (comment) we talked about making the quotes part of the chapters and then auto-generating the feature-chapters.html file but I really don't think it's worth the complexity. If the chapters were changing a lot, then this would make sense, but they aren't. So what we have now works well enough for me (and I'd argue is actually better having them altogether) and don't think it's worth revisiting this.

Feel free to reopen if you strongly disagree.

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

No branches or pull requests

2 participants