Skip to content

Commit

Permalink
First step to a brand new site 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Apr 14, 2021
1 parent c8e825c commit f986015
Show file tree
Hide file tree
Showing 3,273 changed files with 45,562 additions and 53,365 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

14 changes: 14 additions & 0 deletions .deployignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.deployignore
.editorconfig
.github
.github/**
.htaccess
.vscode
.vscode/**
composer.json
package-lock.json
package.json
postcss.config.js
README.md
scripts
uglify.json
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ insert_final_newline = true
indent_size = 4
trim_trailing_whitespace = false

[*.twig]
indent_size = 2

[site/templates/**.php]
indent_size = 2

Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/algolia.yml

This file was deleted.

83 changes: 72 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,74 @@
node_modules
.vscode
.idea
# System files
# ------------

Icon
.DS_Store
/backstop_data
/www/media
/site/accounts
/site/cache
/site/config/keys

# Temporary files
# ---------------

/media/*
!/media/index.html
/node_modules/

# Plugin cruft
# ---------------

/site/plugins/*/vendor/**/.*
/site/plugins/*/vendor/**/*.json
/site/plugins/*/vendor/**/*.txt
/site/plugins/*/vendor/**/*.md
/site/plugins/*/vendor/**/*.yml
/site/plugins/*/vendor/**/*.yaml
/site/plugins/*/vendor/**/*.xml
/site/plugins/*/vendor/**/*.dist
/site/plugins/*/vendor/**/*.php_cs
/site/plugins/*/vendor/**/readme.php
/site/plugins/*/vendor/**/COPYING
/site/plugins/*/vendor/**/COMMITMENT
/site/plugins/*/vendor/**/VERSION
/site/plugins/*/vendor/**/.github/*
/site/plugins/*/vendor/**/.circleci/*
/site/plugins/*/vendor/**/docs/*
/site/plugins/*/vendor/**/example/*
/site/plugins/*/vendor/**/examples/*
/site/plugins/*/vendor/**/test/*
/site/plugins/*/vendor/**/tests/*
/site/plugins/*/vendor/**/php4/*
/site/plugins/ray


# Lock files
# ---------------
.lock

# -------------SECURITY-------------
# NEVER publish these files via Git!
# -------------SECURITY-------------

# Cache Files
# ---------------

/site/cache/*
!/site/cache/index.html

# Config
# ------

/site/config/keys/*

# Accounts
# ---------------

/site/accounts/*
!/site/accounts/index.html

# Sessions
# ---------------

/site/sessions/*
!/site/sessions/index.html

# License
# ---------------
/site/config/.license
/site/sessions
/backstop.json
/config.json
64 changes: 64 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Kirby .htaccess
# revision 2020-06-15

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder;
# otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite,
# set the RewriteBase to:
#
# RewriteBase /mysite

# In some environments it's necessary to
# set the RewriteBase to:
#
# RewriteBase /

# block files and folders beginning with a dot, such as .git
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
RewriteRule (^|/)\.(?!well-known\/) index.php [L]

# block all files in the content folder from being accessed directly
RewriteRule ^content/(.*) index.php [L]

# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) index.php [L]

# block direct access to Kirby and the Panel sources
RewriteRule ^kirby/(.*) index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# pass the Authorization header to PHP
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

# Make sure cache gets revalidated for JS modules
<IfModule mod_headers.c>
<FilesMatch ".(js|mjs)$">
Header set Cache-Control "no-cache"
</FilesMatch>
</IfModule>

# compress text file responses
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
38 changes: 0 additions & 38 deletions .stylelintrc

This file was deleted.

9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": false
},
"files.associations": {
"*.txt": "markdown"
}
}
102 changes: 2 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,113 +5,15 @@ This repo contains the whole <getkirby.com> website.
## Requirements

- Local development server running PHP 7.3+ (e.g. Apache, nginx, MAMP).
- Node.js 10+ (LTS release) + NPM

## Installation and setup

### Step 1: Clone the repo into an empty folder
Clone the repo into an empty folder

```
git clone git@github.com:getkirby/getkirby.com.git
```

### Step 2: Install dependencies

```
npm install
```

### Step 3: Configuration

We are using [Laravel Mix](https://laravel.com/docs/5.6/mix) as our build tool,
which also provides BrowserSync for an optimal developer experience. By default,
it expects a copy of the site to run at `http://getkirby.test`. The document root
of the site is the subfolder `www/`.

You can override the default domain if you prefer to run the site
at a different domain. To do so, just copy `config.default.json` to a file
named `config.json`. You can define a custom domain that new file.

## Start the build tool for development

```
cd [root folder of this repo]
npm start
```

This will run BrowserSync and watch your CSS, JS and template files for changes.

Stop the server by pressing `CRTL+C` or by closing the CLI window.

## Build for production

Before committing anything back to the repo, make sure to run a production build,
as our server does not build assets by itself. It’s always a good idea to lint
your code, before committing anything to the repo. You can do so, by running the
dedicated lint task:

```
npm run lint
```

If the linters do not produce any errors, you can create a production build, as
follows:

```
npm run build
```

## Linters

Our site uses `eslint` and `stylelint` for keeping the contents of JS and SCSS
files consistent. It is highly recommended that you intall the corresponding
integration plugin for your editor or IDE. If your development tool of choice
does not offer the corresponding integration, you can alternatively run the
linters manually before commiting anything back to the repository, by executing:

```
npm run lint
```

## Visual regression tests

When refactoring and style sheets or for testing how any change will affect the
site appearance, you are encouraged to use the integrated backstop testing. First
of all, you have to create a local configuration. To generate the tests, run:

```
npm run backstop-config
````

This will create a file called `backstop.json` within your project root. To
generate reference screenshots of the site, run:

```
npm run backstop-reference
```

After your reference has been generated (this will take a while), make your
changes to to any CSS file, template or anything else that could affect page
appearance. Now, run:

```
npm run backstop-test
```

This will generate a second set of screenshots. Backstop will compare these to
the reference set of screenshots and open a report in your browser after the
process has finished, allowing you to revisit every change.

To open the report again, run:

```
npm run backstop-report
```

The testing scenarios for Backstop are defined in `site/plugins/backstop/index.php`,
in case you want to add a new template and add a page where it’s acutally used
to the scenarios.

## Metadata for search engines and social media

See `site/plugins/meta/README.md` for further information.
See [`site/plugins/meta/README.md`](/site/plugins/meta/README.md) for further information.
Loading

0 comments on commit f986015

Please sign in to comment.