chore: Remove marketing material from OSS project (#941)

* changes to support Plainhome

* changes to env sample

* changes to env variable names

* formatter fixes

* remove the content pages

* test fix

* lint fixes

* minor fixes

* removed unnesscary routes

* Apply suggestions from code review

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* removed team name from env
This commit is contained in:
Himanshu Agarwal
2019-11-04 04:31:46 +05:30
committed by Tom Moor
parent dce0c4ac73
commit f06097d9e8
31 changed files with 18 additions and 1407 deletions

View File

@ -1,7 +1,5 @@
// @flow
import * as React from 'react';
import fs from 'fs-extra';
import { find } from 'lodash';
import path from 'path';
import Koa from 'koa';
import Router from 'koa-router';
@ -16,13 +14,7 @@ import { NotFoundError } from './errors';
import { Team } from './models';
import Home from './pages/Home';
import About from './pages/About';
import Changelog from './pages/Changelog';
import Privacy from './pages/Privacy';
import Pricing from './pages/Pricing';
import Integrations from './pages/integrations';
import integrations from './pages/integrations/content';
import Integration from './pages/integrations/Integration';
import Developers from './pages/developers';
import Api from './pages/developers/Api';
import SubdomainSignin from './pages/SubdomainSignin';
@ -62,28 +54,8 @@ if (process.env.NODE_ENV === 'production') {
}
// static pages
router.get('/about', ctx => renderpage(ctx, <About />));
router.get('/pricing', ctx => renderpage(ctx, <Pricing />));
router.get('/developers', ctx => renderpage(ctx, <Developers />));
router.get('/developers/api', ctx => renderpage(ctx, <Api />));
router.get('/privacy', ctx => renderpage(ctx, <Privacy />));
router.get('/integrations/:slug', async ctx => {
const slug = ctx.params.slug;
const integration = find(integrations, i => i.slug === slug);
if (!integration) {
return ctx.redirect(`${process.env.URL}/integrations`);
}
const content = await fs.readFile(
path.resolve(__dirname, `pages/integrations/${slug}.md`)
);
return renderpage(
ctx,
<Integration integration={integration} content={content} />
);
});
router.get('/integrations', ctx => renderpage(ctx, <Integrations />));
router.get('/changelog', async ctx => {
const data = await fetch(
`https://api.github.com/repos/outline/outline/releases?access_token=${process