Skip to content

Commit

Permalink
Template import
Browse files Browse the repository at this point in the history
  • Loading branch information
kerli81 committed May 16, 2019
1 parent b6a6797 commit 7d71a6c
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .buildpath
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
20 changes: 20 additions & 0 deletions .editorconfig
@@ -0,0 +1,20 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.php]
indent_size = 4

[*.md,*.txt]
trim_trailing_whitespace = false
insert_final_newline = false

[composer.json]
indent_size = 4
12 changes: 12 additions & 0 deletions .gitattributes
@@ -0,0 +1,12 @@
# Git
.gitattributes export-ignore
.gitignore export-ignore

# Documents
LICENSE.md export-ignore
README.md export-ignore

# Eclipse
.buildpath export-ignore
.editorconfig export-ignore
.project export-ignore
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
# OS files
.DS_Store

# npm modules
/node_modules

# Composer files
/vendor
28 changes: 28 additions & 0 deletions .project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Kirby SecuredPages Plugin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
21 changes: 21 additions & 0 deletions LICENSE.md
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.
64 changes: 62 additions & 2 deletions README.md
@@ -1,2 +1,62 @@
# kirby-securedpages
Protect pages for authenticated users
# Kirby Pluginkit: Example plugin for Kirby

> Variant "Setup with autoloader"
This is a boilerplate for a Kirby plugin that can be installed via all three [supported installation methods](https://getkirby.com/docs/guide/plugins/plugin-setup-basic#the-three-plugin-installation-methods).

You can find a list of Pluginkit variants on the [`master` branch](https://github.com/getkirby/pluginkit/tree/master).

****

## How to use the Pluginkit

1. Fork this repository
2. Change the plugin name and description in the `composer.json`
3. Change the plugin name in the `index.php`
4. Change the license if you don't want to publish under MIT
5. Add your plugin code to the `index.php` and the `src` directory
6. Update this `README` with instructions for your plugin

We have a tutorial on how to build your own plugin based on the Pluginkit [in the Kirby documentation](https://getkirby.com/docs/guide/plugins/plugin-setup-autoloader).

What follows is an example README for your plugin.

****

## Installation

### Download

Download and copy this repository to `/site/plugins/{{ plugin-name }}`.

### Git submodule

```
git submodule add https://github.com/{{ your-name }}/{{ plugin-name }}.git site/plugins/{{ plugin-name }}
```

### Composer

```
composer require {{ your-name }}/{{ plugin-name }}
```

## Setup

*Additional instructions on how to configure the plugin (e.g. blueprint setup, config options, etc.)*

## Options

*Document the options and APIs that this plugin offers*

## Development

*Add instructions on how to help working on the plugin (e.g. npm setup, Composer dev dependencies, etc.)*

## License

MIT

## Credits

- [Your Name](https://github.com/ghost)
15 changes: 15 additions & 0 deletions composer.json
@@ -0,0 +1,15 @@
{
"name": "getkirby/pluginkit",
"description": "Kirby Example Plugin",
"type": "kirby-plugin",
"license": "MIT",
"authors": [
{
"name": "Your Name",
"email": "you@example.com"
}
],
"require": {
"getkirby/composer-installer": "^1.1"
}
}
9 changes: 9 additions & 0 deletions index.php
@@ -0,0 +1,9 @@
<?php

load([
'superwoman\\superplugin\\superclass' => 'src/Superclass.php'
], __DIR__);

Kirby::plugin('getkirby/pluginkit', [
// plugin magic happens here
]);
8 changes: 8 additions & 0 deletions src/Superclass.php
@@ -0,0 +1,8 @@
<?php

namespace Superwoman\Superplugin;

class Superclass
{

}

0 comments on commit 7d71a6c

Please sign in to comment.