diff --git a/docs/creating-a-package.md b/docs/creating-a-package.md index 75d47f5aa..167a73008 100644 --- a/docs/creating-a-package.md +++ b/docs/creating-a-package.md @@ -214,6 +214,19 @@ your grammar supports: ] ``` +## Bundle External Resources + +It's common to ship external resources like images and fonts in the package, to +make it easy to reference the resources in HTML or CSS, you can use the `atom` +protocol URLs to load resources in the package. + +The URLs should be in the format of +`atom://package-name/relative-path-to-package-of-resource`, for example, the +`atom://image-view/images/transparent-background.gif` would be equivablent to +`~/.atom/packages/image-view/images/transparent-background.gif`. + +You can also use the `atom` protocol URLs in themes. + ## Writing Tests Your package **should** have tests, and if they're placed in the _spec_ directory,