statiqdev / Statiq.Docs

A static documentation site generator.
https://statiq.dev/docs
Other
53 stars 8 forks source link

Feature Request: allow docs auto-links for Attribute classes without the suffix #27

Open SilentSin opened 6 years ago

SilentSin commented 6 years ago

C# allows you to make a class like public class TooltipAttribute : Attribute and then apply it to something using [Tooltip] without the word "Attribute" on the end.

It would be nice if Wyam could auto generate links to the API documentation of that class when using code tags around [Tooltip] and Tooltip like it does for the full TooltipAttribute.

daveaglick commented 6 years ago

I like this idea, and I think it’ll be pretty straightforward. Right now the auto-linking feature tries to find strings in text that match the names of symbols. We could extend that behavior for attributes by also searching for the symbol name without the implied Attribute suffix.

SilentSin commented 6 years ago

It would also be cool if the Text in [Tooltip(Text = "Does stuff")] could link to the appropriate Tooltip.Text property, but I assume that would be much more complicated than just string matching because it would need context awareness.

SilentSin commented 5 years ago

Another similar thing would be for GenericClass<OtherClass> to generate links for both classes (currently it only does OtherClass).

SilentSin commented 5 years ago

It would also be useful if it could auto link a Namespace on its own and all parts of a Namespace.Type.NestedType to allow for some disambiguation.