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

Improve Qute documentation #44261

Open
neon-dev opened this issue Nov 1, 2024 · 8 comments · May be fixed by #44289
Open

Improve Qute documentation #44261

neon-dev opened this issue Nov 1, 2024 · 8 comments · May be fixed by #44289
Labels
area/qute The template engine kind/enhancement New feature or request

Comments

@neon-dev
Copy link
Contributor

neon-dev commented Nov 1, 2024

ItemResource should be HelloResource here:

your `ItemResource` class references two templates `hello` and `goodbye`, place them at `/src/main/resources/templates/ItemResource/hello.txt`
and `/src/main/resources/templates/ItemResource/goodbye.txt`. Grouping templates per resource class makes it easier to navigate to them.

@quarkus-bot quarkus-bot bot added the area/qute The template engine label Nov 1, 2024
Copy link

quarkus-bot bot commented Nov 1, 2024

/cc @mkouba (qute)

@mkouba
Copy link
Contributor

mkouba commented Nov 4, 2024

Well, it's just an example so it's not necessarily wrong but I agree that HelloResource would be better. @neon-dev Would you care to send a pull request?

@mkouba mkouba added the kind/enhancement New feature or request label Nov 4, 2024
@neon-dev
Copy link
Contributor Author

neon-dev commented Nov 4, 2024

It is wrong because the example continues with HelloResource.java, so the build would fail as the file paths won't match. Also goodbye.txt isn't declared in the class, so this section maybe should be revised too?
I'd prefer to not create a pull request myself, but I can if you insist.

@melloware melloware linked a pull request Nov 4, 2024 that will close this issue
@melloware
Copy link
Contributor

@neon-dev PR submitted please review: #44289

@mkouba
Copy link
Contributor

mkouba commented Nov 4, 2024

It is wrong because the example continues with HelloResource.java, so the build would fail as the file paths won't match. Also goodbye.txt isn't declared in the class, so this section maybe should be revised too?

But this paragraph is merely describing the convention for type-safe templates. And then the correct steps to rewrite the example from the previous section follow. That said, I don't mind if we use HelloResource in this paragraph. It's more clear.

I'd prefer to not create a pull request myself, but I can if you insist.

Of course I don't insist but contributions are welcome 😉.

@neon-dev PR submitted please review: #44289

@melloware 👍 Thanks, I'll take a look.

@neon-dev
Copy link
Contributor Author

neon-dev commented Nov 4, 2024

But this paragraph is merely describing the convention for type-safe templates. And then the correct steps to rewrite the example from the previous section follow. That said, I don't mind if we use HelloResource in this paragraph. It's more clear.

I see. Thanks for clarifying, I hadn't thought about that.
The way it is written strongly implies everything is already appropriately named for the example code that follows just a few lines after, otherwise it wouldn't make sense to showcase exactly the two *.txt files that are used within the same section.

Of course I don't insist but contributions are welcome 😉.

I'm sorry, maybe next time :)
Thx @melloware

@mkouba
Copy link
Contributor

mkouba commented Nov 4, 2024

otherwise it wouldn't make sense to showcase exactly the two *.txt files that are used within the same section.

The thing is we actuallly do not showcase two txt files in the same section. It's one template used in two resources...

@neon-dev
Copy link
Contributor Author

neon-dev commented Nov 4, 2024

With section I was referring to the section of the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants