Fix template docs for v4
Why is it needed?
v4 handles templates differently than v3. On v3, we used Github to host them. Now they are published as npm packages.
Some features were also removed on v4:
- The shorthand feature was removed. npm package names are much shorter than Github URLs, so it was less useful. It also added some complexity to the docs. Now, only Strapi's official templates have a shorthand.
- The dynamic
template.jsconfig feature was also removed. That's because templates can now be versioned with npm. So there's no need to dynamically generate the config, users should instead create a new template version instead.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
š Inspect: https://vercel.com/strapijs/documentation/Hy1NqYVCvZNYWrdGm8gq6hKLEky6
ā
Preview: https://documentation-git-v4-templates-strapijs.vercel.app
Thank you for updating it, @remidej ! As we are trying to make sure that all new content now follows our 12 rules and style guide, I will take a bit more time in the next few days to review the PR thoroughly and add suggestions. Thank you for your patience.
Also, we'll try to make sure this document is properly included in the TOC. For now, documentation for templates is only accessible by search.
Thanks @pwizla for all the suggestions, all these changes make this doc much more professional.
I agree with you on the structure, the "create your template" section is a currently bit fuzzy. I like your proposal.
Also, I see in the styleguide that the ::: strapi callout is for self promotion. If that's the case, I think we should use it to link to the starters-and-templates monorepo, where the v4 templates are currently hosted. I think it lacks visibility for the community.
Currently we use the Strapi callout to explain the difference between starters and templates. To me, this part of the doc is an actual warning because many people confuse the two, more than a promotion for the starters.
Thank you @remidej !
The way we describe the use of the ::: strapi callout in the Handbook does not say it all, and we actually use it both for important cross-links and concepts in addition to self-promotion. See for instance our middlewares section or "v3 vs. v4" callouts in the plugin migration guide.
On the contrary, caution and warnings callouts have another dedicated purpose.
Great idea to share a link to the starters-and-templates repo, you can go ahead and replace the link, thanks!
Regarding the structure, do you need any help? If yes we can have a look at it towards the end of the week.
Thank you for clarifying Pierre!
Yes I think it would be very interesting to work on the structure together, to learn about how you proceed for this kind of work. Thank you for suggesting this! And toward the end of the week, or next week is fine for me :)
Hello @remidej I'm following up on this PR š Thanks again for the initial work! Do you want us to plan a brainstorm/cowriting session soon to go forward with it?
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:
https://forum.strapi.io/t/configuration-options-for-custom-template/23052/1
@pwizla @remidej Hi! Any progress on this? Iām interested in learning more about how Strapi templating works in version 4.
Hi @samuel-2018, and thank you for your question. It has been deprioritized for now. In the meantime, you can still visit the temporary URL deployed with this PR here, and I can check with the team if we have the resources to publish a final version before the end of the quarter. Hope this helps :)
The latest updates on your projects. Learn more about Vercel for Git āļø
| Name | Status | Preview | Comments | Updated |
|---|---|---|---|---|
| documentation | ā Ready (Inspect) | Visit Preview | š¬ Add your feedback | Jan 9, 2023 at 9:45AM (UTC) |
| documentation-docu-mvp | ā Failed (Inspect) | Jan 9, 2023 at 9:45AM (UTC) |
Thanks for the updates, @gpene. Looks good to me, I'd suggest a few style-related updates:
- replace app with application
- I think we should reserve bold for UI elements, so I'd remove the bold formatting on "must" (line 79)