mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated ghost head test to ignore Portal/Search version (#15777)
fixes https://github.com/TryGhost/Team/issues/2152 When updating the Portal of Search version, the snapshots will now remain the same.
This commit is contained in:
parent
231ceedc72
commit
7cefd4f70b
2 changed files with 113 additions and 104 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`{{ghost_head}} helper accent_color attaches style tag to existing script/style tag 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://127.0.0.1:2369/post/amp/\\" />
|
||||
|
@ -70,7 +70,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -134,14 +134,14 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/member-attribution.min.js?v=asset-hash\\"></script><style>:root {--ghost-accent-color: #123456;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper accent_color does not include style tag in AMP context 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -213,7 +213,7 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper accent_color does not include style tag when not set 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://127.0.0.1:2369/post/amp/\\" />
|
||||
|
@ -282,22 +282,22 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper accent_color includes style tag on templates with no context 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
"rendered": "<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script><style>:root {--ghost-accent-color: #123456;}</style>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script><style>:root {--ghost-accent-color: #123456;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper accent_color includes style tag when set 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://127.0.0.1:2369/post/amp/\\" />
|
||||
|
@ -366,13 +366,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script><style>:root {--ghost-accent-color: #123456;}</style>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script><style>:root {--ghost-accent-color: #123456;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper amp is disabled does not contain amphtml link 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -440,7 +440,7 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -726,7 +726,7 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper attribution scripts is included when tracking setting is enabled 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -770,7 +770,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -834,14 +834,14 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/member-attribution.min.js?v=asset-hash\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper attribution scripts is not included when tracking setting is disabled 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -885,7 +885,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -949,13 +949,13 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper members scripts includes portal when members enabled 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -999,7 +999,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -1063,14 +1063,14 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/member-attribution.min.js?v=asset-hash\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper members scripts includes stripe when connected 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -1178,14 +1178,14 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style><script async src=\\"https://js.stripe.com/v3/\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/member-attribution.min.js?v=asset-hash\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper members scripts skips portal and stripe when members are disabled 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1230,13 +1230,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper members scripts skips stripe if not set up 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1280,7 +1280,7 @@ Object {
|
|||
|
||||
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~2.19/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/ghost/portal@~[[VERSION]]/umd/portal.min.js\\" data-ghost=\\"http://127.0.0.1:2369/\\" data-key=\\"xyz\\" data-api=\\"http://127.0.0.1:2369/ghost/api/content/\\" crossorigin=\\"anonymous\\"></script><style id=\\"gh-members-styles\\">.gh-post-upgrade-cta-content,
|
||||
.gh-post-upgrade-cta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -1344,14 +1344,14 @@ Object {
|
|||
.gh-post-upgrade-cta a.gh-btn:hover {
|
||||
opacity: 0.92;
|
||||
}</style>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/member-attribution.min.js?v=asset-hash\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper search scripts includes search when labs flag enabled 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://127.0.0.1:2369/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1397,57 +1397,57 @@ Object {
|
|||
<meta name=\\"ghost-analytics-id\\" content=\\"\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with /site subdirectory returns correct rss url with subdirectory 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/site/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/site/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/site/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/site/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/site/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/site/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with Code Injection handles post codeinjection being empty 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<style>body {background: red;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with Code Injection handles post codeinjection being null 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<style>body {background: red;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with Code Injection outputs post codeinjection as well 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<style>body {background: red;}</style>
|
||||
post-codeinjection",
|
||||
}
|
||||
|
@ -1455,20 +1455,20 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper with Code Injection returns meta tag plus injected code 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<style>body {background: red;}</style>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with Code Injection returns meta tag without injected code for amp context 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
@ -1541,19 +1541,19 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper with changed origin in config file contains the changed origin 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"icon\\" href=\\"/site/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
"rendered": "<link rel=\\"icon\\" href=\\"/site/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/site/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"origin\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/site/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/site/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper with useStructuredData is set to false in config file does not return structured data 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"icon\\" href=\\"/content/images/size/w256h256/favicon.png\\" type=\\"image/png\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
@ -1561,13 +1561,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection disallows indexing for preview pages 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"robots\\" content=\\"noindex,nofollow\\" />
|
||||
<meta name=\\"referrer\\" content=\\"same-origin\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/amp/\\" />
|
||||
|
@ -1585,13 +1585,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost \\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection does not inject count script if comments off 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1636,35 +1636,35 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection does not return structured data on paginated author pages 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/author/authorname1/page/2/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/author/authorname1/page/2/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection does not return structured data on paginated tag pages 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/page/2/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/page/2/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection implicit indexing settings for non-preview pages 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost \\" />
|
||||
|
@ -1674,7 +1674,7 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper without Code Injection injects comment count script if comments all 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1719,14 +1719,14 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/comment-counts.min.js?v=asset-hash\\" data-ghost-comments-counts-api=\\"http://localhost:65530/members/api/comments/counts/\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection injects comment count script if comments paid 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1771,14 +1771,14 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>
|
||||
<script defer src=\\"/public/comment-counts.min.js?v=asset-hash\\" data-ghost-comments-counts-api=\\"http://localhost:65530/members/api/comments/counts/\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection outputs structured data but not schema for custom collection 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/featured/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/featured/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
<meta property=\\"og:site_name\\" content=\\"Ghost\\" />
|
||||
|
@ -1792,13 +1792,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns canonical URL 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/about/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/about/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
<meta property=\\"og:site_name\\" content=\\"Ghost\\" />
|
||||
|
@ -1858,13 +1858,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns meta structured data on homepage with site metadata defined 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site SEO description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site SEO description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -1909,13 +1909,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns meta tag string even if safeVersion is invalid 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
<meta property=\\"og:site_name\\" content=\\"Ghost\\" />
|
||||
|
@ -1929,50 +1929,50 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.9\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns meta tag string on paginated index page without structured data and schema 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/2/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/2/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns next & prev URL correctly for middle page 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/3/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/3/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"prev\\" href=\\"http://localhost:65530/page/2/\\" />
|
||||
<link rel=\\"next\\" href=\\"http://localhost:65530/page/4/\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns next & prev URL correctly for second page 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/2/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/page/2/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"prev\\" href=\\"http://localhost:65530/\\" />
|
||||
<link rel=\\"next\\" href=\\"http://localhost:65530/page/3/\\" />
|
||||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data and schema first tag page with meta description and meta title 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"tag meta description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"tag meta description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2019,13 +2019,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data and schema on first author page with cover image 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"Author bio\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"Author bio\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/author/authorname/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2070,13 +2070,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data if metaTitle and metaDescription have double quotes 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site "test" description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site "test" description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
@ -2152,13 +2152,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on AMP post page with author image and post cover image 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2237,7 +2237,7 @@ Object {
|
|||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on first index page 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2282,13 +2282,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on post page with author image and post cover image 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
@ -2364,13 +2364,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on post page with custom excerpt for description and meta description 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
@ -2446,13 +2446,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on post page with fall back excerpt if no meta description provided 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
||||
|
@ -2516,13 +2516,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on post page with null author image and post cover image 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
@ -2590,13 +2590,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on static page 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/about/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2664,13 +2664,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data on static page with custom post structured data 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"all about our site\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/about/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2738,13 +2738,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns structured data without tags if there are no tags 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"site description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
@ -2813,13 +2813,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection returns twitter and facebook descriptions even if no meta description available 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/post/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
<link rel=\\"amphtml\\" href=\\"http://localhost:65530/post/amp/\\" />
|
||||
|
||||
|
@ -2880,13 +2880,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection tag first page without meta and model description returns no description fields 1 1`] = `
|
||||
Object {
|
||||
"string": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/\\" />
|
||||
"rendered": "<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
<meta property=\\"og:site_name\\" content=\\"Ghost\\" />
|
||||
|
@ -2929,13 +2929,13 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`{{ghost_head}} helper without Code Injection tag first page without meta data if no meta title and meta description, but model description provided 1 1`] = `
|
||||
Object {
|
||||
"string": "<meta name=\\"description\\" content=\\"tag description\\" />
|
||||
"rendered": "<meta name=\\"description\\" content=\\"tag description\\" />
|
||||
<link rel=\\"canonical\\" href=\\"http://localhost:65530/tag/tagtitle/\\" />
|
||||
<meta name=\\"referrer\\" content=\\"no-referrer-when-downgrade\\" />
|
||||
|
||||
|
@ -2982,6 +2982,6 @@ Object {
|
|||
<meta name=\\"generator\\" content=\\"Ghost 0.3\\" />
|
||||
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
|
||||
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~1.0/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://localhost:65530/\\" crossorigin=\\"anonymous\\"></script>",
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -21,9 +21,18 @@ const {settingsCache, labs} = proxy;
|
|||
* So these changes become visible in PR's.
|
||||
*/
|
||||
async function testGhostHead(options) {
|
||||
const rendered = await ghost_head(options);
|
||||
let rendered = (await ghost_head(options)).toString();
|
||||
|
||||
// Ignore some parts of the response by replacing regexes
|
||||
const portalVersion = /portal@~\d+\.\d+(\.\d+)?\//g;
|
||||
rendered = rendered.replace(portalVersion, 'portal@~[[VERSION]]/');
|
||||
|
||||
const sodoSearchVersion = /sodo-search@~\d+\.\d+(\.\d+)?\//g;
|
||||
rendered = rendered.replace(sodoSearchVersion, 'sodo-search@~[[VERSION]]/');
|
||||
|
||||
should.exist(rendered);
|
||||
rendered.should.matchSnapshot();
|
||||
// Note: we need to convert the string to an object in order to use the snapshot feature
|
||||
should({rendered}).matchSnapshot();
|
||||
return rendered;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue