Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add Spec #10

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ bower_components/
static/*
vendor/
public/**/*
content/docs
content/docs/**/*

# Logs
logs
Expand Down
102 changes: 102 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,105 @@ baseURL = "https://cnab.io"
title = "CNAB - Cloud Native Application Bundle"
theme = "cnab"
languageCode = "en-us"

[[menu.main]]
name = "CNAB Specification"
identifier = "cnab-spec"
url = "/docs/000-index"
weight = "-10"
[[menu.main]]
name = "Bundle Core"
identifier = "100-cnab"
weight = "1"
[[menu.main]]
name = "Core Overview"
identifier = "100-cnab-core"
url = "/docs/100-cnab/"
weight = "100"
parent = "100-cnab"
[[menu.main]]
name = "The bundle.json File"
identifier = "101-bundle-json"
url = "/docs/101-bundle-json/"
weight = "101"
parent = "100-cnab"
[[menu.main]]
name = "The Innvocation Image Format"
identifier = "102-innvocation-image"
url = "/docs/102-innvocation-image/"
weight = "102"
parent = "100-cnab"
[[menu.main]]
name = "Bundle Runtime"
identifier = "103-bundle-runtime"
url = "/docs/103-bundle-runtime/"
weight = "103"
parent = "100-cnab"
[[menu.main]]
name = "Bundle Formats"
identifier = "104-bundle-formats"
url = "/docs/104-bundle-formats/"
weight = "104"
parent = "100-cnab"

[[menu.main]]
name = "Bundle Registry"
identifier = "200-CNAB-registries"
url = "/docs/200-CNAB-registries/"
weight = "200"
[[menu.main]]
name = "Bundle Security"
identifier = "300-CNAB-security"
url = "/docs/300-CNAB-security/"
weight = "300"
[[menu.main]]
name = "Bundle Claims"
identifier = "400-claims"
url = "/docs/400-claims/"
weight = "400"

[[menu.main]]
name = "Non-normative sections"
identifier = "500-non-normative"
weight = "500"
[[menu.main]]
name = "Declarative Bundles"
identifier = "801-declarative-images"
url = "/docs/801-declarative-images/"
weight = "801"
parent = "500-non-normative"
[[menu.main]]
name = "Credential Sets"
identifier = "802-credential-sets"
url = "/docs/802-credential-sets/"
weight = "802"
parent = "500-non-normative"
[[menu.main]]
name = "Base Bundles"
identifier = "803-base-bundles"
url = "/docs/803-base-bundles/"
weight = "803"
parent = "500-non-normative"
[[menu.main]]
name = "Repositories"
identifier = "804-repositories"
url = "/docs/804-repositories/"
weight = "804"
parent = "500-non-normative"
[[menu.main]]
name = "Well known custom actions"
identifier = "805-well-known-custom-actions"
url = "/docs/805-well-known-custom-actions/"
weight = "805"
parent = "500-non-normative"

[[menu.main]]
name = "Process Documentation"
identifier = "600-process"
weight = "500"
[[menu.main]]
name = "Specification Process"
identifier = "901-process"
url = "/docs/901-process/"
weight = "901"
parent = "600-process"
62 changes: 41 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,91 @@ var destination = process.env.GULP_DESTINATION || 'static';

// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-clean-css'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),
imagemin = require('gulp-imagemin'),
livereload = require('gulp-livereload'),
del = require('del'),
cssnano = require('gulp-cssnano'),
sourcemaps = require('gulp-sourcemaps'),
git = require('gulp-git'),
streamqueue = require('streamqueue');

sass.compiler = require('node-sass');


// Styles
gulp.task('styles', function () {
return sass('themes/cnab/static/sass/styles.scss', {style: 'compressed'})
return gulp.src('themes/cnab/static/sass/styles.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer('last 2 version'))
.pipe(rename({suffix: '.min'}))
.pipe(minifycss())
.pipe(sourcemaps.init())
.pipe(cssnano())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('themes/cnab/static/css/'))
.pipe(gulp.dest(destination + '/css'))
.pipe(notify({message: 'Styles compiled.'}));
.pipe(gulp.dest(destination + '/css'));
});


// Images
gulp.task('images', function () {
return streamqueue({objectMode: true},
gulp.src('themes/cnab/static/img/**/*{.jpg, .png, .gif}')
.pipe(cache(imagemin({optimizationLevel: 3, progressive: true, interlaced: true})))
.pipe(notify({message: 'Images minifed.'})),
.pipe(cache(imagemin({optimizationLevel: 3, progressive: true, interlaced: true}))),
gulp.src('themes/cnab/static/img/**/*')
.pipe(notify({message: 'Images moved.'}))
.pipe(gulp.dest(destination + '/img'))
)
});


// Clean
gulp.task('clean', function () {
return del([
'public',
'content/docs/'
], {force: true});
});


// Clone Docs for Hugo
gulp.task('clonedocs', function(cb) {
git.clone('https://github.com/deislabs/cnab-spec', {args: './content/docs', quiet: false}, function(err) {
// handle err
cb(err);
});
});
gulp.task('clone-index', function() {
return gulp.src('content/docs/000-index.md',)
.pipe(rename('index.md'))
.pipe(gulp.dest('content/docs'))
});
gulp.task('clonedel', function () {
return del([
'content/docs/CONTRIBUTING.md',
'content/docs/README.md'
]);
});
gulp.task('clone', gulp.series('clean', 'clonedocs', 'clonedel'), function() { });


// Copy
gulp.task('copy', function () {
return gulp.src('themes/cnab/static/fonts/*')
.pipe(gulp.dest(destination + '/fonts'))
.pipe(notify({message: 'Fonts moved.'}));
.pipe(gulp.dest(destination + '/fonts'));
});
gulp.task('copyall', function () {
return gulp.src('static/**/*')
.pipe(gulp.dest('public/'))
.pipe(notify({message: 'Copied all.'}));
});


// Clean
gulp.task('clean', function () {
return del([
destination + '/**/*'
], {force: true});
.pipe(gulp.dest('public/'));
});


// 'gulp' default task to build the site assets
gulp.task('default', gulp.series('styles', 'images', 'copy'), function() { });
gulp.task('default', gulp.series('clone', 'styles', 'images', 'copy'), function() { });

// 'gulp watch' to watch for changes during dev
gulp.task('watch', function () {
Expand Down
30 changes: 0 additions & 30 deletions netlify.toml

This file was deleted.

Loading