Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide default templates and test post #441

Closed
casey opened this issue Sep 23, 2018 · 2 comments
Closed

Provide default templates and test post #441

casey opened this issue Sep 23, 2018 · 2 comments

Comments

@casey
Copy link

casey commented Sep 23, 2018

Currently, gutenberg init doesn't provide any templates, which means that additional non-trivial work is needed to go from gutenberg init, to a page with posts.

I'd suggest adding very, very simple bare-bones template files and an example post, so that it works immediately out of the box. Optionally, gutenberg init could take a --create-skeleton flag, or something like that, which would produce this behavior.

In addition to getting of the ground faster, it could provide a good starting place for theme authors by showing what's available in each template's context.

@Keats
Copy link
Collaborator

Keats commented Sep 24, 2018

There is default page already telling you what file you need to create and pointing you to the right docs if you don't have any templates.
I don't want to have a default template as there are many usecases for a static site other than a blog and I don't want to focus on one specifically.

In addition to getting of the ground faster, it could provide a good starting place for theme authors by showing what's available in each template's context.

It is unlikely you would be able to make a template showing all of https://www.getgutenberg.io/documentation/templates/pages-sections/ since some options are exclusive of each others and the docs are going to be clearer.

@Keats Keats closed this as completed Sep 24, 2018
@casey
Copy link
Author

casey commented Oct 4, 2018

There is default page already telling you what file you need to create and pointing you to the right docs if you don't have any templates.

The instructions are non trivial, and involve a few config options. I tried to get the after dark theme working, but got errors. I assumed that I had gotten something wrong, but it turns out that they were caused by getzola/after-dark#9.

Having a default template that is known to work would without further configuration would have prevented this.

I don't want to have a default template as there are many use-cases for a static site other than a blog and I don't want to focus on one specifically.

All static sites will have a page.html. That could be included without specializing.

A generic index.html template could contain a directory of pages and nothing more. This would still be very useful.

It is unlikely you would be able to make a template showing all of https://www.getgutenberg.io/documentation/templates/pages-sections/ since some options are exclusive of each others and the docs are going to be clearer.

That's certainly true. However, learning by seeing and modifying a working example is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants