Say you're developing MyPackage`
and want to create page for MySymbol::myMessage
. Assuming you already have created standard Application project, with documentation support, perform following steps.
Inside MyProject/MyPackage/Documentation/English/ReferencePages
create Messages
directory with MySymbol
sub-directory.
Open PacletInfo editor (double click on PacletInfo.m
file).
Choose Documentation
tab, there should be ExtraReferences/Messages
position select it and click on Add Page
. Type in myMessage
in window that should appear and click OK. MyProject/MyPackage/Documentation/English/ReferencePages/Messages/myMessage.nb
file should be created.
Manually move above file to MySymbol
sub-directory. Its path should now be:
MyProject/MyPackage/Documentation/English/ReferencePages/Messages/MySymbol/myMessage.nb
Open myMessage.nb
file.
In Categorization
section, change Entity Type
to Message
and URI
to MyPackage/ref/message/MySymbol/myMessage
.
Manually tweak contents as you like. E.g. change title from myMessage
to MySymbol::myMessage
, remove usage cells etc.
Make sure PacletInfo.m
has proper "Documentation" and "Kernel" Extensions
.
After standard building and deploying everything should work automatically.
Assuming that in your package there is something like:
MySymbol::myMessage = "This is my message."
then printing MySymbol::myMessage
should give message text together with proper documentation link:
Needs["MyPackage`"]
Message[MySymbol::myMessage]
(* MySymbol::myMessage: This is my message. >> *)