Kirby Secrets - Rewritten

github.com/jenstornell/kirby-secrets

Tricks for Kirby CMS.

It can be anything useful, but often tiny bits of code to help out with a small problem. A complement to the docs.

Why this repo was created

In some cases I search for something that I’ve used many times before, that are tricky to find again. It can be a forum question or something on Github.

To save myself some time I created this repo. Maybe someone else can find it useful as well.

Code as issues

The code is put as issues to make it go fast to add them.

Not much here yet, but you are welcome to fill it up if you have something to add

7 Likes

I think the structure of this repository has really been improved: https://github.com/jenstornell/kirby-secrets

I also changed the name to Kirby Secrets.

1 Like

Quick question: wouldn’t a Github Wiki be more suitable for the structure ?

3 Likes

Thanks! I think I will move them there. :slight_smile:

Update:

I’ve moved everything to the Wiki, worked really well: https://github.com/jenstornell/kirby-secrets/wiki

1 Like

you could add the wiki homepage as repo homepage :wink:

How? I could not find that in the docs.

go to your repo and there should be an “edit” button

Alright. By going home I still start at the code tab but I guess that part could not be changed.

Kirby Secrets is getting larger

New “advanced” docs

Everything should be yet undocumented things that are not at getkirby.com/docs.

1 Like

I’ve made some major changes to the Kirby Secrets Wiki.

  • I’ve gone through about 1.2K of my own posts in this forum to see what I could find.
  • I added about 20-30 new posts about my findings.
  • The posts are split up more like a big archive similar to the Kirby cheatsheet.
  • Some clever Gulp work made it possible to use kirby-secrets as base instead of kirby-secrets/wiki.

@texnixe You can snag anything you want for the official docs, if you find anything you like. :slight_smile:

Hey Jens, the partial cache link returns a 404…

Thanks! It was a typo. I fixed it and here is the working url: https://github.com/jenstornell/kirby-secrets/wiki/Partial-cache

Kirby Secrets is still evolving. I now have a changelog to keep track on what is happening.

2017-03-14

2017-03-10

2017-03-08

2017-02-28

2 Likes

I want to know how I can download e.g. the text of the (later) “readme.md” from https://github.com/jenstornell/kirby-secrets/wiki/Boiler-readme on a Windows client, where I don’t have admin rights, so there is no chance to install something like GitHub or “Google Desktop”?

I know I can copy the plain text from the rendered wiki page and add the format by my fingers, but may be there is another way…

Thanks for your Kirby Secrets and may be an answer.

HeinerEF

I plan to add it as a file as well, maybe instead. I did not see this issue right away. Maybe will fix it tomorrow.

Thanks for report.

Don’t hurry, I don’t need this file in the next days. I had this question for myself today, so I asked.
Thank you very much!

Good luck finding more Kirby secrets, which are not on https://getkirby.com/ and it’s docs and in this forum.

HeinerEF

You can add .md at the end of the URL: GitHub - texnixe/kirby-secrets: Unofficial documentation for Kirby CMS. It's is NOT maintained by the Kirby crew.

2 Likes

Thanks to @lukasbestle I think I fixed it in the most simple way possible. Now there are two links in the wiki:

Boiler readme - Preview
Boiler readme - Download

1 Like

Kirby Secrets already have 50 pages. :tada:

github.com/jenstornell/kirby-secrets/wiki/Page-value-manipulation

My latest code is a an example of how to create a new page object and manipulate the page values of that object.

It’s ment for plugin developers. For site creation page models are of better use.

class Test extends Page {
	private $array = array(
		'title' => 'My overwritten title!',
		'text' => 'My overwritten text!',
		'addresses' => 'My overwritten address!'
	);

	function title() {
		return $this->__call('title');
	}

	function __call($key, $arguments = NULL){
		if(array_key_exists($key, $this->array)) {
			return $this->array[$key];
		}
		return parent::{$key}();
	}
}
	
$new = new Test($page->parent(), $page->dirname());

echo $new->title();
echo $new->text();
echo $new->addresses();
1 Like

Thanks you so much. Great secrets so far. I will keep those tips in mind. :slight_smile:

1 Like