speedlify icon indicating copy to clipboard operation
speedlify copied to clipboard

single vertical index?

Open aanomm opened this issue 5 years ago • 3 comments

hello

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

aanomm avatar Jul 25 '20 09:07 aanomm

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

zachleat avatar Jul 25 '20 19:07 zachleat

  • 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

aanomm avatar Jul 26 '20 00:07 aanomm

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 %}

smth avatar Jun 27 '22 18:06 smth