speedlify
speedlify copied to clipboard
single vertical index?
hello
- thanks for making speedlify; it's the best
- is it possible for the index/homepage to be a single vertical (of test sites)?
Hmm, maybe is there’s only one vertical it can automatically redirect to it?
- 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
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 %}