- AMP HTML ํ๊ทธ์ ์์ฑ ์ค๋ฅ
- ํ์ ํ๊ทธ ๋๋ฝ
- ๋ค๋ฅธ ํ๊ทธ์ ํ์ํ ํ๊ทธ ๋๋ฝ
- ํ์ฉ๋์ง ์๋ ํ๊ทธ
- ๋ง์ถค ์๋ฐ์คํฌ๋ฆฝํธ๋ ํ์ฉ๋์ง ์์
- ํ์ ์์ฑ ๋๋ฝ
- ์๋ชป๋ ์์ฑ ๊ฐ
- ํ์ฉ๋์ง ์๋ ์์ฑ
- ํ์ ํ ์คํธ๊ฐ ๋๋ฝ๋๊ฑฐ๋ ์๋ชป๋จ
- ํ๊ทธ ๋ด ํ์ฉ๋์ง ์๋ ํ ์คํธ
- ํ๊ทธ์ ์์ฑ ๋ด์์ ํ์ฉ๋์ง ์๋ ํน์ฑ
- ์๋ชป๋ ํน์ฑ ๊ฐ
- URL ๋๋ฝ
- ์๋ชป๋ URL
- ์๋ชป๋ URL ํ๋กํ ์ฝ
- ์์ฑ์์ ํ์ ํน์ฑ ๋๋ฝ
- ์ํธ ๋ฐฐํ์ ์ธ ์์ฑ
- ๋ชฉ๋ก์์ ํ์ ์์ฑ ๋๋ฝ
- ์๋ชป๋ ์์ ํ๊ทธ
- ํ์ฉ๋์ง ์๋ ํ๊ทธ ์์ ์์
- ํ์ ํ๊ทธ ์์ ์์
- ํํธ๊ฐ ์๋ ํ์ ํ๊ทธ ์์ ์์
- ๊ณ ์ ํ๊ทธ ์ค๋ณต
- ์คํ์ผ ๋ฐ ๋ ์ด์์ ์ค๋ฅ
- ์คํ์ผ์ํธ๊ฐ ๋๋ฌด ๊ธด ๊ฒฝ์ฐ
- CSS ๊ตฌ๋ฌธ ์ค๋ฅ
- ํน์ ๊ท์น์ CSS ๊ตฌ๋ฌธ ์ค๋ฅ
- ์์๋ ๋ ์ด์์์ AMP ํ๊ทธ๊ฐ ์ง์ํ์ง ์์
- ์์์ ๋ ์ด์์์์ ํ์ฉ๋์ง ์๋ ์์ฑ
- AMP ํ๊ทธ๊ฐ ์ง์ ๋ ๋ ์ด์์์ ์ง์ํ์ง ์์
- ์ง์ ๋ ๋ ์ด์์์์ ํ์ฉ๋์ง ์๋ ์์ฑ
- ๋ ์ด์์์์ ํ์๋ก ํ๋ ์์ฑ ๊ฐ์ด ์๋ชป๋จ
- ๋๋น ๋ฐ ๋์ด ๋จ์ ๋ถ์ผ์น
- ํ ํ๋ฆฟ ์ค๋ฅ
- ์์ฑ์ ํ ํ๋ฆฟ ๊ตฌ๋ฌธ ํฌํจ
- ์์ฑ์ ์ด์ค์ผ์ดํ ์ฒ๋ฆฌ๋์ง ์์ ํ ํ๋ฆฟ ๊ตฌ๋ฌธ ํฌํจ
- ์์ฑ์ ํ ํ๋ฆฟ ๋ถ๋ถ ํฌํจ
- ์ง์ ์ค๋จ ์ค๋ฅ
- ์ง์ ์ค๋จ๋ ํ๊ทธ
- ์ง์ ์ค๋จ๋ ์์ฑ
AMP ์ ํจ์ฑ ๊ฒ์ฌ ์ค๋ฅ
์ ํจํ AMP ๋ฌธ์์๋ ์ ํจ์ฑ ๊ฒ์ฌ ์ค๋ฅ๊ฐ ์์ด์๋ ์ ๋ฉ๋๋ค. ์ด ๋ฌธ์์ ๋ชฉ์ ์ AMP ํ์ด์ง์ ์ ํจ์ฑ์ ๊ฒ์ฌํ ๋ ๋ฐ๊ฒฌํ ์ ์๋ ๋ชจ๋ ์ ํจ์ฑ ๊ฒ์ฌ ์ค๋ฅ๋ฅผ ๋ ์ ์ดํดํ๊ณ ํด๊ฒฐํ ์ ์๋๋ก ๋์์ ๋๋ฆฌ๋ ๊ฒ์ ๋๋ค. ์ ํจ์ฑ ๊ฒ์ฌ ์ค๋ฅ์ ๊ดํ ์ ์ฒด ๋ด์ฉ์ ๋๋ต์ ์ผ๋ก ์ดํด๋ณด๋ ค๋ฉด AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์ ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.
AMP HTML ํ๊ทธ์ ์์ฑ ์ค๋ฅ
ํ์ ํ๊ทธ ๋๋ฝ
| ์ฝ๋ | MANDATORY_TAG_MISSING |
| ํ์ | "The mandatory tag '%1' is missing or incorrect." |
| ํด๊ฒฐ์ฑ | ํ์ HTML ํ๊ทธ๋ฅผ ์ถ๊ฐ(๋๋ ์์ )ํฉ๋๋ค. |
๋ชจ๋ AMP ๋ฌธ์์๋ ๋ค์ ํ๊ทธ๊ฐ ์์ด์ผ ํฉ๋๋ค:
<!doctype html><html amp> or <html โก><head><link rel="canonical" href="$SOME_URL"><meta charset="utf-8"><meta name="viewport" content="..."><style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript><script async src="https://cdn.ampproject.org/v0.js"></script><body>
์ด๋ฌํ ํ์ ํ๊ทธ์๋ AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์ mandatory: true ํ๋๊ฐ ์์ด์ผ ํฉ๋๋ค.
์ด๋ฌํ ํ๊ทธ๋ AMP ์ฌ์์์๋ ์ธ๊ธ๋ฉ๋๋ค.
๋ค๋ฅธ ํ๊ทธ์ ํ์ํ ํ๊ทธ ๋๋ฝ
| ์ฝ๋ | TAG_REQUIRED_BY_MISSING |
| ํ์ | "The '%1' tag is missing or incorrect, but required by '%2'." |
| ํด๊ฒฐ์ฑ | ํ์ํ HTML ํ๊ทธ๋ฅผ ์ถ๊ฐ(๋๋ ์์ )ํฉ๋๋ค. |
์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๋ AMP ๋ฌธ์์์ ํ์ฅ ๊ตฌ์ฑ์์๋ฅผ ๋ฐ๊ฒฌํ์ผ๋
์ด์ ์์ํ๋ <script>๋ฅผ ์ฐพ์ ์ ์์ ๋
TAG_REQUIRED_BY_MISSING ์ค๋ฅ๋ฅผ ํ์ํฉ๋๋ค.
ํ์ฅ ๊ตฌ์ฑ์์๋
๋ง์ถค ์์๋ก์ AMP ๋ฌธ์์ ๋ช
์์ ์ผ๋ก ํฌํจ๋์ด์ผ ํฉ๋๋ค.
์ด ์ค๋ฅ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ํ์ฅ ๊ตฌ์ฑ์์์ ์ฐธ์กฐ ํ์ด์ง๋ก ์ด๋ํ ๋ค์
ํ์ํ ์คํฌ๋ฆฝํธ๋ฅผ ๋ณต์ฌํ์ฌ AMP ๋ฌธ์ <head>์ ๋ถ์ฌ๋ฃ์ผ์ธ์.
ํ์ฉ๋์ง ์๋ ํ๊ทธ
| ์ฝ๋ | DISALLOWED_TAG |
| ํ์ | "The tag '%1' is disallowed." |
| ํด๊ฒฐ์ฑ | ํ์ฉ๋์ง ์๋ ํ๊ทธ๋ฅผ ์ญ์ ํฉ๋๋ค. |
ํ๊ทธ๋ ํ์ฉ๋ ๊ฒ๋ง ์ฌ์ฉํ ์ ์๊ธฐ ๋๋ฌธ์ ํ์ฉ๋์ง ์๋ ๋ชจ๋ ํ๊ทธ๋ฅผ ๋์ดํ ๋ชฉ๋ก์ ์กด์ฌํ์ง ์์ต๋๋ค. ํ์ง๋ง AMP ์ฌ์์์ ํ์ฉ๋์ง ์๋ ํ๊ทธ์ ๊ด๋ฒ์ํ ๋ชฉ๋ก์ ํ์ธํ ์ ์์ต๋๋ค.
๋ง์ถค ์๋ฐ์คํฌ๋ฆฝํธ๋ ํ์ฉ๋์ง ์์
| ์ฝ๋ | DISALLOWED_SCRIPT_TAG |
| ํ์ | "Custom JavaScript is not allowed." |
| ํด๊ฒฐ์ฑ | ํด๋น ์๋ฐ์คํฌ๋ฆฝํธ ํ๊ทธ๋ฅผ ์ญ์ ํฉ๋๋ค. |
AMP ํ์์์๋ AMP ํ๋ก์ ํธ์์ ์์ฒด ์ ๊ณตํ๋ ์๋ฐ์คํฌ๋ฆฝํธ ํ์ผ์ด ์๋ ๋ง์ถค ์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ํ์ด์ง์ ์ถ๊ฐํ ์ ์์ต๋๋ค. ์ผ๋ฐ์ ์ผ๋ก ํ์ํ ์๋ฐ์คํฌ๋ฆฝํธ๋ ๋๋ถ๋ถ HTML ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์์ํ๋ ๊ตฌํ ๋ฐฉ์์ ์ฐพ์ ์ ์์ต๋๋ค. AMP ๊ตฌ์ฑ์์์์ AMP HTML ํ์ด์ง๋ฅผ ํฅ์ํ๋ ๋ฐ ์ฌ์ฉํ ์ ์๋ ๊ตฌ์ฑ์์๋ฅผ ํ์ธํ์ธ์.
ํ์ํ ์๋ฐ์คํฌ๋ฆฝํธ ์ฌ์ฉ ์ฌ๋ก๋ฅผ ์ฐพ์ ์ ์๋ค๋ฉด AMP ํ๋ก์ ํธ์ ์๋ก์ด ๊ตฌ์ฑ์์๋ฅผ ์ถ๊ฐํ ์๋ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ AMP ํ๋ก์ ํธ์ ์ฐธ์ฌํ๊ธฐ ๋ฌธ์๋ฅผ ํ์ธํ์ธ์.
ํ์ ์์ฑ ๋๋ฝ
| ์ฝ๋ | MANDATORY_ATTR_MISSING |
| ํ์ | "The mandatory attribute '%1' is missing in tag '%2'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์ ํ์ ์์ฑ์ ์ถ๊ฐํฉ๋๋ค. |
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์
AMP ํ๊ทธ์ ํ์ ์์ฑ์ด ์ ์๋์ด ์์ต๋๋ค.
ํ๊ทธ๋ฅผ ๊ฒ์ํ๊ณ
๋ช
์๋ ์์ฑ์ ํ์ธํ ๋ค์
mandatory: true๊ฐ ์๋์ง ํ์ธํ์ธ์.
๊ฐ AMP ํ๊ทธ์ ํ์ ์์ฑ์
ํ๊ทธ ์ฌ์์๋ ๋ช
์๋์ด ์์ต๋๋ค.
์๋ชป๋ ์์ฑ ๊ฐ
| ์ฝ๋ | INVALID_ATTR_VALUE |
| ํ์ | "The attribute '%1' in tag '%2' is set to the invalid value '%3'." |
| ํด๊ฒฐ์ฑ | ์์ฑ์ ์ ํจํ ๊ฐ์ผ๋ก ์์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ HTML ํ๊ทธ์ ์ด๋ฆ์ ํ์ฉ๋๋
๊ฐ์ ํ์ฉ๋์ง ์๋ ์์ฑ์ด ์๋ค๋ ์๋ฏธ์
๋๋ค.
์๋ฅผ ๋ค์ด URL์ ๊ฐ์ด ์๋ชป๋์์ ๋ ์ด ์ค๋ฅ๊ฐ ํํ ๋ฐ์ํฉ๋๋ค.
๋ชจ๋ URL ๊ฐ(href ๋ฐ src ์์ฑ)์ ๋ค์์
๊ฐ๋ฅํ ์์ฑ ๊ฐ ์ค ํ๋์ ์ผ์นํด์ผ ํฉ๋๋ค.
์ค์: AMP์ URL ๊ฐ ๋๋ถ๋ถ์ HTTPS๋ฅผ ์๊ตฌํฉ๋๋ค. ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ ์ด์ ๊ฐ ๋ถ๋ช ํ์ง ์๋ค๋ฉด ๊ด๋ จ AMP ํ๊ทธ ์ฌ์์์ ์์ฑ์ด HTTPS๋ฅผ ์๊ตฌํ๋์ง ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.
ํ์ฉ๋์ง ์๋ ์์ฑ
| ์ฝ๋ | DISALLOWED_ATTR |
| ํ์ | "The attribute '%1' may not appear in tag '%2'." |
| ํด๊ฒฐ์ฑ | HTML ํ๊ทธ์์ ์์ฑ์ ์ญ์ ํฉ๋๋ค. |
์์ฑ์ ํ์ฉ๋ ๊ฒ๋ง ์ฌ์ฉํ ์ ์๊ธฐ ๋๋ฌธ์ ํ์ฉ๋์ง ์๋ ๋ชจ๋ ์์ฑ์ ๋์ดํ ๋ชฉ๋ก์ ์กด์ฌํ์ง ์์ต๋๋ค.
๊ฐ ํ๊ทธ์์ ์ง์๋๋ ์์ฑ์ ํ์ธํ๋ ค๋ฉด HTML ํ๊ทธ๋ฅผ ๊ฒ์ํ ๋ค์
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์์
attrs๋ฅผ ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.
ํ๊ทธ๋ณ๋ก ํ์ฉ๋๋ ๊ตฌ์ฒด์ ์ธ ์์ฑ ์ธ์๋
๋ชจ๋ AMP ํ๊ทธ๋ $GLOBAL_ATTRS์์ ํ์ฉ๋ ๋ชจ๋ ์์ฑ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ ๋์ฌ 'data-'๊ฐ ์ฌ์ฉ๋ ์์ฑ๋ ๋ชจ๋ ํ์ฉ๋ฉ๋๋ค.
ํ์ ํ ์คํธ๊ฐ ๋๋ฝ๋๊ฑฐ๋ ์๋ชป๋จ
| ์ฝ๋ | MANDATORY_CDATA_MISSING_OR_INCORRECT |
| ํ์ | "The mandatory text (CDATA) inside tag '%1' is missing or incorrect." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์ ํ์ ํ ์คํธ๋ฅผ ์ถ๊ฐํ๊ฑฐ๋ ์์ ํฉ๋๋ค. |
CDATA๋ ์์ ๋ฐ ๋ HTML ํ๊ทธ ์ฌ์ด์ ์์นํ ์ฝํ ์ธ ๋ฐ์ดํฐ์ด๋ฉฐ ํ์ฌ ํ์ฉ ๋ชฉ๋ก ๋ฐ ๊ธ์ง ๋ชฉ๋ก์ ๋ชจ๋ ์ฌ์ฉํ์ฌ ํ๊ฐ๋ฉ๋๋ค. CDATA๊ฐ ํ์์ธ ํ๊ทธ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
๋ฐ
<style amp-custom>
์ด ์ค๋ฅ์ ๋ํ ์์ธ ๋ฉ์์ง๋ ๋ค์ ์ค ํ๋์ผ ์ ์์ต๋๋ค:
- "Mandatory style boilerplate (js enabled)"
- "Mandatory style boilerplate (noscript)"
- "Disallowed -amp- CSS class name prefix"
- "Disallowed !important attribute in CSS"
- "Disallowed @charset in CSS"
- "Disallowed @import in CSS"
- "Disallowed @namespace in CSS"
- "Disallowed @supports in CSS"
- "Disallowed @document in CSS"
- "Disallowed @page in CSS"
- "Disallowed @viewport in CSS"
ํ๊ทธ ๋ด ํ์ฉ๋์ง ์๋ ํ ์คํธ
| ์ฝ๋ | CDATA_VIOLATES_DENYLIST |
| ํ์ | "The text (CDATA) inside tag '%1' matches '%2', which is disallowed." |
| ํด๊ฒฐ์ฑ | ํ์ฉ๋์ง ์๋ ํ ์คํธ๋ฅผ ์ญ์ ํฉ๋๋ค. |
ํน์ CSS ๋ฐ์ดํฐ๋ ํ์์ ์ธ CSS AMP ๊ท์น์ ์ ํจ์ฑ์ ๊ฒ์ฌํ๊ธฐ ์ํด ๊ธ์ง๋์์ต๋๋ค.
๋ค์์ ๊ธ์ง๋ CSS ๋ฐ์ดํฐ ๋ชฉ๋ก์
๋๋ค.
(AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์ disallowed_cdata_regex๋ ์ฐธ์กฐํ์๊ธฐ ๋ฐ๋๋๋ค.):
"\\.i?-amp-"("CSS -amp- class name prefix")"!important""charset""@import""@namespace""@document""@page""@viewport"
ํ๊ทธ์ ์์ฑ ๋ด์์ ํ์ฉ๋์ง ์๋ ํน์ฑ
| ์ฝ๋ | DISALLOWED_PROPERTY_IN_ATTR_VALUE |
| ํ์ | "The property '%1' in attribute '%2' in tag '%3' is disallowed." |
| ํด๊ฒฐ์ฑ | ํด๋น ์์ฑ์์ ํ์ฉ๋์ง ์๋ ํน์ฑ์ ์ญ์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ์ฉ๋์ง ์๋ ํน์ฑ ์ด๋ฆ์ด ์์ฑ ๋ด์ ์์ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค.
์ด ๋งฅ๋ฝ์์ ํน์ฑ(property)์ด๋ ์์ฑ ๋ด์ ๊ตฌ์กฐํ๋ ํค/๊ฐ ๋ฐ์ดํฐ๋ฅผ ์๋ฏธํฉ๋๋ค.
์๋ฅผ ๋ค์ด
<meta name="viewport content="width=device-width;minimum-scale=1">์์
width์ minimum-scale์ด ํน์ฑ ์ด๋ฆ์
๋๋ค.
๋ค์์ DISALLOWED_PROPERTY_IN_ATTR_VALUE ์ค๋ฅ๋ฅผ ์ ๋ฐํฉ๋๋ค:
<meta name="viewport content="width=device-width;invalidfoo=1">
๋ค์์ ์์์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค:
<meta http-equiv="X-UA-Compatible" content="invalidfoo=edge">
๋ค์๊ณผ ๊ฐ์ด ์์ ๋์ด์ผ ํฉ๋๋ค: <meta http-equiv="X-UA-Compatible" content="ie=edge">
์๋ชป๋ ํน์ฑ ๊ฐ
| ์ฝ๋ | INVALID_PROPERTY_VALUE_IN_ATTR_VALUE |
| ํ์ | "The property '%1' in attribute '%2' in tag '%3' is set to '%4', which is invalid." |
| ํด๊ฒฐ์ฑ | ์๋ชป๋ ํน์ฑ ๊ฐ์ ์์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์์ฑ ๋ด ํน์ฑ ๊ฐ์ด ์๋ชป๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค.
์ด ๋งฅ๋ฝ์์ ํน์ฑ(property)์ด๋ ์์ฑ ๋ด์ ๊ตฌ์กฐํ๋ ํค/๊ฐ ๋ฐ์ดํฐ๋ฅผ ์๋ฏธํฉ๋๋ค.
์๋ฅผ ๋ค์ด
<meta name="viewport content="width=device-width;minimum-scale=1">์์
device-width์ 1์ ํน์ฑ ๊ฐ์
๋๋ค.
๋ค์์ INVALID_PROPERTY_VALUE_IN_ATTR_VALUE ์ค๋ฅ๋ฅผ ์ ๋ฐํฉ๋๋ค:
<meta name=viewport content="width=device-width;minimum-scale=invalidfoo">
amp-video ๊ตฌ์ฑ์์์ autoplay, controls, loop ์์ฑ)์ ์ถ๋ ฅํ๋ ค๊ณ ํ ๋ HTML ๊ฐ๋ฐ ๊ณผ์ ์์ true์ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ์ด์ง๋ง ์ ํจํ์ง ์์ ๊ฐ(์: React๋ฅผ ์ฌ์ฉํ๋ฉด ๊ธฐ๋ณธ์ ์ผ๋ก <amp-video autoplay="true" ...>๊ฐ ์์ฑ๋๋ ๊ฒฝ์ฐ)์ด ์์ฑ๋๋ ๊ฒฝ์ฐ ์์ฑ ์ด๋ฆ์ ๊ฐ์ผ๋ก ์ถ๋ ฅํ๋ฉด ํด๊ฒฐ๋ฉ๋๋ค. ์๋ฅผ ๋ค์ด ๋ค์๊ณผ ๊ฐ์ต๋๋ค. <amp-video autoplay="autoplay" ...> URL ๋๋ฝ
| ์ฝ๋ | MISSING_URL |
| ํ์ | "Missing URL for attribute '%1' in tag '%2'." |
| ํด๊ฒฐ์ฑ | ์ ํจํ URL์ ์ถ๊ฐํฉ๋๋ค. |
์ด ์ค๋ฅ๋ URL์ ํ์๋ก ํ๋ ์์ฑ์์ URL์ด ๋๋ฝ๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค.
์๋ฅผ ๋ค์ด href๋ src ์์ฑ์ด ๋น์ด ์๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค.
์๋ชป๋ URL
| ์ฝ๋ | INVALID_URL_PROTOCOL |
| ํ์ | "Malformed URL '%3' for attribute '%1' in tag '%2'" |
| ํด๊ฒฐ์ฑ | ์๋ชป๋ URL์ ์์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์์ฑ์ URL์ด ํฌํจ๋์ด ์์ผ๋ URL์ด ์๋ชป๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค.
์๋ชป๋ URL ํ๋กํ ์ฝ
| ์ฝ๋ | INVALID_URL_PROTOCOL |
| ํ์ | Invalid URL protocol '%3:' for attribute '%1' in tag '%2'. |
| ํด๊ฒฐ์ฑ | ์ฌ๋ฐ๋ฅธ ํ๋กํ ์ฝ๋ก ๋ณ๊ฒฝํฉ๋๋ค. ์๋ฅผ ๋ค์ด `http`๋ฅผ `https`๋ก ๋ณ๊ฒฝํด์ผ ํ ์ ์์ต๋๋ค. |
์ด ์ค๋ฅ๋ ํน์ ํ๋กํ ์ฝ๋ก ์ค์ ๋์ด์ผ ํ๋
href ๋๋ src๊ฐ ํฌํจ๋ ํ๊ทธ์ ๋ฐ์ํฉ๋๋ค.
์๋ฅผ ๋ค์ด https๋ฅผ ํ์๋ก ํ๋ ํ๊ทธ๊ฐ ๋ง์ต๋๋ค.
์์ฑ์์ ํ์ ํน์ฑ ๋๋ฝ
| ์ฝ๋ | MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE |
| ํ์ | "The property '%1' is missing from attribute '%2' in tag '%3'." |
| ํด๊ฒฐ์ฑ | ๋๋ฝ๋ ํน์ฑ์ ์ถ๊ฐํฉ๋๋ค. |
ํ์ฌ ์ด ์ค๋ฅ๋ ๋ค์๊ณผ ๊ฐ์ ํ์ ํน์ฑ์ด ๋๋ฝ๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค:
content="...ie=..."content="...width=..."content="...minimum-scale=..."
์ด ์์ฑ์ ๋ค์์ ์์ ํ๊ทธ๋ฅผ ์ฐธ์กฐํฉ๋๋ค:
<meta http-equiv="X-UA-Compatible" content="ie=edge"><meta name=viewport content="width=device-width;minimum-scale=1">
์ํธ ๋ฐฐํ์ ์ธ ์์ฑ
| ์ฝ๋ | MUTUALLY_EXCLUSIVE_ATTRS |
| ํ์ | "Mutually exclusive attributes encountered in tag '%1' - pick one of %2." |
| ํด๊ฒฐ์ฑ | ์ํธ ๋ฐฐํ์ ์ธ ์์ฑ ์ค ํ๋๋ฅผ ์ญ์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ๊ทธ์ ์ํธ ๋ฐฐํ์ ์ธ ์์ฑ์ด ํฌํจ๋์ด ์์ ๋ ๋ฐ์ํฉ๋๋ค. ์๋ฅผ ๋ค์ด ๋ค์ ํ๊ทธ์์๋ ํ๋์ ์์ฑ๋ง ํ์ฉ๋ฉ๋๋ค:
amp-iframe:src๋๋srcdocamp-jwplayer:data-media-id๋๋data-playlist-id
๋ชฉ๋ก์์ ํ์ ์์ฑ ๋๋ฝ
| ์ฝ๋ | MANDATORY_ONEOF_ATTR_MISSING |
| ํ์ | "The tag '%1' is missing a mandatory attribute - pick one of %2." |
| ํด๊ฒฐ์ฑ | ์ ๊ณต๋ ์์ฑ ์ค์์ ๋๋ฝ๋ ํ์ ์์ฑ์ ์ ํํ์ฌ ์ถ๊ฐํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ๊ทธ์ ํ์ํ ์ฌ๋ฌ ์์ฑ ์ค ํ๋์ ํ์ ์์ฑ์ด ๋๋ฝ๋ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค. ์๋ฅผ ๋ค์ด ๋ค์ ํ๊ทธ์ ๊ฒฝ์ฐ ๋ ๊ฐ์ง ํ์ ์์ฑ ์ค์ ํ๋๊ฐ ํฌํจ๋์ด์ผ ํฉ๋๋ค:
amp-twitter:data-tweetid๋๋srcamp-instagram:data-shortcode๋๋srcamp-iframe:src๋๋srcdocamp-youtube:src๋๋data-videoid
์๋ชป๋ ์์ ํ๊ทธ
| ์ฝ๋ | WRONG_PARENT_TAG |
| ํ์ | "The parent tag of tag '%1' is '%2', but it can only be '%3'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ๋ฅผ ํ์ํ ์์ ํ๊ทธ์ ์ง์ ํ์ ํ๊ทธ๋ก ๋ง๋ญ๋๋ค. |
ํน์ ํ๊ทธ๋ ๋จผ ์์ ์์๊ฐ ์๋ ์ง์ ์์ ํ๊ทธ๋ฅผ ํ์๋ก ํฉ๋๋ค. ๋ค์์ ๋ชฉ๋ก์์ ํน์ ํ๊ทธ์ ํ์ํ ์์ ํ๊ทธ(ํ๊ทธ, ์์์)๋ฅผ ํ์ธํ ์ ์์ต๋๋ค:
!doctype์๋ ์์ ํ๊ทธroot๊ฐ ํ์ํฉ๋๋ค.html์๋ ์์ ํ๊ทธ!doctype์ด ํ์ํฉ๋๋ค.head์๋ ์์ ํ๊ทธhtml์ด ํ์ํฉ๋๋ค.body์๋ ์์ ํ๊ทธhtml์ด ํ์ํฉ๋๋ค.link์๋ ์์ ํ๊ทธhead๊ฐ ํ์ํฉ๋๋ค.meta์๋ ์์ ํ๊ทธhead๊ฐ ํ์ํฉ๋๋ค.style amp-custom์๋ ์์ ํ๊ทธhead๊ฐ ํ์ํฉ๋๋ค.style์๋ ์์ ํ๊ทธboilerplate(noscript)๊ฐ ํ์ํฉ๋๋ค.noscript์๋ ์์ ํ๊ทธhead๊ฐ ํ์ํฉ๋๋ค.script์๋ ์์ ํ๊ทธhead๊ฐ ํ์ํฉ๋๋ค.source์๋ ๋ฏธ๋์ด ํ๊ทธ(amp-audio,amp-video๋ฑ)๊ฐ ํ์ํฉ๋๋ค.
ํ์ฉ๋์ง ์๋ ํ๊ทธ ์์ ์์
| ์ฝ๋ | DISALLOWED_TAG_ANCESTOR |
| ํ์ | "The tag '%1' may not appear as a descendant of tag '%2'." |
| ํด๊ฒฐ์ฑ | ํ์ฉ๋์ง ์๋ ์ค์ฒฉ ํ๊ทธ๋ฅผ ์ญ์ (๋๋ ์ด๋)ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ๊ทธ๊ฐ ์ ํจ์ฑ์ด ๊ฒ์ฌ๋์ง ์๋
๋ค๋ฅธ ํ๊ทธ์ ํ์ ์์์ผ ๋ ๋ฐ์ํฉ๋๋ค.
ํ์ฌ ์ด ์ค๋ฅ์ ์ ์ผํ ์๋ก template ํ๊ทธ๊ฐ ์์ต๋๋ค.
์ด ํ๊ทธ๋ ๋ค๋ฅธ template ํ๊ทธ ์๋์ ์ค์ฒฉ๋์ด์๋ ์ ๋ฉ๋๋ค.
ํ์ ํ๊ทธ ์์ ์์
| ์ฝ๋ | MANDATORY_TAG_ANCESTOR |
| ํ์ | "The tag '%1' may only appear as a descendant of tag '%2'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ๋ฅผ ์ญ์ ํ๊ฑฐ๋ ํน์ ํ๊ทธ์ ํ์ ์์๋ก ๋ง๋ญ๋๋ค. |
ํ์ ํ์ ์์๋
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์
mandatory_ancestor๋ก ์ ์๋์ด ์์ต๋๋ค.
์ด ์ค๋ฅ๋ ๋ค์ ํ๊ทธ์
mandatory_ancestor(ํ๊ทธ, ์์ ์์)๊ฐ ๋๋ฝ๋ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค:
img๋noscript์ ํ์ ์์์ฌ์ผ ํฉ๋๋ค.video๋noscript์ ํ์ ์์์ฌ์ผ ํฉ๋๋ค.audio๋noscript์ ํ์ ์์์ฌ์ผ ํฉ๋๋ค.noscript๋body์ ํ์ ์์์ฌ์ผ ํฉ๋๋ค.
ํํธ๊ฐ ์๋ ํ์ ํ๊ทธ ์์ ์์
| ์ฝ๋ | MANDATORY_TAG_ANCESTOR_WITH_HINT |
| ํ์ | "The tag '%1' may only appear as a descendant of tag '%2'. Did you mean '%3'?' |
| ํด๊ฒฐ์ฑ | ํ๊ทธ๋ฅผ ์ญ์ ํ๊ฑฐ๋, ํ๊ทธ๋ฅผ ํน์ ํ๊ทธ์ ํ์ ์์๋ก ๋ง๋ค๊ฑฐ๋, ํํธ ํ๊ทธ๋ก ๊ต์ฒดํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ๋ค์์ ํ๊ทธ ์ค ํ๋๊ฐ AMP ๋ฌธ์์ ์์ง๋ง ํ์ ์์ ํ๊ทธ์ ์ ๋๋ก ์ค์ฒฉ๋์ด ์์ง ์์ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค:
img๋noscript์์ ํ๊ทธ ๋ด์ ์์นํด์๋ ์ ๋ฉ๋๋ค.video๋noscript์์ ํ๊ทธ ๋ด์ ์์นํด์๋ ์ ๋ฉ๋๋ค.audio๋noscript์์ ํ๊ทธ ๋ด์ ์์นํด์๋ ์ ๋ฉ๋๋ค.noscript๋body์์ ํ๊ทธ ๋ด์ ์์นํด์๋ ์ ๋ฉ๋๋ค.
๊ณ ์ ํ๊ทธ ์ค๋ณต
| ์ฝ๋ | DUPLICATE_UNIQUE_TAG |
| ํ์ | "The tag '%1' appears more than once in the document." |
| ํด๊ฒฐ์ฑ | AMP ๋ฌธ์์์ ์ค๋ณต๋ ํ๊ทธ ์ค ํ๋๋ฅผ ์ญ์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ๊ทธ์ ์ธ์คํด์ค๊ฐ ์ ํํ ํ๋๋ง ํ์ฉ๋๋ ์ํฉ์์ ์ค๋ณต์ด ๋ฐ๊ฒฌ๋ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค.
๋ชจ๋ ๊ณ ์ ํ๊ทธ๋ฅผ ๋์ดํ๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
<doctype html><html amp><head><link rel=canonical href=...><link rel=amphtml href=...><meta charset="utf-8"><meta viewport><style amp-custom><style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript><body><script src="https://cdn.ampproject.org/v0.js">
์คํ์ผ ๋ฐ ๋ ์ด์์ ์ค๋ฅ
์คํ์ผ๊ณผ ๋ ์ด์์ ์ค๋ฅ๋ฅผ ์ดํด๋ณด๊ธฐ ์ ์ AMP์์ ์คํ์ผ๋ง๊ณผ ๋ ์ด์์์ด ์ด๋ป๊ฒ ์๋ํ๋์ง ์์๋ณด๋ ๊ฒ์ด ์ข์ต๋๋ค. AMP ํ์ด์ง๋ HTML ํ์ด์ง์ด๊ธฐ ๋๋ฌธ์ HTML ํ์ด์ง์ ์คํ์ผ๋ง์ด ๊ฑฐ์ ์ ์ฌํฉ๋๋ค. ํ์ง๋ง ํ์ด์ง๊ฐ ๋นจ๋ฆฌ ๋ก๋๋๊ฒ ํ๊ธฐ ์ํด ๋ช ๊ฐ์ง ์ ํ์ฌํญ์ด ์์ผ๋ฉฐ AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๋ ์ด๋ฌํ ์ ํ์ฌํญ์ ์ ์ฉํฉ๋๋ค.
๋ ์ด์์์ AMP ํ์ด์ง์์ ์ข ๋ ๊ธฐ์ค์ด ๊น๋ค๋กญ์ต๋๋ค. ํ์ด์ง์ ํ์๋๋ ๋ชจ๋ ํ๊ทธ๋ ์ฌ์ ์ ์๋ ๋์ด์ ๋๋น๋ฅผ ํ์๋ก ํ๋ฉฐ ์ด๋ฅผ ํตํด ๋ ๋๋ง ๋ฐ ์คํฌ๋กค ๋ฌธ์ ๊ฐ ํฌ๊ฒ ์ค์ด๋ญ๋๋ค. ํ์ง๋ง ์ง์ ์ด๋ฌํ ์์ฑ์ ํฌํจํด์ผ ํ๋ ๊ฒ์ ์๋๋๋ค. ํน์ ๋ ์ด์์ ์ ํ์ ๊ฒฝ์ฐ AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ์์ ๊ธฐ๋ณธ๊ฐ์ ์ถ์ ํ๋ฏ๋ก ์ค๋ฅ๋ฅผ ํ์ํ์ง ์์ต๋๋ค.
๊ฐ AMP ํ๊ทธ์๋
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์ ์ ์๋ ๊ฒ์ฒ๋ผ
supported_layouts ๋ชฉ๋ก์ด ์์ต๋๋ค.
์ง์๋์ง ์๋ ๋ ์ด์์์ด ์๋ ๊ฒฝ์ฐ ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ์์ ์ค๋ฅ๊ฐ ํ์๋๋ฉฐ
์ฌ์ ์ ์๋ ๋ ์ด์์์ ์ ํจ์ฑ ๊ฒ์ฌ ๊ท์น์ ํ์ธํฉ๋๋ค.
์คํ์ผ์ํธ๊ฐ ๋๋ฌด ๊ธด ๊ฒฝ์ฐ
| ์ฝ๋ | STYLESHEET_TOO_LONG |
| ํ์ | ''style' ํ๊ทธ์ ์ง์ ๋ ์์ฑ์ ์คํ์ผ์ํธ๊ฐ ๋๋ฌด ๊น๋๋ค. %1๋ฐ์ดํธ๋ก ํ์๋์ด ์์ผ๋ ํ๋๋ %2๋ฐ์ดํธ์ ๋๋ค.' |
| ํด๊ฒฐ์ฑ | ์คํ์ผ์ํธ ํฌ๊ธฐ๋ฅผ 75,000๋ฐ์ดํธ ๋ฏธ๋ง์ผ๋ก ์กฐ์ ํฉ๋๋ค. |
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ์์
<style amp-custom> ๋ด์ ์คํ์ผ ์ฝํ
์ธ ํฌ๊ธฐ๋ฅผ ์ธก์ ํ์ ๋
50,000๋ฐ์ดํธ ํ๋๋ฅผ ์ด๊ณผํ๋ ๊ฒฝ์ฐ ์ด ์ค๋ฅ๊ฐ ํ์๋ฉ๋๋ค.
CSS ๊ตฌ๋ฌธ ์ค๋ฅ
| ์ฝ๋ | CSS_SYNTAX |
| ํ์ | "CSS syntax error in tag '%1' - %2." |
| ํด๊ฒฐ์ฑ | CSS ๊ตฌ๋ฌธ ์ค๋ฅ๋ฅผ ์์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์ง์ ๋ ํ๊ทธ์ CSS ๊ตฌ๋ฌธ ์ค๋ฅ๊ฐ ์์ ๋ ๋ฐ์ํฉ๋๋ค. ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ ์์ธ์ ์ ์ ์๋ค๋ฉด csslint ๋ฑ์ ์จ๋ผ์ธ CSS ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๋ฅผ ํตํด CSS๋ฅผ ์คํํด ๋ณด์๊ธฐ ๋ฐ๋๋๋ค.
ํน์ ๊ท์น์ CSS ๊ตฌ๋ฌธ ์ค๋ฅ
| ์ฝ๋ | CSS_SYNTAX_INVALID_AT_RULE |
| ํ์ | "CSS syntax error in tag '%1' - saw invalid at rule '%2'." |
| ํด๊ฒฐ์ฑ | ํด๋น CSS ๊ตฌ๋ฌธ ์ค๋ฅ๋ฅผ ์์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ AMP์์ ๋ช ๊ฐ์ง ๊ท์น๋ง์ด ํ์ฉ๋๋
CSS ๋ด @ ๊ท์น์ ๋งํฉ๋๋ค.
AMP ์ฌ์๋ ์ฐธ์กฐํ์ธ์.
์๋ฅผ ๋ค์ด @import๋ ํ์ฉ๋์ง ์์ต๋๋ค.
์ด ์ ํจ์ฑ ์ค๋ฅ๋
์๋ชป๋ ๊ท์น์ด ๋ฌด์์ธ์ง ๊ตฌ์ฒด์ ์ผ๋ก ์๋ ค ์ฃผ๊ธฐ ๋๋ฌธ์
๊ท์น์ ์์ ํ๊ธฐ ์ฝ์ต๋๋ค.
์์๋ ๋ ์ด์์์ AMP ํ๊ทธ๊ฐ ์ง์ํ์ง ์์
| ์ฝ๋ | IMPLIED_LAYOUT_INVALID |
| ํ์ | "The implied layout '%1' is not supported by tag '%2'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์ ์ฌ๋ฐ๋ฅธ ๋ ์ด์์ ์์ฑ์ ์ ๊ณตํฉ๋๋ค. |
์ด ์ค๋ฅ๋ AMP ํ๊ทธ์ ํน์ ๋ ์ด์์์ ์ง์ ํ์ง ์์์ ๋
๋๋น, ๋์ด, ํฌ๊ธฐ์ ์ํด ์์๋๋ ๋ ์ด์์์ด ์ง์๋์ง ์์ ๋ ๋ฐ์ํฉ๋๋ค.
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์์
ํ๊ทธ์ supported_layout ๊ฐ์ ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.
์ค์ ๋ ์ด์์ ๋์์ layout ์์ฑ์ ๋ฐ๋ผ ๊ฒฐ์ ๋ฉ๋๋ค.
๋ ์ด์์์ด ์๋ํ๋ ๋ฐฉ๋ฒ์ ์์ธํ ์์๋ณด๋ ค๋ฉด
๋ ์ด์์ ์ ์ด ๋ฐฉ๋ฒ ๋ฐ
AMP HTML ๋ ์ด์์ ์์คํ
์ฌ์์ ์ฐธ์กฐํ์๊ธฐ ๋ฐ๋๋๋ค.
์ฐธ๊ณ : ๋ ์ด์์์ ์ง์ ํ์ง ์๊ณ
width ๋ฐ height ๊ฐ์ ํฌํจํ์ง ์์ผ๋ฉด
๋ ์ด์์์ด ๊ธฐ๋ณธ์ ์ผ๋ก CONTAINER๋ก ์ค์ ๋ฉ๋๋ค.
CONTAINER๋ ์ด๋ ํ AMP ํ๊ทธ์์๋ ์ง์๋์ง ์์ผ๋ฏ๋ก
์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ์ ์ค๋ฅ๊ฐ ํ์๋ฉ๋๋ค.
CONTAINER๊ฐ ์๋ ๋ ์ด์์์ ์ง์ ํ๊ฑฐ๋
width ๋๋ height ๊ฐ์ ์ถ๊ฐํ๋ฉด ์ค๋ฅ๊ฐ ์์ด์ง๋๋ค.
์์์ ๋ ์ด์์์์ ํ์ฉ๋์ง ์๋ ์์ฑ
| ์ฝ๋ | ATTR_DISALLOWED_BY_IMPLIED_LAYOUT |
| ํ์ | "The attribute '%1' in tag '%2' is disallowed by implied layout '%3'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์์ ํ์ฉ๋์ง ์๋ ์์ฑ์ ์ญ์ ํ๊ฑฐ๋ ์์ฑ์ ํ์ฉํ๋ ๋ ์ด์์์ ์ง์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ AMP ํ๊ทธ์ ํน์ ๋ ์ด์์์ ์ง์ ํ์ง ์์์ ๋ ์์์ ๋ ์ด์์์ ํ์ฉ๋์ง ์๋ ์์ฑ์ด ํฌํจ๋์ด ์์ ๋ ๋ฐ์ํฉ๋๋ค. ๋ ์ด์์ ์ ํ๋ณ๋ก ํ์ฉ๋์ง ์๋ ์์ฑ์ AMP HTML ๋ ์ด์์ ์์คํ ์ฌ์์ ์ค๋ช ๋์ด ์์ต๋๋ค.
AMP ํ๊ทธ๊ฐ ์ง์ ๋ ๋ ์ด์์์ ์ง์ํ์ง ์์
| ์ฝ๋ | SPECIFIED_LAYOUT_INVALID |
| ํ์ | "The specified layout '%1' is not supported by tag '%2'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์์ ์ง์ํ๋ ๋ ์ด์์์ ์ง์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ํ๊ทธ์ ์ง์ ๋ ๋ ์ด์์์ด
์ง์๋์ง ์์ ๋ ๋ฐ์ํฉ๋๋ค.
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์์
ํ๊ทธ์ supported_layout ๊ฐ์ ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.
์ค์ ๋ ์ด์์ ๋์์ layout ์์ฑ์ ๋ฐ๋ผ ๊ฒฐ์ ๋ฉ๋๋ค.
๋ ์ด์์์ด ์๋ํ๋ ๋ฐฉ๋ฒ์ ์์ธํ ์์๋ณด๋ ค๋ฉด
๋ ์ด์์ ์ ์ด ๋ฐฉ๋ฒ ๋ฐ
AMP HTML ๋ ์ด์์ ์์คํ
์ฌ์์ ์ฐธ์กฐํ์๊ธฐ ๋ฐ๋๋๋ค.
์ง์ ๋ ๋ ์ด์์์์ ํ์ฉ๋์ง ์๋ ์์ฑ
| ์ฝ๋ | ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT |
| ํ์ | "The attribute '%1' in tag '%2' is disallowed by implied layout '%3'." |
| ํด๊ฒฐ์ฑ | ํ๊ทธ์์ ํ์ฉ๋์ง ์๋ ์์ฑ์ ์ญ์ ํ๊ฑฐ๋ ์์ฑ์ ํ์ฉํ๋ ๋ ์ด์์์ ์ง์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ AMP ํ๊ทธ์ ํน์ ๋ ์ด์์์ ์ง์ ํ๋๋ฐ ๋ ์ด์์์ ํ์ฉ๋์ง ์๋ ์์ฑ์ด ํฌํจ๋์ด ์์ ๋ ๋ฐ์ํฉ๋๋ค. ๋ ์ด์์ ์ ํ๋ณ๋ก ํ์ฉ๋์ง ์๋ ์์ฑ์ AMP HTML ๋ ์ด์์ ์์คํ ์ฌ์์ ์ค๋ช ๋์ด ์์ต๋๋ค.
๋ ์ด์์์์ ํ์๋ก ํ๋ ์์ฑ ๊ฐ์ด ์๋ชป๋จ
| ์ฝ๋ | ATTR_VALUE_REQUIRED_BY_LAYOUT |
| ํ์ | "Invalid value '%1' for attribute '%2' in tag '%3' - for layout '%4', set the attribute '%2' to value '%5'." |
| ํด๊ฒฐ์ฑ | ์์ฑ์ ์ง์ ๋ ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์์ฑ ๊ฐ์ด ์ง์ ๋ ๋ ์ด์์์ ๋ง์ง ์์ ๋ ๋ฐ์ํฉ๋๋ค. ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ ์ด์ ๋ฅผ ์ดํดํ๋ ค๋ฉด ๋ ์ด์์์ ๋ค์ํ ๋์์ ์์งํด์ผ ํฉ๋๋ค.
๋ ์ด์์์ fixed-height์ผ๋ก ์ค์ ํ๊ณ
height์ width ์์น๋ฅผ ํฌํจํ๋ค๊ณ ์๊ฐํด ๋ด
์๋ค.
fixed-height ๋ ์ด์์์ height ๊ฐ์ ์ทจํฉ๋๋ค.
๋ฐ๋ผ์ width ์์ฑ์ ์กด์ฌํ์ง ์๊ฑฐ๋ auto๋ก ์ค์ ๋์ด์ผ ํฉ๋๋ค.
์ด ๊ฒฝ์ฐ ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ์์ ATTR_VALUE_REQUIRED_BY_LAYOUT์ด ํ์๋ฉ๋๋ค.
๋๋น ๋ฐ ๋์ด ๋จ์ ๋ถ์ผ์น
| ์ฝ๋ | INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT |
| ํ์ | "Inconsistent units for width and height in tag '%1' - width is specified in '%2' whereas height is specified in '%3'." |
| ํด๊ฒฐ์ฑ | ๋๋น์ ๋์ด๋ฅผ ์ผ๊ด๋ ๋จ์๋ก ์ ๊ณตํฉ๋๋ค. |
layout=fixed์ ๊ฒฝ์ฐ๋ฅผ ์ ์ธํ๋ฉด
๋๋น์ ๋์ด ์์ฑ์ ๋์ผํ ๋จ์๋ก ํํ๋์ด์ผ ํฉ๋๋ค.
๋์ผํ ๋จ์๋ก ํ์๋์ง ์์ผ๋ฉด ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
์๋ฅผ ๋ค์ด <amp-img src="" layout="responsive" width="42px" height="42rem">์ ๊ฒฝ์ฐ
๋ค์์ ์ค๋ฅ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค:
'ํ๊ทธ 'amp-img ์ ๋๋น์ ๋์ด ๋จ์๊ฐ ์ผ์นํ์ง ์์ต๋๋ค. ๋๋น๋ 'px'๋ก ์ง์ ๋์ด ์์ผ๋ฉฐ ๋์ด๋ 'rem'์ผ๋ก ์ง์ ๋์ด ์์ต๋๋ค.'
ํ ํ๋ฆฟ ์ค๋ฅ
AMP ํ๊ทธ ๋ด ๊ตฌ๋ฌธ์ด
amp-mustache
๋ฑ์ ํ
ํ๋ฆฟ์ ํฌํจํ๋๋ก ์ค๊ณ๋์ด ์๋ ๊ฒฝ์ฐ๊ฐ ์๋๋ผ๋ฉด
AMP ํ์ด์ง๋ ํ
ํ๋ฆฟ ๊ตฌ๋ฌธ์ ํฌํจํ ์ ์์ต๋๋ค.
์์ค ํ์ผ์์ ์์ฑ๋ ๊ฒฐ๊ณผ์ ํ ํ๋ฆฟ์ด ํฌํจ๋์ด ์์ง ์๋ค๋ฉด ์์ค ํ์ผ์ ํ ํ๋ฆฟ์ ํฌํจํด๋ ๊ด์ฐฎ์ต๋๋ค. CSS ํ๋ฆฌํ๋ก์ธ์ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ์ฐธ์กฐํ์ธ์.
์์ฑ์ ํ ํ๋ฆฟ ๊ตฌ๋ฌธ ํฌํจ
| ์ฝ๋ | TEMPLATE_IN_ATTR_NAME |
| ํ์ | "Mustache template syntax in attribute name '%1' in tag '%2'." |
| ํด๊ฒฐ์ฑ | ์์ฑ์์ Mustache ํ ํ๋ฆฟ ๊ตฌ๋ฌธ์ ์ญ์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๊ฐ ์์ฑ ๊ฐ์์ Mustache ํ ํ๋ฆฟ ๊ตฌ๋ฌธ์ ๋ฐ๊ฒฌํ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค.
์์ฑ์ ์ด์ค์ผ์ดํ ์ฒ๋ฆฌ๋์ง ์์ ํ ํ๋ฆฟ ๊ตฌ๋ฌธ ํฌํจ
| ์ฝ๋ | UNESCAPED_TEMPLATE_IN_ATTR_VALUE |
| ํ์ | "The attribute '%1' in tag '%2' is set to '%3', which contains unescaped Mustache template syntax." |
| ํด๊ฒฐ์ฑ | Mustache ํ ํ๋ฆฟ์ ์ด์ค์ผ์ดํ ์ฒ๋ฆฌํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๊ฐ ์์ฑ ๊ฐ์์ ์ด์ค์ผ์ดํ ์ฒ๋ฆฌ๋์ง ์์ Mustache ํ ํ๋ฆฟ ๊ตฌ๋ฌธ์ ๋ฐ๊ฒฌํ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค.
์์ฑ์ ํ ํ๋ฆฟ ๋ถ๋ถ ํฌํจ
| ์ฝ๋ | TEMPLATE_PARTIAL_IN_ATTR_VALUE |
| ํ์ | "The attribute '%1' in tag '%2' is set to '%3', which contains a Mustache template partial." |
| ํด๊ฒฐ์ฑ | Mustache ๋ถ๋ถ์ ์ญ์ ํฉ๋๋ค. |
์ด ์ค๋ฅ๋ ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ๊ฐ ์์ฑ ๊ฐ์์ Mustache ๋ถ๋ถ์ ๋ฐ๊ฒฌํ ๊ฒฝ์ฐ ๋ฐ์ํฉ๋๋ค.
์ง์ ์ค๋จ ์ค๋ฅ
์ง์ ์ค๋จ๋ ํ๊ทธ
| ์ฝ๋ | DEPRECATED_TAG |
| ํ์ | ์ค๋ฅ ๋ฉ์์ง๊ฐ ์์ง ์ ์๋์ง ์์์ต๋๋ค(์ง์ ์ค๋จ๋ ํ๊ทธ ์์). |
| ํด๊ฒฐ์ฑ | ์ง์ ์ค๋จ๋ ํ๊ทธ๋ฅผ ์ญ์ ํฉ๋๋ค. |
์ด ๊ฒฝ๊ณ ๋ ์ด์ ์ ์ ํจํ๋ AMP ํ๊ทธ๊ฐ AMP ๋ฌธ์์์ ๋ฐ๊ฒฌ๋์์ ๋ ํ์๋ฉ๋๋ค. ์ด๋ ๊ฒฝ๊ณ ์ผ ๋ฟ์ด๋ฉฐ ๊ฒฝ๊ณ ๊ฐ ์๋ AMP ๋ฌธ์๋ ์ฌ์ ํ ์ ํจํฉ๋๋ค. ํ์ฌ ์ง์ ์ค๋จ๋ ํ๊ทธ๋ ์์ต๋๋ค. ์ด ๊ฒฝ๊ณ ๋ ํฅํ์ ์ง์ ์ค๋จ๋ ํ๊ทธ๊ฐ ๋ฐ์ํ ๊ฒฝ์ฐ ์ฌ์ฉ๋ฉ๋๋ค.
์ง์ ์ค๋จ๋ ์์ฑ
| ์ฝ๋ | DEPRECATED_ATTR |
| ํ์ | "The attribute '%1' in tag '%2' is deprecated - use '%3' instead." |
| ํด๊ฒฐ์ฑ | ์ง์ ์ค๋จ๋ ์์ฑ์ ์ญ์ ํ๋ ๊ฒ์ด ์ข์ต๋๋ค. |
์ด ๊ฒฝ๊ณ ๋ ์ด์ ์ ์ ํจํ๋ AMP ์์ฑ์ด AMP ๋ฌธ์์์ ๋ฐ๊ฒฌ๋์์ ๋ ํ์๋ฉ๋๋ค. ์ด๋ ๊ฒฝ๊ณ ์ผ ๋ฟ์ด๋ฉฐ ๊ฒฝ๊ณ ๊ฐ ์๋ AMP ๋ฌธ์๋ ์ฌ์ ํ ์ ํจํฉ๋๋ค.
AMP ์ ํจ์ฑ ๊ฒ์ฌ ๋๊ตฌ ์ฌ์์์
deprecation์ ๊ฒ์ํ์ฌ AMP ํ๊ทธ๋ณ๋ก
์ง์ ์ค๋จ๋ ์์ฑ์ ํ์ธํ์๊ธฐ ๋ฐ๋๋๋ค.