Skip to content

Commit 45b6cea

Browse files
initial
0 parents  commit 45b6cea

35 files changed

+983
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
build
3+
package-lock.json
4+
npm-debug.log

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:6.11.0-slim
2+
3+
RUN apt-get update -qq && apt-get install -y build-essential
4+
5+
RUN mkdir /src
6+
7+
WORKDIR /src
8+
ADD package.json /src/package.json
9+
RUN npm install
10+
11+
EXPOSE 3000
12+
13+
CMD ["npm", "start"]

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
start:
2+
docker-compose up -d

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Mesosphere Docs
2+
3+
## Prerequisites (TODO: Expand)
4+
5+
- Docker
6+
- Docker Compose
7+
- Git
8+
9+
## Development
10+
11+
### Docker Compose (TODO: Expand)
12+
13+
### Local (TODO: Expand)
14+
15+
Install packages with `npm install`
16+
17+
Start with command `npm start`
18+
19+
Go to `http://localhost:3000/{page}`
20+
21+
Develop and page will auto reload on changes
22+
23+
## SCSS
24+
25+
Scss files are compiled from `scss` into `build/css`
26+
27+
## JS
28+
29+
Javascript files are compiled from `js` into `build/js` and must be added to `entry.js`
30+
31+
## Git (TODO: Expand)
32+
33+
1. Before development always pull
34+
35+
> git pull origin master
36+
37+
2. Make changes, add & commit
38+
39+
> git add -A
40+
41+
> git commit -m "my change"
42+
43+
3. Pull before pushing
44+
45+
> git pull origin master
46+
47+
4. Push changes
48+
49+
> git push origin master

assets/.DS_Store

6 KB
Binary file not shown.

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '2'
2+
3+
services:
4+
docs:
5+
build: .
6+
volumes:
7+
- "./:/src"
8+
ports:
9+
- "3000:3000"

entry.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('./scss/style.scss');
2+
require('./js/main.js');

index.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
var Metalsmith = require('metalsmith');
2+
var markdown = require('metalsmith-markdown');
3+
var layouts = require('metalsmith-layouts');
4+
var permalinks = require('metalsmith-permalinks');
5+
var assets = require('metalsmith-assets');
6+
var browserSync = require('metalsmith-browser-sync');
7+
var webpack = require('metalsmith-webpack2');
8+
9+
Metalsmith(__dirname)
10+
.metadata({
11+
title: "Mesosphere",
12+
description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit",
13+
generator: "Metalsmith",
14+
url: "http://www.metalsmith.io/"
15+
})
16+
.source('./pages')
17+
.destination('./build')
18+
.clean(false)
19+
.use(markdown())
20+
.use(permalinks())
21+
.use(assets({
22+
source: 'assets',
23+
destination: 'assets',
24+
}))
25+
.use(layouts({
26+
engine: 'handlebars',
27+
partials: 'partials',
28+
}))
29+
.use(webpack('./webpack.config.js'))
30+
.use(browserSync({
31+
server : 'build',
32+
files : [
33+
'pages/**/*.md',
34+
'layouts/**/*.html',
35+
'partials/**/*.html',
36+
'scss/**/*.scss',
37+
'js/**/*.js',
38+
]
39+
}))
40+
.build(function(err, files) {
41+
if (err) { throw err; }
42+
});

js/main.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Hello World!');

layouts/layout.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
{{> head }}
5+
</head>
6+
<body>
7+
{{> header }}
8+
<div class="content">
9+
{{{ contents }}}
10+
</div>
11+
{{> footer }}
12+
{{> scripts }}
13+
</body>
14+
</html>

package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "mesosphere-docs",
3+
"version": "0.0.1",
4+
"description": "Mesosphere docs",
5+
"private": true,
6+
"scripts": {
7+
"start": "node index.js",
8+
"webpack": "webpack --progress --colors"
9+
},
10+
"author": "Ettrics",
11+
"devDependencies": {
12+
"autoprefixer": "^7.1.1",
13+
"browser-sync": "^2.18.12",
14+
"css-loader": "^0.28.4",
15+
"extract-text-webpack-plugin": "^2.1.2",
16+
"handlebars": "^4.0.10",
17+
"metalsmith": "^2.3.0",
18+
"metalsmith-assets": "^0.1.0",
19+
"metalsmith-browser-sync": "^1.1.1",
20+
"metalsmith-layouts": "^1.8.1",
21+
"metalsmith-markdown": "^0.2.1",
22+
"metalsmith-permalinks": "^0.5.0",
23+
"metalsmith-webpack2": "^1.0.1",
24+
"node-sass": "^4.5.3",
25+
"postcss-loader": "^2.0.6",
26+
"sass-loader": "^6.0.6",
27+
"style-loader": "^0.18.2",
28+
"webpack": "^3.0.0",
29+
"webpack-dev-server": "^2.5.0"
30+
},
31+
"dependencies": {}
32+
}

pages/404.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: layout.html
3+
---
4+
5+
<h2>404</h2>

pages/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: layout.html
3+
---
4+
5+
<h1>Mesosphere Docs</h1>

partials/drawer.html

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<div class="drawer">
2+
</div>

partials/footer.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<footer class="footer">
2+
<h2>Footer</h2>
3+
</footer>

partials/head.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<meta charset="UTF-8" />
2+
<meta name="viewport" content="width=device-width, initial-scale=1">
3+
<title>{{ title }}</title>
4+
<meta name="description" content="{{ description }}">
5+
<link rel="stylesheet" type="text/css" href="/css/styles.css">
6+
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:100,300,400,500,700|Roboto:100,300,400,500,700" rel="stylesheet">
7+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
8+
rel="stylesheet">

partials/header.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<header class="header">
2+
<h2>Header</h2>
3+
</header>

partials/scripts.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script src="/js/bundle.js"></script>

postcss.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
parser: false,
3+
plugins: {
4+
'autoprefixer': {},
5+
}
6+
}

scss/base/_drawer.scss

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.drawer {
2+
}

scss/base/_footer.scss

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.footer {
2+
}

scss/base/_global.scss

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
body {
2+
height: 100%;
3+
margin: 0;
4+
padding: 0;
5+
}
6+
7+
* {
8+
-moz-box-sizing: border-box;
9+
-webkit-box-sizing: border-box;
10+
box-sizing: border-box;
11+
}

scss/base/_header.scss

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.header {
2+
}

scss/base/_input.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.input {
2+
}
3+

0 commit comments

Comments
 (0)