plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
475 stars 643 forks source link

[DOCS] Missing Volto generator defaults documentation #5439

Closed ichim-david closed 8 months ago

ichim-david commented 11 months ago

If you look at here: https://6.docs.plone.org/volto/recipes/creating-project.html You have info about generating a volto project using just the generator.

On the next page: https://6.docs.plone.org/volto/recipes/developing-a-project.html You get some info that actually happens even when you don't use cookie cutter and use just the generator "The generator also creates a default add-on in the frontend/src/addons folder. The project is already configured to use this add-on. This add-on is configured as a theme add-on, so you are able to customize the look and feel of your site as well"

We should also be more specific that the addon created will be named "volto-[project-name]" unless you pass --defaultAddonName within the docs not just by using the help command

ichim-david commented 11 months ago

I don't know if it's a bug that it also happens on the app generator by default, for now I treat it as a miss-documentation until I'm told otherwise.

stevepiercy commented 11 months ago

I think that these two pages are confusing. I have no clue why I would choose one method over another. I can see the obvious differences—for example, one uses cookiecutter whereas the other does not—but that is just a difference of commands and tools used to create a project, not why I would want to use a method.

Maybe a quick chat in Discord could help provide purpose to each method? Then I can update the docs.

davisagli commented 11 months ago

@stevepiercy @plone/generator-volto (as discussed on the creating-project page) generates only a frontend. cookiecutter-plone-starter generates both a frontend and backend (as well as configuration for deployment). Actually, cookiecutter-plone-starter uses @plone/generator-volto to generate the frontend folder, so that part should end up with the same contents regardless of which tool is used.

I expect that using @plone/generator-volto to generate only a frontend is a fairly niche use case -- only for when someone already has an existing backend and wants to create a volto project to use with it.

stevepiercy commented 11 months ago

Yeah, the note on creating-project did not give a reason for generating only a frontend. It's also poorly titled. It should be "Create a project with only the Volto frontend", then explain why you would want to do that.

Your explanation of already having a backend now makes sense to me. Maybe for Guillotina, too?

Having no backend made no sense, as I reckoned using some static site generator would be more appropriate in that case.

davisagli commented 11 months ago

Maybe for Guillotina, too?

Yes, or Nick. Any case where you want to use Volto with a backend that is different than the one that the cookiecutter creates for you. But it definitely seems like an "advanced" use case to me.

stevepiercy commented 9 months ago

https://github.com/plone/volto/pull/5674 addresses the items I brought up in the discussion.

However the original issue should still be updated. @ichim-david would you please submit a PR?

ichim-david commented 9 months ago

Added pull request https://github.com/plone/volto/pull/5709 which brings the documentation of the behavior of the generator first in the generator readme, depending on the feedback I receive I will see about what other steps are needed for extra documenting of the generator and where.

stevepiercy commented 8 months ago

Closed by https://github.com/plone/volto/pull/5709