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

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

Open
sknauff opened this issue Nov 23, 2024 · 2 comments
Open

Comments

@sknauff
Copy link
Contributor

sknauff commented Nov 23, 2024

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?

@DogeDark
Copy link
Member

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.

@sknauff
Copy link
Contributor Author

sknauff commented Dec 21, 2024

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.

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