Skip to content

Commit

Permalink
Add identity script
Browse files Browse the repository at this point in the history
  • Loading branch information
biilmann committed Sep 3, 2017
1 parent 921ba84 commit 95003f8
Show file tree
Hide file tree
Showing 3 changed files with 3,398 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const defaultArgs = ["-d", "../dist", "-s", "site"];

gulp.task("hugo", (cb) => buildSite(cb));
gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture"]));
gulp.task("build", ["css", "js", "hugo"]);
gulp.task("build-preview", ["css", "js", "hugo-preview"]);
gulp.task("build", ["css", "js", "cms-assets", "hugo"]);
gulp.task("build-preview", ["css", "js", "cms-assets", "hugo-preview"]);

gulp.task("css", () => (
gulp.src("./src/css/*.css")
Expand All @@ -33,6 +33,11 @@ gulp.task("css", () => (
.pipe(browserSync.stream())
));

gulp.task("cms-assets", () => (
gulp.src("./node_modules/netlify-cms/dist/*.{woff,eot,woff2,ttf,svg,png}")
.pipe(gulp.dest("./dist/css"))
))

gulp.task("js", (cb) => {
const myConfig = Object.assign({}, webpackConfig);

Expand Down Expand Up @@ -63,7 +68,7 @@ gulp.task("svg", () => {
.pipe(gulp.dest("site/layouts/partials/"));
});

gulp.task("server", ["hugo", "css", "js", "svg"], () => {
gulp.task("server", ["hugo", "css", "cms-assets", "js", "svg"], () => {
browserSync.init({
server: {
baseDir: "./dist"
Expand Down
1 change: 1 addition & 0 deletions site/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<meta property="og:url" content="/">
<meta property="og:image" content="/og-image.jpg">

<script src="/admin/netlify-identity-umd.js" async></script>
</head>

<body class="sans-serif">
Loading

0 comments on commit 95003f8

Please sign in to comment.