Skip to content

Commit

Permalink
feat: init plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Nov 11, 2024
1 parent d684881 commit bf2cde9
Show file tree
Hide file tree
Showing 24 changed files with 1,545 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/content/ export-ignore
/site/ export-ignore
/src/ export-ignore
/media/ export-ignore
/tests/ export-ignore
/.github/ export-ignore

/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.htaccess export-ignore
/index.site.php export-ignore
/package.json export-ignore
/package-lock.json export-ignore
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches:
- main
jobs:
release:
name: Release
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 21

- name: Install
run: npm install

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PAT_SEMANTIC_RELEASE }}
run: npx semantic-release
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# files of Composer dependencies that are not needed for the plugin
/vendor/**/.*
/vendor/**/*.json
/vendor/**/*.txt
/vendor/**/*.md
/vendor/**/*.yml
/vendor/**/*.yaml
/vendor/**/*.xml
/vendor/**/*.dist
/vendor/**/readme.php
/vendor/**/LICENSE
/vendor/**/COPYING
/vendor/**/VERSION
/vendor/**/docs/*
/vendor/**/example/*
/vendor/**/examples/*
/vendor/**/test/*
/vendor/**/tests/*
/vendor/**/php4/*
/vendor/getkirby/composer-installer
/vendor/doctrine
/vendor/myclabs
/vendor/phar-io
/vendor/phpdocumentor
/vendor/phpspec
/vendor/phpunit
/vendor/sebastian
/vendor/symfony
/vendor/theseer
/vendor/webmozart
/.cache
/node_modules
/site/sessions
/site/accounts
/media
/.vscode
/kirby
/.sqlite
/site/cache
/content/phpunit-test
/~
/content/phpunit/.lock
/.ddev
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v21.11.0
52 changes: 52 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"tagFormat": "v${version}",
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "docs",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "improvement",
"release": "patch"
}
]
},
"@semantic-release/release-notes-generator",
"@ambimax/semantic-release-composer",
"@semantic-release/github",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@ambimax/semantic-release-composer",
{
"skipOnMissingComposerJson": true
}
],
[
"@semantic-release/git",
{
"assets": [
"composer.json",
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 konzentrik GmbH

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.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# sociabli-kirby
sociabli-kirby codebase
# Kirby Sociabli

![GitHub release](https://img.shields.io/github/release/konzentrik/kirbySociabli.svg?maxAge=1800) ![License](https://img.shields.io/github/license/mashape/apistatus.svg) ![Kirby Version](https://img.shields.io/badge/Kirby-4%2B-black.svg)

---

## Installation

Use one of these methods to install the plugin:

- composer (recommended): `composer require konzentrik/kirby-sociabli`
- zip file: unzip [main.zip](https://github.com/konzentrik/kirby-sociabli/releases/latest) as folder `site/plugins/sociabli`
Empty file added assets/.gitkeep
Empty file.
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "konzentrik/kirby-sociabli",
"version": "1.0.0",
"homepage": "https://github.com/konzentrik/kirby-sociabli",
"description": "The sociabli plugin for Kirby",
"type": "kirby-plugin",
"license": "MIT",
"authors": [
{
"name": "Maurice Renck",
"email": "maurice.renck@konzentrik.de"
}
],
"autoload": {
"psr-4": {
"konzentrik\\Sociabli\\": "lib/"
},
"classmap": [
"lib"
]
},
"config": {
"optimize-autoloader": true,
"allow-plugins": {
"getkirby/composer-installer": true
}
},
"require": {
"php": ">=8.2.0",
"getkirby/composer-installer": "^1.2"
},
"scripts": {
"test": "vendor/bin/phpunit --testdox --colors=always",
"build-test-package": "git archive HEAD -o sociabli.zip --worktree-attributes",
"build-composer": "composer install --no-dev --optimize-autoloader",
"build-release": [
"composer install --no-dev --optimize-autoloader"
]
}
}
68 changes: 68 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace konzentrik\Sociabli;

use Kirby\Cms\App as Kirby;

@include_once __DIR__ . '/vendor/autoload.php';

Kirby::plugin('konzentrik/sociabli', [
'hooks' => require_once __DIR__ . '/plugin/hooks.php',
]);
Empty file added lib/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "sociabli",
"version": "1.0.0",
"description": "The sociabli plugin for Kirby",
"main": "index.js",
"author": {
"name": "Maurice Renck",
"email": "maurice.renck@konzentrik.de"
},
"private": true,
"scripts": {
"dev": "npx -y kirbyup serve src/index.js",
"build": "npx -y kirbyup src/index.js"
},
"posthtml": {
"recognizeSelfClosing": true
},
"dependencies": {
"semver": "^7.6.3"
},
"devDependencies": {
"@ambimax/semantic-release-composer": "github:ambimax/semantic-release-composer",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1"
}
}
Loading

0 comments on commit bf2cde9

Please sign in to comment.