diff --git a/editor.planx.uk/public/robots.txt b/editor.planx.uk/public/robots.txt index e9e57dc4d4..7db76d03d6 100644 --- a/editor.planx.uk/public/robots.txt +++ b/editor.planx.uk/public/robots.txt @@ -1,3 +1,4 @@ # https://www.robotstxt.org/robotstxt.html User-agent: * -Disallow: +Disallow: /*draft +Disallow: /*preview diff --git a/editor.planx.uk/src/routes/draft.tsx b/editor.planx.uk/src/routes/draft.tsx index 8ac2e87455..57dd681cc9 100644 --- a/editor.planx.uk/src/routes/draft.tsx +++ b/editor.planx.uk/src/routes/draft.tsx @@ -1,4 +1,4 @@ -import { compose, map, mount, route, withData, withView } from "navi"; +import { compose, map, mount, route, withData, withHead, withView } from "navi"; import ContentPage from "pages/Preview/ContentPage"; import Questions from "pages/Preview/Questions"; import React from "react"; @@ -10,6 +10,11 @@ const routes = compose( mountpath: req.mountpath, })), + withHead([ + , + + ]), + withView(async (req) => await draftView(req)), mount({ diff --git a/editor.planx.uk/src/routes/preview.tsx b/editor.planx.uk/src/routes/preview.tsx index f37753ba62..dd59495c82 100644 --- a/editor.planx.uk/src/routes/preview.tsx +++ b/editor.planx.uk/src/routes/preview.tsx @@ -1,4 +1,4 @@ -import { compose, map, mount, route, withData, withView } from "navi"; +import { compose, map, mount, route, withData, withHead, withView } from "navi"; import ContentPage from "pages/Preview/ContentPage"; import Questions from "pages/Preview/Questions"; import React from "react"; @@ -10,6 +10,11 @@ const routes = compose( mountpath: req.mountpath, })), + withHead([ + , + + ]), + withView(async (req) => await previewView(req)), mount({