Skip to content

Commit

Permalink
Hugo fixes (#319)
Browse files Browse the repository at this point in the history
* fix all but docs

* fixes the documentation section - shouldn't have ever built.

* updated site deps and hugo

* static is generated and shouldn't be in git.

* static is generated and shouldn't be in git.

* make file will always change the package.json adding a gulp debug module.

* - single template is required to preserve the menus on the left on documentation
- archetypes is a top level entry or `hugo new `xxxx/yyyy.md` won't have any defaults we need.

* - Removed target to sync website, sync should be done by ansible
- Removed a git module that doesn't exist.
  • Loading branch information
aricart authored Mar 6, 2018
1 parent 996b422 commit 675f9cd
Show file tree
Hide file tree
Showing 180 changed files with 10,832 additions and 9,017 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ehthumbs.db
# HUGO
/public
/themes/*
/static

# Node
node_modules
Expand All @@ -17,3 +18,4 @@ npm-debug.log
#IntelliJ IDEA
.idea/
*.iml

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ addons:
- graphicsmagick

install:
- wget https://github.com/gohugoio/hugo/releases/download/v0.31.1/hugo_0.31.1_Linux-64bit.deb
- wget https://github.com/gohugoio/hugo/releases/download/v0.37/hugo_0.37_Linux-64bit.deb
- sudo dpkg -i hugo*.deb
- npm install
- npm install --global gulp-cli
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CURRENT_DIR=$(pwd)
setup:
npm install
npm install --global gulp-cli
npm install gulp-plumber --save-dev
brew install hugo
brew install imagemagick
brew install graphicsmagick
Expand All @@ -16,5 +15,3 @@ build:
clean:
gulp clean

deploy:
cd public; s3cmd sync . s3://www.nats.io/
File renamed without changes.
3 changes: 1 addition & 2 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
baseURL = "http://nats.io/"
languageCode = "en-us"
defaultLanguage = "en"
title = "NATS - Cloud Native, Open Source, High Performance Messaging"

pygmentsCodeFences = "true"
Expand All @@ -10,8 +11,6 @@ pygmentsStyle = "native"
leftNav = false
description = "NATS is a high performance messaging system that acts as a distributed messaging queue for cloud native applications, IoT device messaging, and microservices architecture."
author = "The NATS team"
baseurl = "http://nats.io/"
languageCode = "en-us"
title = "NATS - Documentation"
SectionPagesMenu = "main"
noCategoryLink = true
Expand Down
7 changes: 7 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
date = "2015-09-01T17:05:52-07:00"
title = "NATS - Open Source Messaging System | Secure, Native Cloud Application Development"
type = "index"
cssid = "home"
description = ""
+++
File renamed without changes.
File renamed without changes.
151 changes: 0 additions & 151 deletions content/index.html

This file was deleted.

43 changes: 16 additions & 27 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
debug = require('gulp-debug'),
notify = require('gulp-notify'),
// plumber = require('gulp-plumber'),
// debug = require('gulp-debug'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
// rename = require('gulp-rename'),
watch = require('gulp-watch'),
less = require('gulp-less'),
uglify = require('gulp-uglify'),
minifyCSS = require('gulp-minify-css'),
gm = require('gulp-gm'),
imageResize = require('gulp-image-resize'),
gulpif = require('gulp-if'),
// gulpif = require('gulp-if'),
autoprefixer = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
clean = require('gulp-clean'),
Expand All @@ -23,33 +22,29 @@ gulp.task('less', function() {
.pipe(less())
.pipe(sourcemaps.init())
.pipe(autoprefixer())
//.pipe(minifyCSS())
.pipe(minifyCSS())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('static/css'))
.pipe(notify({ message: 'Compiling LESS'}));
.pipe(gulp.dest('static/css'));
});

// Javascript
gulp.task('js', function() {
return gulp.src(['src/js/moment.js', 'src/js/**/*.js'])
.pipe(concat('index.js'))
.pipe(uglify())
.pipe(gulp.dest('static/js'))
.pipe(notify({ message: 'Compiling JavaScript'}));
.pipe(gulp.dest('static/js'));
});

// Images
gulp.task('img', function() {
return gulp.src('src/img/**/*')
.pipe(gulp.dest('static/img'))
.pipe(notify({ message: 'Copying image'}));
.pipe(gulp.dest('static/img'));
});

// Fonts
gulp.task('font', function() {
return gulp.src('src/fonts/**/*')
.pipe(gulp.dest('static/fonts'))
.pipe(notify({ message: 'Copying font'}));
.pipe(gulp.dest('static/fonts'));
});

// Resize User Logos
Expand All @@ -58,8 +53,7 @@ gulp.task('userLogos', function() {
.pipe(gm(function (gmfile) {
return gmfile.resize(150, 100);
}))
.pipe(gulp.dest('static/img/user_logos'))
.pipe(notify({ message: 'Resizing user logo image'}));
.pipe(gulp.dest('static/img/user_logos'));
});

// Resize Partner Logos
Expand All @@ -68,15 +62,13 @@ gulp.task('partnerLogos', function() {
.pipe(gm(function (gmfile) {
return gmfile.resize(250, 150);
}))
.pipe(gulp.dest('static/img/partner_logos'))
.pipe(notify({ message: 'Resizing partner logo'}));
.pipe(gulp.dest('static/img/partner_logos'));
});

// Resize Documentaiton Images
gulp.task('docsImages', function() {
return gulp.src('src/documentation/**/*.{png,jpg,jpeg}')
.pipe(gulp.dest('static/img/documentation'))
.pipe(notify({ message: 'Copying documentation image'}));
.pipe(gulp.dest('static/img/documentation'));
});

// Resize Blog Images
Expand All @@ -85,26 +77,23 @@ gulp.task('blogImages', function() {
.pipe(imageResize({
width : 900
}))
.pipe(gulp.dest('static/img/blog'))
.pipe(notify({ message: 'Resizing blog image'}));
.pipe(gulp.dest('static/img/blog'));
});

// Will have to improve this later on
gulp.task('blogImagesGifs', function() {
return gulp.src('src/blog/**/*.gif')
.pipe(gulp.dest('static/img/blog'))
.pipe(notify({ message: 'Copying gif blog image'}));
.pipe(gulp.dest('static/img/blog'));
});

// Clean
gulp.task('clean', function() {
return gulp.src('public')
.pipe(clean())
.pipe(notify({ message: 'Removing old build'}));
.pipe(clean());
});

// HUGO
gulp.task('hugo', shell.task('hugo'))
gulp.task('hugo', shell.task('hugo'));

// Watch
gulp.task('watch', function() {
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ range .Data.Pages }}
<li>
<h3 class="doc-entry-title"><a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</a></h3>
<p><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></p>
<p><time datetime='{{ .Date.Format "2006-01-02" }}'>{{ .Date.Format "January 02, 2006" }}</time></p>
</li>
{{ end }}
</ul>
Expand Down
13 changes: 13 additions & 0 deletions layouts/documentation/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ partial "header.html" . }}
<div id="main-con" class="container">
<div class="row">
<div id="left-nav-con" class="col-md-3">
{{ partial "side-menu.html" . }}
</div>
<div id="documentation-content" class="col-md-9">
<a class="pull-right" target="_blank" href="{{ .Site.Params.githubBaseUrl }}/{{ .File.Path }}"><i class="icon icon-github"></i> Edit on GitHub</a>
{{ .Content }}
</div>
</div>
</div>
{{ partial "footer.html" . }}
Loading

0 comments on commit 675f9cd

Please sign in to comment.