Skip to content

Commit 2432a38

Browse files
committed
Update readme
1 parent 7284a2b commit 2432a38

File tree

5 files changed

+33
-44
lines changed

5 files changed

+33
-44
lines changed

.editorconfig

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
# This file is for unifying the coding style for different editors and IDEs
2-
# editorconfig.org
3-
41
[*]
5-
charset = utf-8
6-
indent_style = space
7-
indent_size = 2
82
end_of_line = lf
9-
insert_final_newline = true
3+
charset = utf-8
104
trim_trailing_whitespace = true
11-
12-
[*.php]
5+
insert_final_newline = true
6+
indent_style = space
137
indent_size = 4
8+
max_line_length = 80
149

15-
[*.md,*.txt]
16-
trim_trailing_whitespace = false
17-
insert_final_newline = false
10+
[*.yml]
11+
indent_size = 2
1812

19-
[composer.json]
20-
indent_size = 4
13+
[*.md]
14+
trim_trailing_whitespace = false

.github/title.png

27 KB
Loading

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 80,
3+
"semi": true,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"bracketSpacing": true,
7+
"bracketSameLine": false,
8+
"phpVersion": "7.4",
9+
"trailingCommaPHP": false,
10+
"htmlWhitespaceSensitivity": "css",
11+
"proseWrap": "never"
12+
}

LICENSE.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
MIT License
22

3-
Copyright (c) 2020 hana+nils · Büro für Gestaltung
3+
Copyright (c) 2020-2021 hana+nils · Büro für Gestaltung
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
148

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Kirby Methods Folder
1+
![Kirby Methods Folder](.github/title.png)
22

3-
Kirby 3 automatically registers local collections, controllers or models using folder conventions like `site/collections`, `site/controllers` or `site/models`. It does not for custom methods which have to be provided using plugins. This plugin offers the missing link and allows for providing custom methods in `site/methods`.
3+
**Methods Folder** is a plugin for [Kirby 3](https://getkirby.com) to automatically register local methods provided in the folder `site/methods` just like Kirby accepts local collections, controllers or models without the need of writing a dedicated plugin.
44

55
## Installation
66

@@ -20,7 +20,7 @@ git submodule add https://github.com/hananils/kirby-methods-folder.git site/plug
2020
composer require hananils/kirby-methods-folder
2121
```
2222

23-
## Setup
23+
# Creating custom methods
2424

2525
After installing this plugin, you can create custom methods in `site/methods` by creating separate files for the different method types:
2626

@@ -44,17 +44,15 @@ Those files have to return an array:
4444
<?php
4545

4646
return [
47-
'my-method' => function() {
47+
'my-method' => function () {
4848
// your method code here
4949
}
5050
];
51-
5251
```
5352

54-
Please see the official docs for more information about the different method types:
55-
<https://getkirby.com/docs/reference/plugins/extensions>
53+
Please see the official docs for more information about the different method types: <https://getkirby.com/docs/reference/plugins/extensions>
5654

57-
### Helpers
55+
# Creating custom helpers
5856

5957
You can also create a `helpers.php` file inside the `methods` folder where you can put custom methods you'd like to have available universally:
6058

@@ -66,10 +64,7 @@ site
6664

6765
This file will automatically be included and may contain as many global helper functions as needed.
6866

69-
## License
70-
71-
MIT
72-
73-
## Credits
67+
# License
7468

75-
- [hana+nils · Büro für Gestaltung](https://hananils.de)
69+
This plugin is provided freely under the [MIT license](LICENSE.md) by [hana+nils · Büro für Gestaltung](https://hananils.de).
70+
We create visual designs for digital and analog media.

0 commit comments

Comments
 (0)