Skip to content
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

amp-reddit validator rules #5677

Merged
merged 1 commit into from Oct 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
77 changes: 77 additions & 0 deletions extensions/amp-reddit/0.1/validator-amp-reddit.protoascii
@@ -0,0 +1,77 @@
#
# Copyright 2016 The AMP HTML Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the license.
#

tags: { # amp-reddit
html_format: AMP
html_format: AMP4ADS
tag_name: "SCRIPT"
spec_name: "amp-reddit extension .js script"
also_requires_tag: "amp-reddit"
mandatory_parent: "HEAD"
attrs: {
name: "async"
mandatory: true
value: ""
}
attrs: {
name: "custom-element"
mandatory: true
value: "amp-reddit"
dispatch_key: true
}
attrs: {
name: "src"
mandatory: true
value_regex: "https://cdn\\.ampproject\\.org/v0/amp-reddit-(latest|0\\.1).js"
}
attrs: {
name: "type"
value: "text/javascript"
}
cdata: {
blacklisted_cdata_regex: {
regex: "."
error_message: "contents"
}
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-reddit/amp-reddit.md"
}
tags: { # <amp-reddit>
html_format: AMP
html_format: AMP4ADS
tag_name: "AMP-REDDIT"
disallowed_ancestor: "AMP-SIDEBAR"
also_requires_tag: "amp-reddit extension .js script"
attrs: {
name: "data-embedtype"
mandatory: true
value_regex_casei: "(comment|post)"
}
attrs: {
name: "data-src"
mandatory: true
}
attr_lists: "extended-amp-global"
spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-reddit/amp-reddit.md"
amp_layout: {
supported_layouts: FILL
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: FLEX_ITEM
supported_layouts: NODISPLAY
supported_layouts: RESPONSIVE
}
}