I talked about this one with @jesseleite last week. With the upcoming updates for Starter Kits (SK) it would be nice if a SK developer could add stubs that should be used when a site developer scaffolds resources for a collection.
I'm talking about these resources:
Currently the show and index templates that are generated are just empty files. In SK's however you probably have some default wrapper styling in both templates. In the index template you might have a commented out collection tag ready to be used. And for the show template you might want to use your SK's page builder code.
To clarify in Peak you'd ideally want something like this for the index template:
{{#
@name Index: your collection
@desc The index template for your collection with an outer wrapper grid as defined in tailwind.config.js. It makes sure all blocks on a page get evenly spaced without having to worry about margins or paddings. Page builder content can be placed above the collection index.
#}}
<main class="outer-grid">
{{ page_builder scope="block" }}
{{ partial src="page_builder/{type}" }}
{{ /page_builder }}
{{#
<div class="fluid-container flex flex-col space-y-4">
{{ collection:your_collection limit="10" paginate="true" as="items" }}
{{ items }}
{{ partial:typography/h1 as="h2" class="mb-4" :content="title" }}
{{ partial:typography/paragraph content="{excerpt | nl2br}"}}
{{ /items}}
{{ partial:components/pagination }}
{{ /collection:your_collection }}
</div>
#}}
</main>
Or this for the show template:
{{#
@name Show: your collection
@desc The show template for your collection with an outer wrapper grid as defined in tailwind.config.js. It makes sure all blocks on a page get evenly spaced without having to worry about margins or paddings.
#}}
<main class="outer-grid">
{{ page_builder scope="block" }}
{{ partial src="page_builder/{type}" }}
{{ /page_builder }}
</main>
Providing these stubs would increase development speed and make "best practices" (at least for the current SK) more discoverable.
I talked about this one with @jesseleite last week. With the upcoming updates for Starter Kits (SK) it would be nice if a SK developer could add stubs that should be used when a site developer scaffolds resources for a collection.
I'm talking about these resources:
Currently the
show
andindex
templates that are generated are just empty files. In SK's however you probably have some default wrapper styling in both templates. In theindex
template you might have a commented out collection tag ready to be used. And for theshow
template you might want to use your SK's page builder code.To clarify in Peak you'd ideally want something like this for the
index
template:Or this for the show template:
Providing these stubs would increase development speed and make "best practices" (at least for the current SK) more discoverable.
Hope this makes sense.