Skip to content

Commit

Permalink
/gitpreview should not be indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
phfaist committed Aug 14, 2023
1 parent 966c112 commit dc84a67
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _zoodb_citations_cache/cache_compiled_citations.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _zoodb_citations_cache/cache_downloaded_info.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion site/src/gitpreview.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Preview
tags: ['sitePage']
tags: [] # NOT 'sitePage' to exclude from sitemap.xml
date: 'Git last modified'
page_layout_info:
jscomponents_profile: 'gitpreview'
Expand All @@ -10,6 +10,8 @@
links:
- href: '/'
html: 'Home'
extra_head_meta_content: |
<meta name="robots" content="noindex, nofollow" />
---

<div id="AppContainer">loading...</div>
Expand Down
2 changes: 1 addition & 1 deletion site/static_copy/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
User-agent: *
Disallow:
Disallow: /gitpreview
Sitemap: https://errorcorrectionzoo.org/sitemap.xml
11 changes: 9 additions & 2 deletions site/templates/layout/base_page.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ const render = async function (data) {
const eleventy = this;
const { sqzhtml } = await import('@phfaist/zoodb/util/sqzhtml');

// information about the page layout
let page_layout_info = data.page_layout_info ?? {};

//
// the template string content
//
Expand All @@ -139,6 +142,11 @@ const render = async function (data) {
<meta name="viewport" content="width=device-width, initial-scale=1">
`;

// add any additional page-specific <meta> tags
if (page_layout_info.extra_head_meta_content) {
s += page_layout_info.extra_head_meta_content;
}

//
// favicon
//
Expand Down Expand Up @@ -206,12 +214,11 @@ const render = async function (data) {
<meta name="twitter:image" content="~/site/static/icons/eczogimage.png" />
`;


//
// Set up the page - title & layout
//

// get some information about the page layout
let page_layout_info = data.page_layout_info ?? {};

// fonts
s += sqzhtml`
Expand Down

0 comments on commit dc84a67

Please sign in to comment.