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

single vertical index? #25

Open
aanomm opened this issue Jul 25, 2020 · 3 comments
Open

single vertical index? #25

aanomm opened this issue Jul 25, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@aanomm
Copy link

aanomm commented Jul 25, 2020

hello

  • thanks for making speedlify; it's the best
  • is it possible for the index/homepage to be a single vertical (of test sites)?
@zachleat
Copy link
Owner

Hmm, maybe is there’s only one vertical it can automatically redirect to it?

@zachleat zachleat added the enhancement New feature or request label Jul 25, 2020
@aanomm
Copy link
Author

aanomm commented Jul 26, 2020

  • that would be super
  • i'm using speedlify as an objective eye-opener for some very non-tech peeps
  • so it will literally always-only-be a single vert (of their own websites)
  • also: speedlify is outstanding @zachleat. seriously: thank you. i've tested many/most of the "next-level" tools and they're awesome in their own ways. they're simply not simple enough in many other ways though. not everyone knows or understands performance, so speedlify is a brilliant way to shine a light and help peeps understand what they should be caring about

@smth
Copy link

smth commented Jun 27, 2022

I did this recently. My approach was to copy the pagination stuff to the home page front matter (index.njk):

maxResults: 1
pagination:
  data: "sites"
  size: 1
  alias: vertical
counts:
  performance: 0
  accessibility: 0
  bestPractices: 0
  seo: 0
  perfect: 0
  total: 0

Then if only one vertical include the categories.njk stuff in index.njk (could probably be extracted into an include)

{% if sites|length > 1 %}
  <!-- existing index.njk templating -->
{% else %}
  <!-- shared categories.njk templating-->
{% endif %}

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

3 participants