├── source ├── images │ └── .gitkeep ├── styles │ ├── base │ │ └── .gitkeep │ ├── components │ │ └── .gitkeep │ ├── config │ │ └── .gitkeep │ └── main.scss └── scripts │ ├── vendor │ └── .gitkeep │ ├── main.ts │ └── modules │ └── events.ts ├── public ├── assets │ ├── css │ │ └── .gitkeep │ ├── fonts │ │ └── .gitkeep │ └── js │ │ └── .gitkeep ├── site │ ├── plugins │ │ ├── .gitkeep │ │ └── seo.php │ ├── snippets │ │ ├── footer.php │ │ └── header.php │ ├── templates │ │ ├── default.php │ │ └── sitemap.php │ ├── blueprints │ │ └── default.yml │ └── config │ │ └── config.php ├── content │ ├── sitemap.xml │ │ └── sitemap.txt │ ├── error │ │ └── error.txt │ ├── home │ │ └── home.txt │ └── site.txt ├── env.php ├── .gitignore ├── index.php ├── .htaccess ├── readme.md └── license.md ├── rsync-exclude.txt ├── typings.json ├── gulpfile.js ├── index.js ├── tasks │ ├── clean.js │ ├── _tasks.js │ ├── lint.js │ ├── connect.js │ ├── modernizr.js │ ├── watch.js │ ├── deploy.js │ ├── webpack.js │ ├── images.js │ └── styles.js ├── local.config.example.js └── config.js ├── tsconfig.json ├── .eslintrc.yml ├── .gitignore ├── webpack.config.js ├── package.json └── README.md /source/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/site/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/styles/base/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/scripts/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/styles/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/styles/config/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/content/sitemap.xml/sitemap.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/content/error/error.txt: -------------------------------------------------------------------------------- 1 | Title: Error -------------------------------------------------------------------------------- /public/content/home/home.txt: -------------------------------------------------------------------------------- 1 | Title: Home -------------------------------------------------------------------------------- /public/content/site.txt: -------------------------------------------------------------------------------- 1 | Title: Site Title -------------------------------------------------------------------------------- /public/site/snippets/footer.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/env.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

title()->html() ?>

4 | 5 | -------------------------------------------------------------------------------- /rsync-exclude.txt: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .htaccess 3 | thumbs/ 4 | content/ 5 | site/accounts/ 6 | site/cache/ 7 | license.md 8 | readme.md 9 | env.php 10 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDependencies": { 3 | "core-js": "registry:dt/core-js#0.0.0+20160602141332", 4 | "jwplayer": "registry:dt/jwplayer#0.0.0+20160316155526" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /gulpfile.js/index.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------- 2 | CONFIG 3 | --------------------------------------- */ 4 | 5 | var requireDir = require('require-dir'); 6 | requireDir('./tasks'); 7 | -------------------------------------------------------------------------------- /public/site/blueprints/default.yml: -------------------------------------------------------------------------------- 1 | title: Page 2 | pages: true 3 | files: true 4 | fields: 5 | title: 6 | label: Title 7 | type: text 8 | text: 9 | label: Text 10 | type: textarea -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "sourceMap": true 6 | }, 7 | "files": [], 8 | "exclude": [ 9 | "source/scripts/jwplayer" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /public/site/snippets/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var del = require('del'); 3 | var config = require('../config').clean; 4 | 5 | /* Clean the public directory */ 6 | gulp.task('clean', function () { 7 | return del(config.all); 8 | }); 9 | -------------------------------------------------------------------------------- /.eslintrc.yml: -------------------------------------------------------------------------------- 1 | env: 2 | browser: true 3 | es6: true 4 | extends: 'eslint:recommended' 5 | rules: 6 | indent: 7 | - error 8 | - 4 9 | linebreak-style: 10 | - error 11 | - unix 12 | quotes: 13 | - error 14 | - single 15 | semi: 16 | - error 17 | - always 18 | -------------------------------------------------------------------------------- /source/scripts/modules/events.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Trigger function on DOMContentLoaded 3 | * @param {Function} fn Callback function 4 | */ 5 | export function documentReady(fn) { 6 | if (document.readyState != 'loading') { 7 | fn(); 8 | } else { 9 | document.addEventListener('DOMContentLoaded', fn); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /source/styles/main.scss: -------------------------------------------------------------------------------- 1 | // 1. Project specific settings, variables, mixins and functions 2 | 3 | 4 | // 2. General styles for base elements (body, a, p, h1...6 etc.) 5 | 6 | 7 | // 3. Tightly coupled styles for components 8 | 9 | 10 | // 4. Generic helper classes (usually small dirty hacks, keep this folder clean yo!) 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bower_components 3 | *.log 4 | .DS_Store 5 | .sass-cache 6 | 7 | public/thumbs 8 | public/site/accounts 9 | public/site/cache 10 | public/assets/images 11 | public/assets/scripts 12 | public/assets/styles 13 | public/assets/avatars 14 | 15 | gulpfile.js/local.config.js 16 | source/vendor/modernizr.js 17 | typings 18 | 19 | tmp/ 20 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/_tasks.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | 4 | gulp.task('build', function(cb){ 5 | runSequence('styles', ['lint','webpack:once','images','modernizr'], cb); 6 | }); 7 | 8 | gulp.task('default', function(cb){ 9 | runSequence('clean', 'build', ['watch','connect','webpack:watch'], cb); 10 | }); 11 | -------------------------------------------------------------------------------- /gulpfile.js/local.config.example.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------- 2 | LOCAL CONFIG 3 | --------------------------------------- */ 4 | 5 | module.exports = { 6 | deploy: { 7 | source: 'public/', 8 | user: 'USERNAME', 9 | host: 'HOSTNAME.TLD', 10 | dest: '/PATH/TO/PUBLIC_ROOT/', 11 | exclude_list: 'rsync-exclude.txt' 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | launch(); 19 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/lint.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var plumber = require('gulp-plumber'); 3 | var config = require('../config').jshint; 4 | var eslint = require('gulp-eslint'); 5 | 6 | // 7 | // Check yo self before yo wreck yo self 8 | // 9 | gulp.task('lint', function() { 10 | return gulp.src( config.source ) 11 | .pipe( plumber() ) 12 | .pipe( eslint() ) 13 | .pipe( eslint.format() ); 14 | }); 15 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/connect.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var config = require('../config').server; 3 | var connect = require('gulp-connect-php'); 4 | 5 | global.browserSync = require('browser-sync'); 6 | 7 | // Static server 8 | gulp.task('connect', function() { 9 | connect.server(config, function (){ 10 | browserSync({ 11 | proxy: '127.0.0.1:9000', 12 | notify: { 13 | styles: { 14 | top: 'auto', 15 | bottom: '0' 16 | } 17 | } 18 | }); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/modernizr.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var plumber = require('gulp-plumber'); 3 | var config = require('../config').modernizr; 4 | var modernizr = require('gulp-modernizr'); 5 | var uglify = require('gulp-uglify'); 6 | var changed = require('gulp-changed'); 7 | 8 | gulp.task('modernizr', function() { 9 | return gulp.src( config.source ) 10 | .pipe( plumber() ) 11 | .pipe( changed( config.dest) ) 12 | .pipe( modernizr( config.parameters ) ) 13 | .pipe( uglify() ) 14 | .pipe( gulp.dest( config.dest ) ); 15 | }); 16 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | var path = require('path'); 3 | 4 | module.exports = { 5 | output: { 6 | filename: "main.js" 7 | }, 8 | resolve: { 9 | extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'] 10 | }, 11 | resolveLoader: { 12 | root: path.join(__dirname, 'node_modules') 13 | }, 14 | plugins: [ 15 | new webpack.optimize.UglifyJsPlugin({ 16 | compress: { 17 | warnings: false 18 | } 19 | }) 20 | ], 21 | module: { 22 | loaders: [ 23 | { test: /\.ts$/, loader: 'ts-loader' } 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/watch.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var config = require('../config'); 3 | var watch = require('gulp-watch'); 4 | 5 | var modernizrConfig = config.modernizr; 6 | var watchConfig = config.watch; 7 | 8 | gulp.task('watch', function(){ 9 | watch( watchConfig.styles, function() { 10 | gulp.start('styles'); 11 | }); 12 | 13 | watch( modernizrConfig.source, function () { 14 | gulp.start('modernizr'); 15 | }); 16 | 17 | watch( watchConfig.images, function() { 18 | gulp.start('images'); 19 | }); 20 | 21 | watch( watchConfig.livereload, browserSync.reload); 22 | }); 23 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/deploy.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var config = require('../config').deploy; 3 | var exec = require('child_process').exec; 4 | 5 | gulp.task('deploy', function (cb) { 6 | var cmd = "rsync -rtvzh --progress --del --exclude-from '%exclude_list' %source %user@%host:%dest"; 7 | 8 | cmd = cmd.replace('%source', config.source); 9 | cmd = cmd.replace('%user', config.user); 10 | cmd = cmd.replace('%host', config.host); 11 | cmd = cmd.replace('%dest', config.dest); 12 | cmd = cmd.replace('%exclude_list', config.exclude_list); 13 | 14 | exec(cmd, function (err, stdout, stderr) { 15 | console.log(stdout); 16 | console.log(stderr); 17 | cb(err); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/webpack.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var plumber = require('gulp-plumber'); 3 | var config = require('../config').webpack; 4 | var webpack = require('webpack-stream'); 5 | 6 | var webpackConfig = require('../../webpack.config.js'); 7 | 8 | gulp.task('webpack:once', function () { 9 | webpackConfig.watch = false; 10 | 11 | return gulp.src( config.source ) 12 | .pipe( plumber() ) 13 | .pipe( webpack( webpackConfig ) ) 14 | .pipe( gulp.dest( config.dest ) ); 15 | }); 16 | 17 | gulp.task('webpack:watch', function () { 18 | webpackConfig.watch = true; 19 | webpackConfig.devtool = 'source-map'; 20 | 21 | return gulp.src( config.source ) 22 | .pipe( plumber() ) 23 | .pipe( webpack( webpackConfig ) ) 24 | .pipe( gulp.dest( config.dest ) ); 25 | }); 26 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/images.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var config = require('../config').images; 3 | var imagemin = require('gulp-imagemin'); 4 | var pngquant = require('imagemin-pngquant'); 5 | var webp = require('gulp-webp'); 6 | 7 | gulp.task('images:optimize', function () { 8 | return gulp.src( config.source ) 9 | .pipe(imagemin({ 10 | progressive: true, 11 | svgoPlugins: [{removeViewBox: false}], 12 | use: [pngquant()] 13 | })) 14 | .pipe( gulp.dest( config.dest ) ); 15 | }); 16 | 17 | gulp.task('images:webp', function () { 18 | return gulp.src( config.source ) 19 | .pipe( webp({ 20 | preset: 'photo', 21 | quality: 90, 22 | method: 6 23 | }) ) 24 | .pipe( gulp.dest(config.dest) ); 25 | }); 26 | 27 | gulp.task('images', ['images:optimize','images:webp']); 28 | -------------------------------------------------------------------------------- /public/site/templates/sitemap.php: -------------------------------------------------------------------------------- 1 | '; 10 | 11 | ?> 12 | 13 | 14 | url()) ?> 15 | modified('c') ?> 16 | 0.5 17 | 18 | 19 | index()->visible() as $p): ?> 20 | uri(), $ignore)) continue; ?> 21 | 22 | url()) ?> 23 | modified('c') ?> 24 | depth(), 1) ?> 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/site/config/config.php: -------------------------------------------------------------------------------- 1 | ", 7 | "devDependencies": { 8 | "browser-sync": "^2.13.0", 9 | "del": "^2.2.0", 10 | "gulp": "^3.9.0", 11 | "gulp-autoprefixer": "^3.1.0", 12 | "gulp-changed": "^1.3.1", 13 | "gulp-clean-css": "^2.0.12", 14 | "gulp-connect-php": "0.0.7", 15 | "gulp-eslint": "^3.0.1", 16 | "gulp-imagemin": "^2.4.0", 17 | "gulp-modernizr": "^1.0.0-alpha", 18 | "gulp-plumber": "^1.0.1", 19 | "gulp-rename": "^1.2.2", 20 | "gulp-sass": "^2.1.1", 21 | "gulp-uglify": "^2.0.0", 22 | "gulp-watch": "^4.3.8", 23 | "gulp-webp": "^2.3.0", 24 | "imagemin-pngquant": "^4.2.0", 25 | "require-dir": "^0.3.0", 26 | "run-sequence": "^1.1.5", 27 | "ts-loader": "^0.8.2", 28 | "typescript": "^1.8.10", 29 | "webpack": "^1.13.1", 30 | "webpack-stream": "^3.2.0" 31 | }, 32 | "dependencies": {} 33 | } 34 | -------------------------------------------------------------------------------- /gulpfile.js/tasks/styles.js: -------------------------------------------------------------------------------- 1 | // 2 | // Compile using SASS, add Autoprefixer and build two versions: normal and minified 3 | // 4 | 5 | var gulp = require('gulp'); 6 | var plumber = require('gulp-plumber'); 7 | var config = require('../config').styles; 8 | var autoprefixer = require('gulp-autoprefixer'); 9 | var cleanCSS = require('gulp-clean-css'); 10 | var sass = require('gulp-sass'); 11 | var rename = require('gulp-rename'); 12 | 13 | function handleError(err) { 14 | console.log(err.name, ' in ', err.plugin, ': ', err.message); 15 | this.emit('end'); 16 | } 17 | 18 | gulp.task('styles', function () { 19 | return gulp.src( config.source ) 20 | .pipe ( plumber() ) 21 | 22 | // normal version 23 | .pipe( sass() ).on('error', handleError) 24 | .pipe( autoprefixer( config.autoprefixer ) ) 25 | .pipe( gulp.dest( config.dest ) ) 26 | .pipe( browserSync.stream() ) 27 | 28 | // minified version 29 | .pipe( rename('main.min.css') ) 30 | .pipe( cleanCSS() ) 31 | .pipe( gulp.dest( config.dest ) ); 32 | }); 33 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | # Kirby .htaccess 2 | 3 | # rewrite rules 4 | 5 | 6 | # enable awesome urls. i.e.: 7 | # http://yourdomain.com/about-us/team 8 | RewriteEngine on 9 | 10 | # make sure to set the RewriteBase correctly 11 | # if you are running the site in a subfolder. 12 | # Otherwise links or the entire site will break. 13 | # 14 | # If your homepage is http://yourdomain.com/mysite 15 | # Set the RewriteBase to: 16 | # 17 | # RewriteBase /mysite 18 | 19 | # block text files in the content folder from being accessed directly 20 | RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L] 21 | 22 | # block all files in the site folder from being accessed directly 23 | RewriteRule ^site/(.*) index.php [L] 24 | 25 | # block all files in the kirby folder from being accessed directly 26 | RewriteRule ^kirby/(.*) index.php [L] 27 | 28 | # make panel links work 29 | RewriteCond %{REQUEST_FILENAME} !-f 30 | RewriteCond %{REQUEST_FILENAME} !-d 31 | RewriteRule ^panel/(.*) panel/index.php [L] 32 | 33 | # make site links work 34 | RewriteCond %{REQUEST_FILENAME} !-f 35 | RewriteCond %{REQUEST_FILENAME} !-d 36 | RewriteRule ^(.*) index.php [L] 37 | 38 | 39 | 40 | # Additional recommended values 41 | # Remove comments for those you want to use. 42 | # 43 | # AddDefaultCharset UTF-8 44 | # 45 | # php_flag short_open_tag on -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kirby CMS Starter kit with Gulp 2 | A template to kickstart a new project using Kirby CMS. 3 | Using Gulp for handling SCSS, Typescript and Image optimizations. 4 | 5 | ## Contents 6 | - Lints, compiles and uglifies Typescript 7 | - Compiles and autoprefixes SCSS 8 | - Generates a custom Modernizr build with gulp-modernizr 9 | 10 | ## Installation 11 | Rename the `local.config.example.js` file to `local.config.js` and adjust settings if needed. 12 | You will need the [kirby-cli](https://github.com/getkirby/cli) to install Kirby Core and (optionally) Kirby panel. 13 | 14 | ### Kirby CLI 15 | All Kirby CLI commands should be run while in the `public/` folder. 16 | 17 | To install *Kirby Core*: 18 | 19 | ```bash 20 | $ kirby install:core 21 | ``` 22 | 23 | To install *Kirby Panel*: 24 | 25 | ```bash 26 | $ kirby install:panel 27 | ``` 28 | 29 | Please check the [kirby-cli](https://github.com/getkirby/cli) repository for more information about installation, other available tasks and the latest updates. 30 | 31 | ## Usage 32 | Run all asset tasks. After the build, the public folder contains everything for a production ready website. 33 | 34 | ```bash 35 | $ gulp build 36 | ``` 37 | 38 | Build all assets, connect to a PHP server and start watching the files. 39 | 40 | ```bash 41 | $ gulp 42 | ``` 43 | 44 | Deploy all files in `public/` to a specified directory (probably SSH). Uses rsync. 45 | 46 | ```bash 47 | $ gulp deploy 48 | ``` 49 | -------------------------------------------------------------------------------- /gulpfile.js/config.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------- 2 | CONFIG 3 | --------------------------------------- */ 4 | 5 | var localConfig = require('./local.config.js'); 6 | 7 | // Project paths 8 | var src = './source/'; 9 | var vendor = './source/vendor/'; 10 | var dist = './public/'; 11 | 12 | var config = { 13 | styles: { 14 | source: src+'styles/main.scss', 15 | dest: dist+'assets/styles/', 16 | autoprefixer: { 17 | browsers: ['> 5%', 'last 2 versions'], 18 | cascade: false 19 | } 20 | }, 21 | 22 | jshint: { 23 | source: [ 24 | src+'scripts/**/*.js', 25 | '!**/vendor/**' 26 | ] 27 | }, 28 | 29 | images: { 30 | source: src+'images/**/*', 31 | dest: dist+'assets/images/' 32 | }, 33 | 34 | modernizr: { 35 | parameters: { 36 | options: ['setClasses','html5printshiv','fnBind'] 37 | }, 38 | source: dist+'assets/styles/*.css', 39 | dest: dist+'assets/scripts' 40 | }, 41 | 42 | server: { 43 | base: dist, 44 | port: 9000, 45 | host: '0.0.0.0' 46 | }, 47 | 48 | clean: { 49 | all: [ 50 | './.sass-cache', 51 | dist+'assets/scripts', 52 | dist+'assets/images', 53 | dist+'assets/styles' 54 | ] 55 | }, 56 | 57 | webpack: { 58 | source: './source/scripts/main.ts', 59 | dest: './public/assets/scripts' 60 | }, 61 | 62 | watch: { 63 | livereload: dist + '**/*.{js,html,php}', 64 | styles: src + 'styles/**/*.scss', 65 | styles_output: dist + '**/*.css', 66 | images: src + 'images/**/*.*', 67 | } 68 | }; 69 | 70 | module.exports = Object.assign(config, localConfig); 71 | -------------------------------------------------------------------------------- /public/readme.md: -------------------------------------------------------------------------------- 1 | # Kirby 2 | 3 | Kirby is a file-based CMS. 4 | Easy to setup. Easy to use. Flexible as hell. 5 | 6 | ## Trial 7 | 8 | You can try Kirby on your local machine or on a test 9 | server as long as you need to make sure it is the right 10 | tool for your next project. 11 | 12 | ## Buy a license 13 | 14 | You can purchase your Kirby license at 15 | 16 | 17 | A Kirby license is valid for a single domain. You can find 18 | Kirby's license agreement here: 19 | 20 | ## The Plainkit 21 | 22 | Kirby's Plainkit is the most minimal setup you can get started with. 23 | It does not include any content, styles or other kinds of decoration, 24 | so it's perfect to use this as a starting point for your own project. 25 | 26 | ## The Panel 27 | 28 | You can find the login for Kirby's admin interface at 29 | http://yourdomain.com/panel. You will be guided through the signup 30 | process for your first user, when you visit the panel 31 | for the first time. 32 | 33 | ## Installation 34 | 35 | Kirby does not require a database, which makes it very easy to 36 | install. Just copy Kirby's files to your server and visit the 37 | URL for your website in the browser. 38 | 39 | **Please check if the invisible .htaccess file has been 40 | copied to your server correctly** 41 | 42 | ### Requirements 43 | 44 | Kirby runs on PHP 5.4+, Apache or Nginx. 45 | 46 | ### Download 47 | 48 | You can download the latest version of the Starterkit 49 | from http://download.getkirby.com 50 | 51 | ### With Git 52 | 53 | If you are familiar with Git, you can clone Kirby's 54 | Starterkit repository from Github. 55 | 56 | git clone https://github.com/getkirby/plainkit.git 57 | 58 | ## Documentation 59 | 60 | 61 | ## Issues and feedback 62 | 63 | If you have a Github account, please report issues 64 | directly on Github: 65 | 66 | - 67 | - 68 | - 69 | 70 | Otherwise you can use Kirby's forum: http://getkirby.com/forum 71 | or send us an email: 72 | 73 | ## Support 74 | 75 | 76 | ## Copyright 77 | 78 | © 2009-2016 Bastian Allgeier (Bastian Allgeier GmbH) 79 | -------------------------------------------------------------------------------- /public/site/plugins/seo.php: -------------------------------------------------------------------------------- 1 | seo_description(), 10 | page()->description(), 11 | site()->seo_description(), 12 | site()->description() 13 | )); 14 | 15 | $pageKeywords = self::getValue(array( 16 | page()->keywords(), 17 | site()->keywords() 18 | )); 19 | 20 | self::setTitle($tags); 21 | 22 | self::setMetaProperty($tags, 'description', $pageDescription); 23 | self::setMetaProperty($tags, 'keywords', $pageKeywords); 24 | 25 | self::setOgProperty($tags, 'description', $pageDescription); 26 | self::setOgProperty($tags, 'site_name', site()->title()); 27 | self::setOgProperty($tags, 'title', page()->title()); 28 | self::setOgProperty($tags, 'type', array(site()->seo_type(), 'website')); 29 | self::setOgProperty($tags, 'url', page()->url()); 30 | 31 | self::renderTags($tags); 32 | } 33 | 34 | private function setMetaProperty (&$tags, $propName, $propValues) { 35 | self::createProperty($tags, 'name', $propName, $propValues); 36 | } 37 | 38 | private function setOgProperty (&$tags, $propName, $propValues) { 39 | self::createProperty($tags, 'property', 'og:' . $propName, $propValues); 40 | } 41 | 42 | private function createProperty (&$tags, $propKey, $propName, $propValues) { 43 | $propValue = self::getValue($propValues); 44 | if ($propValue) { 45 | array_push($tags, 46 | new Brick('meta', false, array( 47 | $propKey => $propName, 48 | 'content' => $propValue 49 | )) 50 | ); 51 | } 52 | } 53 | 54 | private function setTitle (&$tags) { 55 | $pageTitle = site()->page()->title(); 56 | $siteTitle = site()->title(); 57 | $divider = site()->title_divider()->isNotEmpty() ? site()->title_divider() : '|'; 58 | 59 | array_push($tags, 60 | new Brick('title', "{$pageTitle} {$divider} {$siteTitle}") 61 | ); 62 | } 63 | 64 | private function getValue ($values) { 65 | if (is_array($values)) { 66 | foreach ($values as $val) { 67 | if (trim($val) !== "" && $val != false) { 68 | return $val; 69 | } 70 | } 71 | return false; 72 | } else { 73 | return $values; 74 | } 75 | } 76 | 77 | private function renderTags($tags) { 78 | echo implode($tags, "\n"); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /public/license.md: -------------------------------------------------------------------------------- 1 | # Kirby End User License Agreement 2 | 3 | This End User License Agreement (the "Agreement") is a binding legal agreement between you and the Bastian Allgeier GmbH (the "Author"). By installing or using the Kirby CMS (the "Software"), you agree to be bound by the terms of this Agreement. If you do not agree to the Agreement, do not download, install, or use the Software. Installation or use of the Software signifies that you have read, understood, and agreed to be bound by the Agreement. 4 | 5 | Revised on: 4 October, 2014 6 | 7 | ## Usage 8 | 9 | This Agreement grants a non-exclusive, non-transferable license to install and use a single instance of the Software on a specific Website. Additional Software licenses must be purchased in order to install and use the Software on additional Websites. The Author reserves the right to determine whether use of the Software qualifies under this Agreement. The Author owns all rights, title and interest to the Software (including all intellectual property rights) and reserves all rights to the Software that are not expressly granted in this Agreement. 10 | 11 | ## Backups 12 | 13 | You may make copies of the Software in any machine readable form solely for back-up purposes, provided that you reproduce the Software in its original form and with all proprietary notices on the back-up copy. All rights to the Software not expressly granted herein are reserved by the Author. 14 | 15 | ## Technical Support 16 | 17 | Technical support is provided as described on . No representations or guarantees are made regarding the response time in which support questions are answered. 18 | 19 | ## Refund Policy 20 | 21 | We offer a 14-day, money back refund policy. 22 | 23 | ## Restrictions 24 | 25 | You understand and agree that you shall only use the Software in a manner that complies with any and all applicable laws in the jurisdictions in which you use the Software. Your use shall be in accordance with applicable restrictions concerning privacy and intellectual property rights. 26 | 27 | ### You may not: 28 | 29 | Distribute derivative works based on the Software; 30 | Reproduce the Software except as described in this Agreement; 31 | Sell, assign, license, disclose, distribute, or otherwise transfer or make available the Software or its Source Code, in whole or in part, in any form to any third parties; 32 | Use the Software to provide services to others; 33 | Remove or alter any proprietary notices on the Software. 34 | 35 | ## No Warranty 36 | 37 | THE SOFTWARE IS OFFERED ON AN "AS-IS" BASIS AND NO WARRANTY, EITHER EXPRESSED OR IMPLIED, IS GIVEN. THE AUTHOR EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. YOU ASSUME ALL RISK ASSOCIATED WITH THE QUALITY, PERFORMANCE, INSTALLATION AND USE OF THE SOFTWARE INCLUDING, BUT NOT LIMITED TO, THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USE THE SOFTWARE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE. 38 | 39 | ## Term, Termination, and Modification. 40 | 41 | You may use the Software under this Agreement until either party terminates this Agreement as set forth in this paragraph. Either party may terminate the Agreement at any time, upon written notice to the other party. Upon termination, all licenses granted to you will terminate, and you will immediately uninstall and cease all use of the Software. The Sections entitled "No Warranty," "Indemnification," and "Limitation of Liability" will survive any termination of this Agreement. 42 | 43 | The Author may modify the Software and this Agreement with notice to you either in email or by publishing content on the Software website, including but not limited to changing the functionality or appearance of the Software, and such modification will become binding on you unless you terminate this Agreement. 44 | 45 | ## Indemnification. 46 | 47 | By accepting the Agreement, you agree to indemnify and otherwise hold harmless the Author, its officers, employers, agents, subsidiaries, affiliates and other partners from any direct, indirect, incidental, special, consequential or exemplary damages arising out of, relating to, or resulting from your use of the Software or any other matter relating to the Software. 48 | 49 | ## Limitation of Liability. 50 | 51 | YOU EXPRESSLY UNDERSTAND AND AGREE THAT THE AUTHOR SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES (EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. IN NO EVENT WILL THE AUTHOR'S TOTAL CUMULATIVE DAMAGES EXCEED THE FEES YOU PAID TO THE AUTHOR UNDER THIS AGREEMENT IN THE MOST RECENT TWELVE-MONTH PERIOD. 52 | 53 | # Definitions 54 | 55 | ## Definition of Website 56 | 57 | A "Website" is defined as a single domain including sub-domains that operate as a single entity. What constitutes a single entity shall be at the sole discretion of the Author. 58 | 59 | ## Definition of Source Code 60 | 61 | The "Source Code" is defined as the contents of all HTML, CSS, JavaScript, and PHP files provided with the Software and includes all related image files and database schemas. 62 | 63 | ## Definition of an Update 64 | 65 | An "Update" of the Software is defined as that which adds minor functionality enhancements or any bug fix to the current version. This class of release is identified by the change of the revision to the right of the decimal point, i.e. X.1 to X.2 66 | 67 | The assignment to the category of Update or Upgrade shall be at the sole discretion of the Author. 68 | 69 | ## Definition of an Upgrade 70 | 71 | An "Upgrade" is a major release of the Software and is defined as that which incorporates major new features or enhancement that increase the core functionality of the software. This class of release is identified by the change of the revision to the left of the decimal point, i.e. 4.X to 5.X 72 | 73 | The assignment to the category of Update or Upgrade shall be at the sole discretion of the Author. --------------------------------------------------------------------------------