A nifty little Kirby widget plugin that allows you to show a block of Kirbytext or Markdown content in Kirby’s panel. It is particularly useful for providing documentation for the website editors.
I should probably provide a more detailed tutorial.
What you need to do is create a new page on the website. In the modal, select “Content Viewer Widget” as the template. Everything else (page name and path) is up to you.
Then, just add content to that page and it will appear in the widget!
I think the problem was that I restricted the available templates to something like this:
pages: true
template:
- mainpage
It did not appear in my list. So in order to get this working I needed remove the restriction, then add the readme page and then add it back again afterwards (ofc. I don’t want my clients to be able to create readme’s ^^).
That would do it. I’ll have to see if I can get Kirby to create the page when the plugin first runs in the background — that would solve this issue. Unfortunately, it may be awhile before I have time to dig into this.
I got a problem with kirbytext when I want to place the kirbytext documentation into the widget.
I basically copy & pasted the markdown of the official documentation. There the kirbytext is escaped by a \ like this:
(\link: http://wikipedia.org text: Wikipedia class: mylink)
However if I do this in my file the backslash \ will be displayed (which might cause confusion for the client) and if I remove the \ then the kirbytext will get parsed and be displayed in html . How can I escape the kirbytext or disable the parser for this very file to display the proper documentation?
I just pushed v1.2.0 of this plugin! Amongst a bunch of other changes, it now creates the page it needs on-demand, hides it from the website users, and provides a handy “edit” button for website administrators.