-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
doc: create macros to hide logo/icon #14796
Comments
I looked at this briefly, but couldn't make inner attributes work with a proc macro. |
HI @mbrobbel do you mean proc macros cannot be applied on underlying objects? afaik it is a limited set of object proc macros can be applied on like structs, enums, etc |
My first attempt was to use a function-like proc macro: #[proc_macro]
pub fn doc_cfg(_input: TokenStream) -> TokenStream {
quote! {
#![doc(
html_logo_url="https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
html_favicon_url="https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
}
.into()
} This results in:
The other attempt was to use an attribute macro, but I don't think attaching this attribute to the Maybe we can use a normal |
Yes you totally right, we can use just |
@comphead I would like to work on this issue. I will be looking into this. |
take |
So the proc macro will eventually generate the inner
doc!
, so we can improve readability and have logo urls in a single placeOriginally posted by @comphead in #14746 (review)
The text was updated successfully, but these errors were encountered: