omz13 / kirby3-wellknown

Kirby3 plugin to provide wellknown files (/robots.txt, .well-known/, etc)
12 stars 0 forks source link
kirby3-plugin well-known

Kirby3 WellKnown

Requirement: Kirby 3 (3.0 RC2 or better)

Coffee, Beer, etc.

This started as a simple plugin. The idea was to have a nice way to set some text files that live in the .well-known folder. During development I had endless hours disappearing down the rabbit hole that is the specifications for the different files that could exist there. I have held back and kept this plugin deliberately simple, and hope that you do use it because providing these well-known files is a good thing to do. Under-the-hood it has some complicated code to make this really easy for the user. It also generates /robots.txt because I just needed an excuse to integrate with my omz13/kirby3-xmlsitemap plugin. It also has a built-in blueprint because I wanted to waste hours of time getting this to work (and I'm still not sure why that took me some long: perhaps I have no idea what I am doing and eventually hit on the magic incantation within the code by random luck of hitting the keyboard enough times? Did Bastian fix something in Kirby? Were my MAMP settings wrong? Who cares because it now works and it is really cool. There are now no spelling mistakes in this README now that I have tweaked my code editor (Atom) to spellcheck.

This plugin is free but if you use it in a commercial project to show your support you are welcome to:

Documentation

Purpose

For a kirby3 site, this plugin omz13/wellknown allows easy configuration and provision of well-known and other highly-useful files (viz. robots.txt)

When would you use this plugin?

The functional specification:

Roadmap

The non-binding list of planned features and implementation notes are:

Installation

Pick one of the following per your epistemological model:

Configuration

The following mechanisms can be used to modify the plugin's behavior.

via site/config/config.php

Content fields in content/site.txt (via blueprint blueprint/site.yml)

The plugin uses the following content fields. These are all optional; if missing or empty, they are assumed to be not applicable vis-à-via their indicated functionality.

Blueprints

This plugin provides the following built-in blueprints (e.g. to make adding fields into the panel's blueprint blueprint/site.yml easier):

HeadlineWellKnown:
  type: headline
  label: well-known
  numbered: false

TheWellKnown:
  extends: omz13/wellknown

Hint: If you want to see what is in this blueprint, look in the source code under the blueprints folder.

Use

  1. Configure as above.

  2. Use a web browser or whatever to access the well-known files.

  3. If it works, see Coffee, Beer, etc above

  4. If it doesn't work... file an issue and I will bang my head against the wall while I fix things; or perhaps I'll just sulk, have a cup of really stong coffee, and the got fix thing.

  5. Be amazed how my README are either more funny or less funny with each push to the repo; YMMV.

Debug mode

If the kirby site is in debug mode:

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

BSD-3-Clause