documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Fix template docs for v4

Open remidej opened this issue 3 years ago • 7 comments

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.js config 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.

remidej avatar Jan 20 '22 16:01 remidej

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

vercel[bot] avatar Jan 20 '22 16:01 vercel[bot]

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.

pwizla avatar Jan 26 '22 11:01 pwizla

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.

pwizla avatar Jan 26 '22 11:01 pwizla

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.

remidej avatar Jan 28 '22 10:01 remidej

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.

pwizla avatar Jan 31 '22 14:01 pwizla

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 :)

remidej avatar Jan 31 '22 16:01 remidej

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?

pwizla avatar May 04 '22 09:05 pwizla

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

strapi-bot avatar Oct 22 '22 20:10 strapi-bot

@pwizla @remidej Hi! Any progress on this? I’m interested in learning more about how Strapi templating works in version 4.

samuel-2018 avatar Nov 01 '22 19:11 samuel-2018

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 :)

pwizla avatar Nov 03 '22 08:11 pwizla

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)

vercel[bot] avatar Jan 06 '23 09:01 vercel[bot]

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)

pwizla avatar Jan 09 '23 09:01 pwizla