docsite icon indicating copy to clipboard operation
docsite copied to clipboard

The guide is displaying src/hackernews_post.rs instead of src/main.rs

Open sknauff opened this issue 1 year ago • 2 comments

In the "Your First Component" section of the guide, it states:

You can clear the src/main.rs file. We will be adding new code in the next sections.

However, all the examples (including those on the following pages of the guide) indicate in the header of the code block that the user should edit src/hackernews_post.rs.

Should this not be displayed instead as src/main.rs?

sknauff avatar Nov 23 '24 08:11 sknauff

That is a bit confusing. This occurs because the titles are auto-generated based on the file name in which the example resides. e.g. this code block was pulled from here, src/doc_examples/hackernews_post.rs

There might already be a way to rename them, but I'm not sure how.

DogeDark avatar Nov 24 '24 00:11 DogeDark

The new HotDog tutorial does not automatically generate the code blocks. So for now, this issue seems to be solved.

I can see the benefit of auto-generated code blocks. So I still see the value in finding an easy way to give auto-generated code blocks a different name.

sknauff avatar Dec 21 '24 14:12 sknauff