Skip to content

Commit aa059d0

Browse files
author
arnoson
committed
feat: add basic example, mostly for manual testing
1 parent 3979914 commit aa059d0

File tree

24 files changed

+1947
-1
lines changed

24 files changed

+1947
-1
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/.* export-ignore
22
/package.json export-ignore
3-
/packages/vite-plugin-kirby export-ignore
3+
/example export-ignore
44

5+
/packages/vite-plugin-kirby export-ignore
56
/packages/kirby-vite/.* export-ignore
67
/packages/kirby-vite/test export-ignore
78
/packages/kirby-vite/composer.json export-ignore

example/.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
9+
[*.md]
10+
indent_size = 4
11+
trim_trailing_whitespace = false
12+
13+
[site/templates/**.php]
14+
indent_size = 2
15+
16+
[site/snippets/**.php]
17+
indent_size = 2
18+
19+
[package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}]
20+
indent_style = space
21+
indent_size = 2

example/.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
kirby
2+
vendor
3+
dist
4+
.dev
5+
site/config/vite.config.php
6+
7+
# System files
8+
# ------------
9+
10+
Icon
11+
.DS_Store
12+
13+
# Temporary files
14+
# ---------------
15+
16+
/media/*
17+
!/media/index.html
18+
19+
# Lock files
20+
# ---------------
21+
22+
.lock
23+
24+
# Editors
25+
# (sensitive workspace files)
26+
# ---------------------------
27+
*.sublime-workspace
28+
/.vscode
29+
/.idea
30+
31+
# -------------SECURITY-------------
32+
# NEVER publish these files via Git!
33+
# -------------SECURITY-------------
34+
35+
# Cache Files
36+
# ---------------
37+
38+
/site/cache/*
39+
!/site/cache/index.html
40+
41+
# Accounts
42+
# ---------------
43+
44+
/site/accounts/*
45+
!/site/accounts/index.html
46+
47+
# Sessions
48+
# ---------------
49+
50+
/site/sessions/*
51+
!/site/sessions/index.html
52+
53+
# License
54+
# ---------------
55+
56+
/site/config/.license

example/.htaccess

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Kirby .htaccess
2+
# revision 2022-09-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>

example/composer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "getkirby/plainkit",
3+
"description": "Kirby Plainkit",
4+
"type": "project",
5+
"keywords": [
6+
"kirby",
7+
"cms",
8+
"starterkit"
9+
],
10+
"authors": [
11+
{
12+
"name": "Bastian Allgeier",
13+
"email": "bastian@getkirby.com",
14+
"homepage": "https://getkirby.com"
15+
}
16+
],
17+
"homepage": "https://getkirby.com",
18+
"support": {
19+
"email": "support@getkirby.com",
20+
"issues": "https://github.com/getkirby/starterkit/issues",
21+
"forum": "https://forum.getkirby.com",
22+
"source": "https://github.com/getkirby/starterkit"
23+
},
24+
"require": {
25+
"php": ">=8.0.0 <8.3.0",
26+
"getkirby/cms": "^3.9",
27+
"arnoson/kirby-vite": "^3.0"
28+
},
29+
"config": {
30+
"allow-plugins": {
31+
"getkirby/composer-installer": true
32+
},
33+
"optimize-autoloader": true
34+
},
35+
"scripts": {
36+
"start": [
37+
"Composer\\Config::disableProcessTimeout",
38+
"@php -S localhost:8000 kirby/router.php"
39+
]
40+
}
41+
}

0 commit comments

Comments
 (0)