mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 14:15:33 +03:00
Move some meta tags from elm-pages.config.mjs template to Elm code.
This commit is contained in:
parent
219204b8e9
commit
7c9fb152c8
@ -24,7 +24,12 @@ type alias Data =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
, Head.icon [ ( 16, 16 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 16)
|
||||
, Head.appleTouchIcon (Just 180) (cloudinaryIcon MimeType.Png 180)
|
||||
, Head.appleTouchIcon (Just 192) (cloudinaryIcon MimeType.Png 192)
|
||||
|
@ -17,7 +17,12 @@ config =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
, Head.icon [ ( 16, 16 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 16)
|
||||
, Head.appleTouchIcon (Just 180) (cloudinaryIcon MimeType.Png 180)
|
||||
, Head.appleTouchIcon (Just 192) (cloudinaryIcon MimeType.Png 192)
|
||||
|
@ -11,14 +11,6 @@ export default {
|
||||
}),
|
||||
headTagsTemplate: (context) => `
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<meta name="generator" content="elm-pages v${context.cliVersion}" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta
|
||||
name="apple-mobile-web-app-status-bar-style"
|
||||
content="black-translucent"
|
||||
/>
|
||||
`,
|
||||
};
|
||||
|
@ -20,7 +20,12 @@ config =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.sitemapLink "/sitemap.xml"
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.sitemapLink "/sitemap.xml"
|
||||
]
|
||||
|> DataSource.succeed
|
||||
|
||||
|
10
examples/escaping/dist/escaping/index.html
vendored
10
examples/escaping/dist/escaping/index.html
vendored
@ -8,17 +8,9 @@
|
||||
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta
|
||||
name="apple-mobile-web-app-status-bar-style"
|
||||
content="black-translucent"
|
||||
/>
|
||||
|
||||
<link rel="canonical" href="https://elm-pages.com/escaping" /> <meta name="description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="og:image" content="TODO" /> <meta property="og:image:secure_url" content="TODO" /> <meta property="og:image:alt" content="elm-pages logo" /> <meta property="og:title" content="TODO title" /> <meta property="og:url" content="https://elm-pages.com/escaping" /> <meta property="og:description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="og:site_name" content="elm-pages" /> <meta property="twitter:card" content="summary" /> <meta property="twitter:title" content="TODO title" /> <meta property="twitter:description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="twitter:image" content="TODO" /> <meta property="twitter:image:alt" content="elm-pages logo" /> <meta property="og:type" content="website" /> <link rel="icon" sizes="32x32" type="image/png" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_32,h_32,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="icon" sizes="16x16" type="image/png" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_16,h_16,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="apple-touch-icon" sizes="180x180" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_180,h_180,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="apple-touch-icon" sizes="192x192" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_192,h_192,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="sitemap" type="application/xml" href="/sitemap.xml" />
|
||||
<link rel="canonical" href="https://elm-pages.com/escaping" /> <meta name="description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="og:image" content="TODO" /> <meta property="og:image:secure_url" content="TODO" /> <meta property="og:image:alt" content="elm-pages logo" /> <meta property="og:title" content="TODO title" /> <meta property="og:url" content="https://elm-pages.com/escaping" /> <meta property="og:description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="og:site_name" content="elm-pages" /> <meta property="twitter:card" content="summary" /> <meta property="twitter:title" content="TODO title" /> <meta property="twitter:description" content="These quotes should be escaped "ESCAPE THIS", and so should <CARETS>" /> <meta property="twitter:image" content="TODO" /> <meta property="twitter:image:alt" content="elm-pages logo" /> <meta property="og:type" content="website" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="mobile-web-app-capable" content="yes" /> <meta name="theme-color" content="#ffffff" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <link rel="icon" sizes="32x32" type="image/png" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_32,h_32,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="icon" sizes="16x16" type="image/png" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_16,h_16,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="apple-touch-icon" sizes="180x180" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_180,h_180,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="apple-touch-icon" sizes="192x192" href="https://res.cloudinary.com/dillonkearns/image/upload/c_pad,w_192,h_192,q_auto,f_png/v1603234028/elm-pages/elm-pages-icon" /> <link rel="sitemap" type="application/xml" href="/sitemap.xml" />
|
||||
<script id="__ELM_PAGES_BYTES_DATA__" type="application/octet-stream">AQKEPHNjcmlwdD48L3NjcmlwdD4gaXMgdW5zYWZlIGluIEpTT04gdW5sZXNzIGl0IGlzIGVzY2FwZWQgcHJvcGVybHkuAA==</script>
|
||||
<script type="module" crossorigin src="/assets/index.ad44a3ce.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.dcd1e8f7.css">
|
||||
|
@ -31,7 +31,12 @@ data =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.icon [ ( 32, 32 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 32)
|
||||
, Head.icon [ ( 16, 16 ) ] MimeType.Png (cloudinaryIcon MimeType.Png 16)
|
||||
, Head.appleTouchIcon (Just 180) (cloudinaryIcon MimeType.Png 180)
|
||||
, Head.appleTouchIcon (Just 192) (cloudinaryIcon MimeType.Png 192)
|
||||
|
@ -19,5 +19,10 @@ canonicalUrl =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[]
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
]
|
||||
|> DataSource.succeed
|
||||
|
@ -25,7 +25,12 @@ canonicalUrl =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.sitemapLink "/sitemap.xml"
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.sitemapLink "/sitemap.xml"
|
||||
]
|
||||
|> DataSource.succeed
|
||||
|
||||
|
@ -24,6 +24,11 @@ canonicalUrl =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.sitemapLink "/sitemap.xml"
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.sitemapLink "/sitemap.xml"
|
||||
]
|
||||
|> DataSource.succeed
|
||||
|
@ -23,15 +23,7 @@ async function resolveConfig() {
|
||||
function defaultHeadTagsTemplate(context) {
|
||||
return `
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<meta name="generator" content="elm-pages v${context.cliVersion}" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta
|
||||
name="apple-mobile-web-app-status-bar-style"
|
||||
content="black-translucent"
|
||||
/>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,11 @@ config =
|
||||
|
||||
head : DataSource (List Head.Tag)
|
||||
head =
|
||||
[ Head.sitemapLink "/sitemap.xml"
|
||||
[ Head.metaName "viewport" (Head.raw "width=device-width,initial-scale=1")
|
||||
, Head.metaName "mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "theme-color" (Head.raw "#ffffff")
|
||||
, Head.metaName "apple-mobile-web-app-capable" (Head.raw "yes")
|
||||
, Head.metaName "apple-mobile-web-app-status-bar-style" (Head.raw "black-translucent")
|
||||
, Head.sitemapLink "/sitemap.xml"
|
||||
]
|
||||
|> DataSource.succeed
|
||||
|
Loading…
Reference in New Issue
Block a user