AshSitemap.Resource
View SourceAsh resource extension for generating sitemaps.
sitemaps
A section for declaring sitemaps configurations.
See the sitemaps guide for more.
Nested DSLs
- sitemap
- news
- image
- video
- pagemap
- dataobject
- attribute
- dataobject
sitemaps.sitemap
sitemap name
Nested DSLs
Examples
sitemap do
path "index.html"
priority 0.5
news do
publication_date :date
end
end
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name | String.t | atom | A name to identify the news sitemap entity |
Options
Name | Type | Default | Docs |
---|---|---|---|
path | String.t | (map -> String.t) | The web url path to append to the hostname | |
priority | float | The priority of the sitemap content | |
read_action | atom | The read action to use when fetching the records. By default will use theread action if any |
sitemaps.sitemap.news
Options
Name | Type | Default | Docs |
---|---|---|---|
publication_date | String.t | atom | (map -> String.t) | Article publication date in W3C format, specifying the complete date (YYYY-MM-DD) with optional timestamp. See: http://www.w3.org/TR/NOTE-datetime Please ensure that you give the original date and time at which the article was published on your site; do not give the time at which the article was added to your Sitemap. Required. | |
publication_name | String.t | atom | (map -> String.t) | Name of the news publication. It must exactly match the name as it appears on your articles in news.google.com, omitting any trailing parentheticals. For example, if the name appears in Google News as 'The Example Times (subscription)', you should use 'The Example Times'. Required. | |
publication_language | String.t | atom | (map -> String.t) | Language of the publication. It should be an ISO 639 Language Code (either 2 or 3 letters); see: http://www.loc.gov/standards/iso639-2/php/code_list.php Exception: For Chinese, please use zh-cn for Simplified Chinese or zh-tw for Traditional Chinese. Required. | |
title | String.t | atom | Title of the news article. Required. Note: The title may be truncated for space reasons when shown on Google News. | |
access | String.t | atom | (map -> String.t) | Accessibility of the article. Required if access is not open, otherwise this tag should be omitted. | |
genres | String.t | atom | (map -> String.t) | A comma-separated list of properties characterizing the content of the article, such as 'PressRelease' or 'UserGenerated'. For a list of possible values, see: https://www.google.com/support/news_pub/bin/answer.py?answer=93992 Required if any genres apply to the article, otherwise this tag should be omitted. | |
keywords | list(String.t) | (map -> list(String.t)) | Comma-separated list of keywords describing the topic of the article. Keywords may be drawn from, but are not limited to, the list of existing Google News keywords; see: https://www.google.com/support/news_pub/bin/answer.py?answer=116037 Optional. | |
stock_tickers | list(String.t) | (map -> list(String.t)) | Comma-separated list of up to 5 stock tickers of the companies, mutual funds, or other financial entities that are the main subject of the article. Relevant primarily for business articles. Each ticker must be prefixed by the name of its stock exchange, and must match its entry in Google Finance. For example, 'NASDAQ:AMAT' (but not 'NASD:AMAT'), or 'BOM:500325' (but not 'BOM:RIL'). Optional. |
Introspection
Target: AshSitemap.Sitemaps.News
sitemaps.sitemap.image
Examples
sitemap do
path "index.html"
priority 0.5
image do
loc &1.image_url end
end
end
Options
Name | Type | Default | Docs |
---|---|---|---|
loc | String.t | (map -> String.t) | The URL of the image. | |
caption | String.t | (map -> String.t) | The caption of the image. | |
geo_location | String.t | (map -> String.t) | The geographic location of the image. For example, 'Limerick, Ireland'. | |
title | String.t | (map -> String.t) | The title of the image. | |
license | String.t | (map -> String.t) | A URL to the license of the image. |
Introspection
Target: AshSitemap.Sitemaps.Image
sitemaps.sitemap.video
Options
Name | Type | Default | Docs |
---|---|---|---|
title | String.t | (map -> String.t) | The title of the video. | |
description | String.t | (map -> String.t) | The description of the video. | |
content_loc | String.t | (map -> String.t) | At least one of <video:player_loc> and <video:content_loc> is required. This should be a .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format, and can be omitted if <video:player_loc> is specified. However, because Google needs to be able to check that the Flash object is actually a player for video (as opposed to some other use of Flash, e.g. games and animations), it's helpful to provide both. | |
thumbnail_loc | String.t | (map -> String.t) | A URL pointing to the URL for the video thumbnail image file. We can accept most image sizes/types but recommend your thumbnails are at least 120x90 pixels in .jpg, .png, or. gif formats. | |
player_loc | String.t | (map -> String.t) | At least one of <video:player_loc> and <video:content_loc> is required. A URL pointing to a Flash player for a specific video. In general, this is the information in the src element of an <embed> tag and should not be the same as the content of the <loc> tag. Since each video is uniquely identified by its content URL (the location of the actual video file) or, if a content URL is not present, a player URL (a URL pointing to a player for the video), you must include either the <video:player_loc> or <video:content_loc> tags. If these tags are omitted and we can't find this information, we'll be unable to index your video. | |
allow_embed? | boolean | (map -> boolean) | Attribute allow_embed specifies whether Google can embed the video in search results. Allowed values are 'Yes' or No'. The default value is 'Yes'. | |
autoplay? | boolean | (map -> boolean) | User-defined string that Google may append (if appropriate) to the flashvars parameter to enable autoplay of the video. | |
duration | non_neg_integer | (map -> non_neg_integer) | The duration of the video in seconds. | |
expiration_date | String.t | (map -> String.t) | The date after which the video will no longer be available, in W3C format. Acceptable values are complete date (YYYY-MM-DD) and complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD). For example, 2007-07-16T19:20:30+08:00. Don't supply this information if your video does not expire. | |
rating | float | (map -> float) | The rating of the video. | |
view_count | non_neg_integer | (map -> non_neg_integer) | The number of times the video has been viewed. | |
publication_date | String.t | (map -> String.t) | The date the video was first published, in W3C format. Acceptable values are complete date (YYYY-MM-DD) and complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD). For example, 2007-07-16T19:20:30+08:00. | |
category | String.t | (map -> String.t) | The video's category - for example, cooking. In general, categories are broad groupings of content by subject. For example, a site about cooking could have categories for Broiling, Baking, and Grilling. | |
family_friendly? | boolean | (map -> boolean) | Whether the video is suitable for viewing by children. No if the video should be available only to users with SafeSearch turned off. | |
restriction | list(String.t) | (map -> list(String.t)) | A list of countries where the video may or may not be played. If there is no <video:restriction> tag, it is assumed that the video can be played in all territories. | |
relationship? | boolean | (map -> boolean) | Attribute 'relationship' specifies whether the video is restricted or permitted for the specified countries. | |
gallery_loc | String.t | (map -> String.t) | A link to the gallery (collection of videos) in which this video appears. | |
gallery_title | String.t | (map -> String.t) | The title of the gallery. | |
price | String.t | (map -> String.t) | The price to download or view the video. More than one <video:price> element can be listed (for example, in order to specify various currencies). The price value must either be a non-negative decimal or be empty. If a price value is specified, the currency attribute is required. If no price value is specified, the type attribute must be valid and present. The resolution attribute is optional. | |
price_currency | String.t | (map -> String.t) | The currency in ISO 4217 format. This attribute is required if a value is given for price. | |
price_type | String.t | (map -> String.t) | The type (purchase or rent) of price. This value is required if there is no value given for price. Values include purchase, PURCHASE, rent, RENT. | |
price_resolution | String.t | (map -> String.t) | The resolution of the video at this price (SD or HD). | |
requires_subscription? | boolean | (map -> boolean) | Indicates whether a subscription (either paid or free) is required to view the video. | |
uploader | String.t | (map -> String.t) | A name or handle of the video's uploader. | |
uploader_info | String.t | (map -> String.t) | The URL of a webpage with additional information about this uploader. This URL must be on the same domain as the <loc> tag. | |
live? | boolean | (map -> boolean) | Whether the video is a live internet broadcast. | |
show_title | String.t | (map -> String.t) | The title of the TV show. This should be the same for all episodes from the same series. | |
show_video_type | String.t | (map -> String.t) | Describes the relationship of the video to the specified TV show/episode. Allowed values are 'clip', 'full', 'preview', 'interview', 'news', 'other'. | |
show_episode_title | String.t | (map -> String.t) | The title of the episode—for example, 'Flesh and Bone' is the title of the Season 1, Episode 8 episode of Battlestar Galactica. This tag is not necessary if the video is not related to a specific episode (for example, if it's a trailer for an entire series or season). | |
show_season_number | non_neg_integer | (map -> non_neg_integer) | Only for shows with a per-season schedule. | |
show_episode_number | non_neg_integer | (map -> non_neg_integer) | The episode number in number format. For TV shoes with a per-season schedule, the first episode of each series should be numbered | |
show_premier_date | String.t | (map -> String.t) | The date the content of the video was first broadcast, in W3C format (for example, 2010-11-05.) | |
platform_list | list(String.t) | (map -> list(String.t)) | A list of platforms where the video may or may not be played. If there is no <video:platform> tag, it is assumed that the video can be played on all platforms. | |
platform_relationship? | boolean | (map -> boolean) | Specifies whether the video is restricted or permitted for the specified platforms. |
Introspection
Target: AshSitemap.Sitemaps.Video
sitemaps.sitemap.pagemap
Nested DSLs
- dataobject
- attribute
sitemaps.sitemap.pagemap.dataobject
Nested DSLs
Options
Name | Type | Default | Docs |
---|---|---|---|
type | String.t | atom | (map -> String.t) | Type of the object. | |
id | String.t | atom | (map -> String.t) | ID of the object. |
sitemaps.sitemap.pagemap.dataobject.attribute
Options
Name | Type | Default | Docs |
---|---|---|---|
name | String.t | atom | (map -> String.t) | Name of the attribute. | |
value | String.t | atom | (map -> String.t) | Value of the attribute. |
Introspection
Target: AshSitemap.Sitemaps.PageMap.DataObject.Attribute
Introspection
Target: AshSitemap.Sitemaps.PageMap.DataObject
Introspection
Target: AshSitemap.Sitemaps.PageMap
Introspection
Target: AshSitemap.Sitemaps.Sitemap