Skip to content

Commit 914e65d

Browse files
committed
Inital commit
0 parents  commit 914e65d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3551
-0
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[*.{css,scss,less,js,json,ts,sass,html,hbs,mustache,phtml,html.twig,md,yml}]
2+
charset = utf-8
3+
indent_style = space
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
indent_size = 4
12+
trim_trailing_whitespace = false
13+
14+
[site/templates/**.php]
15+
indent_size = 2
16+
17+
[site/snippets/**.php]
18+
indent_size = 2
19+
20+
[package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}]
21+
indent_style = space
22+
indent_size = 2

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.jpeg filter=lfs diff=lfs merge=lfs -text
2+
*.jpg filter=lfs diff=lfs merge=lfs -text
3+
*.webp filter=lfs diff=lfs merge=lfs -text
4+
*.avif filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ┌────────────────────────────────┐
2+
# SYSTEM AND IDE
3+
# └────────────────────────────────┘
4+
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
pnpm-debug.log*
11+
.vscode
12+
.DS_Store
13+
14+
# ┌────────────────────────────────┐
15+
# KIRBY AND VITE
16+
# └────────────────────────────────┘
17+
18+
# Kirby files and License
19+
kirby
20+
vendor
21+
node_modules
22+
/site/config/.license
23+
.lock
24+
25+
# Frontend
26+
/public/assets/
27+
/public/dist/
28+
29+
# Temporary files, Accounts,
30+
# Cache and Sessions
31+
/public/media/*
32+
/site/plugins/*
33+
#!/site/plugin/custom
34+
/storage/accounts/*
35+
/storage/cache/*
36+
/storage/sessions/*
37+
38+
!.gitkeep

.htaccess

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Kirby .htaccess
2+
# revision 2020-06-15
3+
4+
# rewrite rules
5+
<IfModule mod_rewrite.c>
6+
7+
# enable awesome urls. i.e.:
8+
# http://yourdomain.com/about-us/team
9+
RewriteEngine on
10+
11+
# make sure to set the RewriteBase correctly
12+
# if you are running the site in a subfolder;
13+
# otherwise links or the entire site will break.
14+
#
15+
# If your homepage is http://yourdomain.com/mysite,
16+
# set the RewriteBase to:
17+
#
18+
# RewriteBase /mysite
19+
20+
# In some environments it's necessary to
21+
# set the RewriteBase to:
22+
#
23+
# RewriteBase /
24+
25+
# block files and folders beginning with a dot, such as .git
26+
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
27+
RewriteRule (^|/)\.(?!well-known\/) index.php [L]
28+
29+
# block all files in the content folder from being accessed directly
30+
RewriteRule ^content/(.*) index.php [L]
31+
32+
# block all files in the site folder from being accessed directly
33+
RewriteRule ^site/(.*) index.php [L]
34+
35+
# block direct access to Kirby and the Panel sources
36+
RewriteRule ^kirby/(.*) index.php [L]
37+
38+
# make site links work
39+
RewriteCond %{REQUEST_FILENAME} !-f
40+
RewriteCond %{REQUEST_FILENAME} !-d
41+
RewriteRule ^(.*) index.php [L]
42+
43+
</IfModule>
44+
45+
# pass the Authorization header to PHP
46+
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
47+
48+
# compress text file responses
49+
<IfModule mod_deflate.c>
50+
AddOutputFilterByType DEFLATE text/plain
51+
AddOutputFilterByType DEFLATE text/html
52+
AddOutputFilterByType DEFLATE text/css
53+
AddOutputFilterByType DEFLATE text/javascript
54+
AddOutputFilterByType DEFLATE application/json
55+
AddOutputFilterByType DEFLATE application/javascript
56+
AddOutputFilterByType DEFLATE application/x-javascript
57+
</IfModule>

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"proseWrap": "preserve",
5+
"singleQuote": true
6+
}

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Kirby & Vite Starterkit
2+
3+
Use this Starterkit for your next [Kirby](https://getkirby.com/)-CMS-Project. It comes with a customized Panel, customized Styles and with the build tool [Vite](https://vitejs.dev/) for fast asset bundling. [Kirby Vite](https://github.com/arnoson/kirby-vite) is building the bridge between Kirby and Vite by providing helper functions to get the correct path to the versioned assets.
4+
5+
This Starterkit will open the Website and it's Panel in development mode, will live reload changed Content, Assets and Templates. You can additionally use own Scripts and Styles per Page.
6+
7+
## Prerequisites
8+
9+
In order to work with this Repository, please [install Node](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.com/), if not happened before. Make sure, both is available.
10+
11+
```shell
12+
$ npm install -g yarn
13+
$ npm -v && yarn -v
14+
```
15+
16+
## Installation
17+
18+
If your Computer is ready-to-go, clone this Repository and install it's dependencies.
19+
20+
```shell
21+
$ git clone [email protected]:macx/kirby-vite-starterkit.git my-website
22+
$ cd my-website
23+
$ composer install
24+
$ yarn install
25+
```
26+
27+
To get feature updates from this starterkit, add a remote host entry and pull a new version. Be sure to commit your changes before. If you just want to update Kirby, [do it on your own](https://getkirby.com/docs/cookbook/setup/composer#updating-kirby).
28+
29+
```shell
30+
$ git remote add updates [email protected]:macx/kirby-vite-starterkit.git
31+
$ git pull updates
32+
```
33+
34+
## Development
35+
36+
Foobar
37+
38+
<!-- prettier-ignore -->
39+
| Folder | What's in it? |
40+
| :-- | :-- |
41+
| `/content` | The [content](https://getkirby.com/docs/guide/tour#where-the-content-lives) of your website. |
42+
| `/src` | All your assets for the Vite bundling. `app.js` and `app.scss` are your main styles and script. |
43+
| `/src/assets` | Folder for your global Fonts and Images. |
44+
| `/src/templates` | Optionally, every page can contain it's own styles `index.scss` and script `index.js`. |
45+
| `/site` | Project folder for Kirbys [Config](https://getkirby.com/docs/guide/configuration), [Blueprints](https://getkirby.com/docs/guide/blueprints/introduction), [Plugins](https://getkirby.com/docs/guide/plugins/plugin-basics), [Snippets](https://getkirby.com/docs/guide/templates/snippets) and [Templates](https://getkirby.com/docs/guide/templates/basics). |
46+
| `/public` | The [Public folder](https://getkirby.com/docs/guide/configuration#custom-folder-setup__public-folder-setup) is your document root of your website, including the bundled assets from Vite. |
47+
48+
### Startits
49+
50+
```sh
51+
$ yarn dev
52+
```
53+
54+
```sh
55+
$ yarn build
56+
```
57+
58+
```sh
59+
$ yarn preview
60+
```
61+
62+
## Thanks to
63+
64+
This Starterkit was heavely inspired by the [Kirby Vite Multi Page Kit](https://github.com/arnoson/kirby-vite-multi-page-kit) from @arnoson.

composer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "macx/kirby-vite-starterkit",
3+
"description": "Kirby & Vite Starterkit",
4+
"type": "project",
5+
"require": {
6+
"php": ">=7.4.0 <8.2.0",
7+
"getkirby/cms": "^3.6",
8+
"arnoson/kirby-vite": "^2.5"
9+
},
10+
"config": {
11+
"optimize-autoloader": true,
12+
"allow-plugins": {
13+
"getkirby/composer-installer": true
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)