Skip to content

Commit

Permalink
Progress with docusaurus.
Browse files Browse the repository at this point in the history
  • Loading branch information
julienblinnv committed Jun 11, 2018
1 parent 6951bde commit 0ca95e1
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 142 deletions.
7 changes: 0 additions & 7 deletions docs/doc2.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/doc3.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/doc1.md → docs/documentation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: doc1
id: documentation
title: Latin-ish
sidebar_label: Example Page
---
Expand Down
6 changes: 0 additions & 6 deletions docs/exampledoc4.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/exampledoc5.md

This file was deleted.

57 changes: 0 additions & 57 deletions website/pages/en/help.js

This file was deleted.

85 changes: 46 additions & 39 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ function pageUrl(page, language) {
return siteConfig.baseUrl + (language ? language + '/' : '') + page;
}

const pre = "```";

class Button extends React.Component {
render() {
return (
Expand Down Expand Up @@ -76,13 +78,13 @@ class HomeSplash extends React.Component {
let language = this.props.language || '';
return (
<SplashContainer>
<Logo img_src={imgUrl('docusaurus.svg')} />
{/* <Logo img_src={imgUrl('docusaurus.svg')} /> */}
<div className="inner">
<ProjectTitle />
<PromoSection>
<Button href="#try">Try It Out</Button>
<Button href={docUrl('doc1.html', language)}>Example Link</Button>
<Button href={docUrl('doc2.html', language)}>Example Link 2</Button>
<Button href="#get-started">Get started</Button>
<Button href="#more-info">More info</Button>
<Button href={docUrl('documentation.html', language)}>Documentation</Button>
</PromoSection>
</div>
</SplashContainer>
Expand All @@ -103,64 +105,71 @@ const Features = props => (
<Block layout="fourColumn">
{[
{
content: 'This is the content of my feature',
content: 'Get started quickly',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Feature One',
title: 'Project generator',
},
{
content: 'The content of my second feature',
content: 'Combine the features you need',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Feature Two',
title: 'Middlewares & builders',
},
]}
</Block>
);

const FeatureCallout = props => (
<div
className="productShowcaseSection paddingBottom"
style={{textAlign: 'center'}}>
<h2>Feature Callout</h2>
<MarkdownBlock>These are features of this project</MarkdownBlock>
</div>
);

const LearnHow = props => (
<Block background="light">
{[
{
content: 'Talk about learning how to use this',
content: 'Manage lifetime & instantiations',
image: imgUrl('docusaurus.svg'),
imageAlign: 'right',
title: 'Learn How',
imageAlign: 'top',
title: 'Dependency injection',
},
{
content: 'Common services',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Services',
},
{
content: 'Push your API to production in 15 min.',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Deployment ready',
},
]}
</Block>
);

const TryOut = props => (
<Block id="try">
const getStartedContent = `${pre}bash
npm install -g yo generator-opiniated-lambda
yo opiniated-lambda
${pre}
Then cd into the created project and:
${pre}bash
npm start -- local
${pre}
`;

const GetStarted = props => (
<Block id="get-started">
{[
{
content: 'Talk about trying this out',
content: getStartedContent,
image: imgUrl('docusaurus.svg'),
imageAlign: 'left',
title: 'Try it Out',
title: 'Get started',
},
]}
</Block>
);

const Description = props => (
<Block background="dark">
const MoreInfo = props => (
<Block id="more-info" background="dark">
{[
{
content: 'This is another description of how this project is useful',
content: 'Opiniated lambda starts where AWS Lambda leaves you.',
image: imgUrl('docusaurus.svg'),
imageAlign: 'right',
title: 'Description',
title: 'More info',
},
]}
</Block>
Expand Down Expand Up @@ -205,10 +214,8 @@ class Index extends React.Component {
<HomeSplash language={language} />
<div className="mainContainer">
<Features />
<FeatureCallout />
<LearnHow />
<TryOut />
<Description />
<GetStarted />
<MoreInfo />
<Showcase language={language} />
</div>
</div>
Expand Down
25 changes: 12 additions & 13 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,35 @@
/* List of projects/orgs using your project for the users page */
const users = [
{
caption: 'User1',
caption: 'nventive',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/docusaurus.svg'.
image: '/img/docusaurus.svg',
infoLink: 'https://www.facebook.com',
image: '/img/nventive.png',
infoLink: 'http://www.nventive.com',
pinned: true,
},
];

const siteConfig = {
title: 'Test Site' /* title for your website */,
tagline: 'A website for testing',
url: 'https://your-docusaurus-test-site.com' /* your website url */,
title: 'Opiniated Lambda' /* title for your website */,
tagline: 'A framework for building APIs using AWS Lambda & Typescript',
url: 'https://julienblin.github.io/opiniated-lambda' /* your website url */,
baseUrl: '/' /* base url for your project */,
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/',

// Used for publishing and more
projectName: 'test-site',
organizationName: 'facebook',
projectName: 'opiniated-lambda',
organizationName: 'nventive',
// For top-level user or org sites, the organization is still the same.
// e.g., for the https://JoelMarcey.github.io site, it would be set like...
// organizationName: 'JoelMarcey'

// For no header links in the top nav bar -> headerLinks: [],
headerLinks: [
{doc: 'doc1', label: 'Docs'},
{doc: 'doc4', label: 'API'},
{page: 'help', label: 'Help'},
{doc: 'documentation', label: 'Docs'},
{href: "https://github.com/julienblin/opiniated-lambda", label: 'GitHub'},
],

// If you have users set above, you add it here:
Expand All @@ -53,8 +52,8 @@ const siteConfig = {

/* colors for website */
colors: {
primaryColor: '#2E8555',
secondaryColor: '#205C3B',
primaryColor: '#6d6d6d',
secondaryColor: '#333333',
},

/* custom fonts for website */
Expand Down
Binary file added website/static/img/nventive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0ca95e1

Please sign in to comment.