-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add documentation for macros #543
Comments
Hello, I was looking into the macros today. It seems many of them are generated from there, is it right ? element! {
address => Address; article => Article; aside => Aside; footer => Footer;
header => Header; h1 => H1;
...
} So I am not sure if we can document them this way. Also there is the comment // @TODO merge with make_tags!
// El must be exposed in the module where this is called for these to work. So maybe should we do try what the comment says and then see if we can document it? Maybe we could close this issue if it is not relevant anymore. What do you think about it @MartinKavik and @L0g4n ? |
I can imagine we can add a doc comment like |
I saw this today. It is old but maybe useful https://stackoverflow.com/questions/33999341/generating-documentation-in-macros |
This does work though as expected, every macro would have the same documentation. But maybe that's not be too bad considering that they mostly function the same. What might also be useful is to include a link to the element macros section of the official guide. Since some people probably don't want to go to another site even if it's the official one, we can include the general principles of element macros, how they translate to html, and one or two generic examples in the docs. It seems possible to make the macro documentation somewhat less generic based on this SO thread but it's from way back in 2017. I'm not too savvy with macros so I wasn't able to make it work. |
Most of the macros exported by seed are undocumented, see: https://docs.rs/seed/0.7.0/seed/#macros
It would be good if at least the most commonly used are documented with an example.
The text was updated successfully, but these errors were encountered: