diff --git a/.env.sample b/.env.sample index 5b27a8e5d..27f6967bb 100644 --- a/.env.sample +++ b/.env.sample @@ -10,7 +10,7 @@ SECRET_KEY=F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B PORT=3000 REDIS_URL=redis://redis:6379 URL=http://localhost:3000 -DEPLOYMENT=hosted +DEPLOYMENT=self ENABLE_UPDATES=true DEBUG=sql,cache,presenters,events diff --git a/server/pages/components/Layout.js b/server/pages/components/Layout.js index 02c40de7a..d962aa409 100644 --- a/server/pages/components/Layout.js +++ b/server/pages/components/Layout.js @@ -6,6 +6,11 @@ import Analytics from '../../../shared/components/Analytics'; import globalStyles from '../../../shared/styles/globals'; import { color } from '../../../shared/styles/constants'; +export const title = 'Outline'; +export const description = + 'Your team’s knowledge base - Team wiki, documentation, playbooks, onboarding & more…'; +export const screenshotUrl = `${process.env.URL}/screenshot.png`; + type Props = { children?: React$Element<*>, }; @@ -17,16 +22,25 @@ export default function Layout({ children }: Props) { - Outline + {title} - - + + + + + + + + + + + + + + { } }); +// Other +router.get('/robots.txt', ctx => (ctx.body = robotsResponse(ctx))); + // catch all for react app router.get('*', async ctx => { await renderapp(ctx); diff --git a/server/utils/robots.js b/server/utils/robots.js new file mode 100644 index 000000000..f7e08c8ee --- /dev/null +++ b/server/utils/robots.js @@ -0,0 +1,9 @@ +// @flow +import { type Context } from 'koa'; + +const DISALLOW_ROBOTS = `User-agent: * +Disallow: /`; + +export const robotsResponse = (ctx: Context): ?string => { + if (ctx.headers.host.indexOf('getoutline.com') < 0) return DISALLOW_ROBOTS; +};