-
Notifications
You must be signed in to change notification settings - Fork 135
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 more documentation about the @Image
source value
#1167
base: main
Are you sure you want to change the base?
Conversation
Also, add some information from the images article to the @image directive documentation. rdar://145303029
… to the 2 times scaled display mode
```` | ||
|
||
Images can exist anywhere in your code base, but it's good practice to centralize them in a resources folder. You create this folder in your documentation catalog. Within your code base, image names must be unique. Images must be in *.png*, *.jpg*, *.jpeg*, *.svg*, or *.gif* format. | ||
Images can exist anywhere in your documentation catalog ('.docc' directory). but it's good practice to use subdirectories to organize the content and assets in your documentation. | ||
Regardless of organization within your catalog, each image need to have a unique name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regardless of organization within your catalog, each image need to have a unique name. | |
Regardless of organization within your catalog, each image needs to have a unique name. |
|
||
- Tip: To differentiate tutorial images from reference documentation images, you may wish to prefix image file names with tutorial\. | ||
- Tip: To differentiate tutorial images from reference documentation images, you may wish to prefix image file names with tutorial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful to differentiate the prefix with some sort of styling, such as quotes or code-styling
- Tip: To differentiate tutorial images from reference documentation images, you may wish to prefix image file names with tutorial. | |
- Tip: To differentiate tutorial images from reference documentation images, you may wish to prefix image file names with "tutorial". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly wanted to remove the extra character on that line. I agree that quoting the the prefix would distinguish it better.
However, now that I read the tip more closely I feel like it's a bit silly and could maybe go away entirely.
- Tip: To differentiate tutorial images from reference documentation images, you may wish to prefix image file names with tutorial. |
Bug/issue #, if applicable: rdar://145303029
Summary
90543ce updates the
@Image
directive documentation to include more information about the format of thesource
parameter. Some of this information was already available in the Adding Images to Your Content article but some of it is specific to directive string parameters.It also makes some minor clarifications and corrections this documentation:
b3e0430 consistently omits unnecessary quotation marks and file extensions in
@Image
examples in other DocC documentation.Dependencies
None
Testing
Locally build the DocCDocumentation.docc catalog and preview the
@Image
directive page.Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added testsNot applicable[ ] Ran theNot applicable./bin/test
script and it succeeded