Skip to content

Commit 4ec45eb

Browse files
author
Erin Symons
authored
Merge pull request #880 from ziburski/netlifycmsorg-new
Shipping Netlify CMS website 1.0
2 parents bee768e + 8e93dda commit 4ec45eb

27 files changed

+591
-732
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ yarn-error.log
88
.vscode/
99
manifest.yml
1010
.imdone/
11-
11+
website/site/data/contributors.yml
1212
/coverage/

website/config/variables.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ module.exports = {
66
lightestGrey: '#E6E6E6',
77
lighterGrey: '#F7F8F8',
88
lightGrey: '#F6F6F6',
9+
lightishGrey: '#51555D',
910
grey: '#313D3E',
1011
darkGrey: '#2F3132',
1112
darkerGrey: '#1C1E1E',
13+
blueGrey: '#9AA1AE',
1214
lightGreen: '#97bf2f',
1315
green: '#C9FA4B',
1416
darkGreen: '#7CA511',
17+
shadeBlue: '#EFF0F4',
18+
blue: '#3A69C7',
1519

1620
// typography
1721
thin: 100,
@@ -35,7 +39,7 @@ module.exports = {
3539

3640
// border radius
3741
borderRadius: '4px',
38-
largeBorderRadius: '10px',
42+
largeBorderRadius: '8px',
3943

4044
// responsive breakpoints
4145
mobile: '480px',

website/gulpfile.babel.js

+70-41
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import gulp from "gulp";
22
import cp from "child_process";
3-
import hugoBin from "hugo-bin"
3+
import hugoBin from "hugo-bin";
44
import gutil from "gulp-util";
55
import postcss from "gulp-postcss";
6+
import transform from "gulp-transform";
7+
import yaml from "yamljs";
8+
import rename from "gulp-rename";
69
import cssImport from "postcss-import";
710
import neatgrid from "postcss-neat";
811
import nestedcss from "postcss-nested";
@@ -18,53 +21,94 @@ import webpackConfig from "./webpack.conf";
1821
const browserSync = BrowserSync.create();
1922
const defaultArgs = ["-d", "../dist", "-s", "site", "-v"];
2023

21-
gulp.task("hugo", (cb) => buildSite(cb));
22-
gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture"]));
24+
function buildSite(cb, options) {
25+
const args = options ? defaultArgs.concat(options) : defaultArgs;
26+
return cp.spawn(hugoBin, args, { stdio: "inherit" }).on("close", code => {
27+
if (code === 0) {
28+
browserSync.reload();
29+
cb();
30+
} else {
31+
browserSync.notify("Hugo build failed :(");
32+
cb("Hugo build failed");
33+
}
34+
});
35+
}
36+
37+
gulp.task("hugo", ["copy"], cb => buildSite(cb));
38+
gulp.task("hugo-preview", ["copy"], cb =>
39+
buildSite(cb, ["--buildDrafts", "--buildFuture"])
40+
);
2341

2442
gulp.task("build", ["css", "js", "fonts", "images", "hugo"]);
2543
gulp.task("build-preview", ["css", "js", "fonts", "images", "hugo-preview"]);
2644

27-
gulp.task("css", () => (
28-
gulp.src("./src/css/**/*.css")
29-
.pipe(postcss([
30-
cssImport({from: "./src/css/main.css"}),
31-
neatgrid(),
32-
nestedcss(),
33-
colorfunctions(),
34-
hdBackgrounds(),
35-
cssextend(),
36-
cssvars({variables: styleVariables})]))
45+
gulp.task("css", () =>
46+
gulp
47+
.src("./src/css/**/*.css")
48+
.pipe(
49+
postcss([
50+
cssImport({ from: "./src/css/main.css" }),
51+
neatgrid(),
52+
nestedcss(),
53+
colorfunctions(),
54+
hdBackgrounds(),
55+
cssextend(),
56+
cssvars({ variables: styleVariables })
57+
])
58+
)
3759
.pipe(gulp.dest("./dist/css"))
3860
.pipe(browserSync.stream())
39-
));
61+
);
4062

41-
gulp.task("js", (cb) => {
63+
gulp.task("js", cb => {
4264
const myConfig = Object.assign({}, webpackConfig);
4365

4466
webpack(myConfig, (err, stats) => {
4567
if (err) throw new gutil.PluginError("webpack", err);
46-
gutil.log("[webpack]", stats.toString({
47-
colors: true,
48-
progress: true
49-
}));
68+
gutil.log(
69+
"[webpack]",
70+
stats.toString({
71+
colors: true,
72+
progress: true
73+
})
74+
);
5075
browserSync.reload();
5176
cb();
5277
});
5378
});
5479

55-
gulp.task("fonts", () => (
56-
gulp.src("./src/fonts/**/*")
80+
gulp.task("fonts", () =>
81+
gulp
82+
.src("./src/fonts/**/*")
5783
.pipe(gulp.dest("./dist/fonts"))
5884
.pipe(browserSync.stream())
59-
));
85+
);
6086

61-
gulp.task("images", () => (
62-
gulp.src("./src/img/**/*")
87+
gulp.task("images", () =>
88+
gulp
89+
.src("./src/img/**/*")
6390
.pipe(gulp.dest("./dist/img"))
6491
.pipe(browserSync.stream())
65-
));
92+
);
93+
94+
gulp.task("copy", () =>
95+
gulp
96+
.src("../.all-contributorsrc")
97+
.pipe(
98+
transform(
99+
"utf8",
100+
content =>
101+
new Promise((resolve, reject) => {
102+
const contributors = JSON.parse(content);
103+
resolve(yaml.dump({ contributors: contributors.contributors }));
104+
})
105+
)
106+
)
107+
.pipe(rename("contributors.yml"))
108+
.pipe(gulp.dest("./site/data"))
109+
);
66110

67-
gulp.task("server", ["hugo", "css", "js", "fonts", "images"], () => {
111+
gulp.task("server", ["css", "js", "fonts", "images", "hugo"], () => {
68112
browserSync.init({
69113
server: {
70114
baseDir: "./dist"
@@ -77,18 +121,3 @@ gulp.task("server", ["hugo", "css", "js", "fonts", "images"], () => {
77121
gulp.watch("./src/fonts/**/*", ["fonts"]);
78122
gulp.watch("./site/**/*", ["hugo"]);
79123
});
80-
81-
function buildSite(cb, options) {
82-
const args = options ? defaultArgs.concat(options) : defaultArgs;
83-
84-
return cp.spawn(hugoBin, args, {stdio: "inherit"}).on("close", (code) => {
85-
if (code === 0) {
86-
browserSync.reload();
87-
cb();
88-
} else {
89-
browserSync.notify("Hugo build failed :(");
90-
cb("Hugo build failed");
91-
}
92-
});
93-
}
94-

website/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
"gulp": "^3.9.1",
3333
"gulp-babel": "^6.1.2",
3434
"gulp-postcss": "^6.1.1",
35+
"gulp-rename": "^1.2.2",
36+
"gulp-transform": "^3.0.5",
3537
"gulp-util": "^3.0.7",
3638
"hugo-bin": "^0.18.0",
3739
"imports-loader": "^0.6.5",

website/site/data/landing.yaml

+37-46
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,41 @@
11
---
22
hero:
3-
headline: An open-source CMS for your Git workflow
4-
subhead: |
5-
- Content management in a single-page app
6-
- Built in React.js with extensible components
7-
- Integrate with any build tool
8-
- Plug in to any static site generator
9-
ctas: |
10-
- [Take it for a test drive →](/docs/test-drive)
11-
productvideo:
12-
thumbnail: "/img/hero-graphic.jpg"
13-
mp4: "/img/demo.mp4"
14-
ogg: "/img/demo.ogg"
15-
webm: "/img/demo.webm"
3+
headline: "Open source content management for your Git workflow"
4+
subhead: "Use Netlify CMS with any static site generator for a faster and more flexible web project"
5+
devfeatures:
6+
- feature: "Static + content management = ♥"
7+
description: "Get the speed, security, and scalability of a static site, while still providing a convenient editing interface for content."
8+
- feature: "An integrated part of your Git workflow"
9+
description: "Content is stored in your Git repository alongside your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git."
10+
- feature: "An extensible CMS built on React"
11+
description: "Netlify CMS is built as a single-page React app. Create custom-styled previews, UI widgets, and editor plugins or add backends to support different Git platform APIs."
12+
13+
cta:
14+
primaryhook: "Getting started is simple and free."
15+
primary: "Choose a template that’s pre-configured with a static site generator and deploys to a global CDN in one click."
16+
button: "[Get started](/docs/start-with-a-template/)"
17+
18+
editors:
19+
hook: "A CMS that developers and content editors can agree on"
20+
intro: "You get to implement modern front end tools to deliver a faster, safer, and more scalable site. Editors get a friendly UI and intuitive workflow that meets their content management requirements."
21+
features:
22+
- feature: "Editor-friendly user interface"
23+
description: "The web-based app includes rich-text editing, real-time preview, and drag-and-drop media uploads."
24+
imgpath: "/img/screenshot-editor.png"
25+
- feature: "Intuitive workflow for content teams"
26+
description: "Writers and editors can easily manage content from draft to review to publish across any number of custom content types."
27+
imgpath: "/img/screenshot-editorial.png"
28+
- feature: "Instant access, without a GitHub account"
29+
description: "With [Git Gateway](/docs/authentication-backends/#git-gateway-with-netlify-identity), you can add CMS access for any team member — even if they don’t have a GitHub account. "
30+
imgpath: "/img/screenshot-identity.png"
31+
32+
community:
33+
hook: "Supported by a growing community"
34+
features:
35+
- feature: "Support when you need it"
36+
description: "Get up and running with comprehensive [documentation](/docs) and templates or work through difficult problems with help from the community on [Gitter](https://gitter.im/netlify/NetlifyCMS)."
37+
- feature: "A community-driven project you can help evolve"
38+
description: "Netlify CMS is built by a community of 60+ contributors — and you can help. Join our [bi-weekly planning sessions](/community) or read the [contributing guide](/docs/contributor-guide) to join in."
39+
contributors: "Made possible by awesome contributors"
1640

17-
thanksdevs: "**Thanks to all our contributors.**Keep shooting for the stars with Netlify CMS."
18-
19-
collab:
20-
hook: "Integrate the roles of developers, writers, and editors."
21-
body: "Writers can focus on writing. Editors can approve content and publish with ease. Developers can use their favorite tools and libraries. **Netlify CMS keeps all of their contributions together, in Git.**"
22-
graphicpath: "/img/collab.svg"
23-
24-
featureshook: "Designed with developers in mind - it’s in our DNA."
25-
26-
features:
27-
- feature: "Fast, web-based UI"
28-
description: "Built with React, featuring rich-text editing, real-time preview, and drag-and-drop media uploads."
29-
- feature: "Platform agnostic"
30-
description: "Works with most static site generators for sites stored in GitHub."
31-
- feature: "Easy installation"
32-
description: "Add two files to your site, include or link to the JS, and add your custom configuration."
33-
- feature: "Modern authentication"
34-
description: "Connect with Netflify's authentication service or roll your own, using GitHub and JSON web tokens."
35-
- feature: "Flexible content types"
36-
description: "Specify an unlimited number of content types with custom fields."
37-
- feature: "Fully extensible"
38-
description: "Create custom-styled previews, UI widgets, and editor plugins."
39-
40-
featuresgraphic: "/img/helix.svg"
41-
42-
inspiration: |
43-
Netlify CMS is part of a long evolution in content management for the web. Even in the budding realm of the [JAMstack](https://www.jamstack.org) and [static site generators](https://www.staticgen.com), developers have a variety [“headless” CMS](http://www.headlesscms.org) options to choose from.
44-
45-
Proprietary services like Contentful and DatoCMS provide the ease and polish of a concierge provider, while simple open source projects like Prose and Google Drive CMS provide targeted functionality for limited use cases. We love that these other projects help advance the modern web, and we believe there will always be a place for them in the JAMstack ecosystem.
46-
47-
With Netlify CMS, we hope to carve a different niche. We aim to do for the JAMstack what WordPress did for dynamic sites back in the day. In other words, we want to build a CMS that is open-source but fully-featured and production-ready, that’s as easy to customize as it is to use, and that developers and content editors can build a community around.
48-
49-
[Help us make it happen!](/docs/contributor-guide)
5041
---

website/site/data/notifications.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ notifications:
1111
message: >-
1212
We have a community on Gitter - join now to ask questions and discuss the
1313
project with other devs!
14-
published: true
14+
published: false
1515
title: Gitter shoutout
1616
url: 'https://gitter.im/netlify/netlifycms'

0 commit comments

Comments
 (0)