-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 96b0961
Showing
17 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ISC License (ISC) | ||
|
||
Copyright (c) Jérôme Gamez, https://github.com/jeromegamez <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Kirby Plainkit Cookiecutter | ||
|
||
A [Cookiecutter] template to start a fresh [Kirby] site with a [public folder setup]. | ||
|
||
## Features | ||
|
||
* A fresh, git(Hub)-ready plainkit Kirby site | ||
* The site title is already set up | ||
* Run it locally out of the box with [Valet] or with `composer start` | ||
* Media is stored folder is located in `storage/media` folder and symlinked to `public/media` | ||
|
||
## Using this cookiecutter | ||
|
||
[Install Cookiecutter][Cookiecutter Installation Docs]: | ||
|
||
```shell | ||
$ pip install -U cookiecutter | ||
# Or, on a mac with Homebrew | ||
$ brew install cookiecutter | ||
``` | ||
|
||
Generate a new Kirby site: | ||
|
||
```shell | ||
$ cookiecutter gh:beste/kirby-plainkit | ||
``` | ||
|
||
## User config | ||
|
||
If you use this (or other) Cookiecutters a lot, you can override the defaults by having | ||
a `.cookiecutterrc` file in your home directory: | ||
|
||
```yml | ||
default_context: | ||
full_name: "My full name" | ||
email: "[email protected]" | ||
github_username: "mygithubusername" | ||
abbreviations: | ||
kirby: https://github.com/beste/kirby-plainkit | ||
``` | ||
You can find more information at https://cookiecutter.readthedocs.io/en/latest/advanced/user_config.html | ||
[Cookiecutter]: https://github.com/cookiecutter/cookiecutter/ | ||
[Cookiecutter Installation Docs]: https://cookiecutter.readthedocs.io/en/latest/installation.html | ||
[Kirby]: https://getkirby.com | ||
[public folder setup]: https://getkirby.com/docs/guide/configuration#custom-folder-setup__public-folder-setup | ||
[Laravel Valet]: https://getkirby.com/docs/cookbook/setup/development-environment#laravel-valet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"full_name": "Beste Person", | ||
"email": "[email protected]", | ||
"github_username": "beste", | ||
"kirby_title": "My new website", | ||
"project_slug": "{{ cookiecutter.kirby_title.lower().replace(' ', '-').replace('_', '-') }}", | ||
"composer_package_name": "{{ cookiecutter.github_username.lower() }}/{{ cookiecutter.project_slug }}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
composer update | ||
|
||
git init | ||
|
||
git add -A | ||
|
||
git commit -m "Get started with Kirby" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_size = 4 | ||
indent_style = space | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/config/.license | ||
/public/media | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "{{ cookiecutter.composer_package_name }}", | ||
"description": "{{ cookiecutter.kirby_title }}", | ||
"type": "project", | ||
"license": "ISC", | ||
"authors": [ | ||
{ | ||
"name": "{{ cookiecutter.full_name }}", | ||
"email": "{{ cookiecutter.email }}" | ||
} | ||
], | ||
"require": { | ||
"getkirby/cms": "^3.5.3.1" | ||
}, | ||
"config": { | ||
"optimize-autoloader": true | ||
}, | ||
"extra": { | ||
"kirby-cms-path": false | ||
}, | ||
"scripts": { | ||
"start": [ | ||
"@php -S localhost:8000 -t public" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Title: Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Title: Home | ||
|
||
---- | ||
|
||
Text: Welcome to **{{ cookiecutter.kirby_title }}** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Title: {{ cookiecutter.kirby_title }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
require __DIR__.'/../vendor/autoload.php'; | ||
|
||
$kirby = (new \Kirby\Cms\App([ | ||
'roots' => [ | ||
'index' => __DIR__, | ||
'base' => $base = dirname(__DIR__), | ||
'content' => $base . '/content', | ||
'site' => $base . '/site', | ||
'storage' => $storage = $base . '/storage', | ||
'accounts' => $storage . '/accounts', | ||
'cache' => $storage . '/cache', | ||
'logs' => $storage . '/logs', | ||
'media' => $storage . '/media', | ||
'sessions' => $storage . '/sessions', | ||
] | ||
])); | ||
|
||
if (!file_exists(__DIR__ . '/media')) { | ||
symlink($kirby->roots()->media(), __DIR__ . '/media'); | ||
} | ||
|
||
echo $kirby->render(); |
7 changes: 7 additions & 0 deletions
7
{{cookiecutter.project_slug}}/site/blueprints/pages/default.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title: Default Page | ||
preset: page | ||
fields: | ||
text: | ||
label: Text | ||
type: textarea | ||
size: large |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
title: Site | ||
preset: pages | ||
unlisted: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
'debug' => false, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1><?= $page->title()->html() ?></h1> | ||
|
||
<?= $page->text()->kirbytext() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
!/media | ||
!/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* | ||
!/.gitignore |