Skip to content

Commit

Permalink
[DOC] added plugin_info for getkirby-plugins.com and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeyerstedt committed Jul 13, 2015
1 parent 591d9e0 commit abe4862
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
47 changes: 47 additions & 0 deletions PLUGIN_INFO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Introduction
This kirbytag returns a beatiful download-link for a specific file in your site´s content. It generates a link with a customizable text and dispays the filesize.

That´s nothing special, but come some features for lazy people:
You can choose your file, by the file categorization kirby uses (document, image, etc.) and the select by first or last. If you have a file, like a regularly updating flyer, you can keep going on with individual file names, but don´t have to specify the name in the tag eveny time you change your file! Isn´t this awesome?


#### installation
store this file in

site/tags/

#### usage
Now you have a new kitbytext extension for download-links.
The syntax is quite simple:

(download: $keyword type: $filetype ext: $extension text: $someLinkText)

First thing to replace is `$keyword`. You can choose from:

- "first": selects the first file
- "last": selects the last file
- or you can type some filename

Next we want to specify which files are affected. This is done with replacing `$filetype`. You can choose from the kirby file selectors:

- "document"
- "code"
- "images"
- "videos"

To condense the selection further down, you can replace `$extension` and type a filename extension.

With the `text` attribute (replace `$someLinkText`) you can set a custom text which is displayed instead of the filename.

##### keep in mind:
Of course the pattern above is only an example and not working by copying it. If some placeholder (the things with `$` at the beginning) is not replaced, you have to delete the keyword infront of it too.

##### examples:

(download: first type: document)
(download: flyer.pdf text: our beautiful products)


## contribution
Feel free to fork this repository an make it better.
Perhaps we can implement the viewport width feature in some way.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ by Jannik Beyerstedt from Hamburg, Germany


## return a beautiful download link for specific/ first/ last file
This is an extension of kirbytext for the [kirby cms](getkirby.com), which adds an easy way to embed your self-hosted html5-video sources in a responsive layout. This means, you can use it responsive, or it´ll adapt to your layout anyway.
This kirbytag returns a beatiful download-link for a specific file in your site´s content. It generates a link with a customizable text and dispays the filesize.

I know that there are some other solutions out there, but I´m lazy, so this is the version for the lazy people.

This extension can handle mp4 (h.264), webm and HTTP-live-streaming sources as well as a poster. You can select, which versions you have.
Another special feature is, that the videos are stored in a special folder to keen bug data in one place.
That´s nothing special, but come some features for lazy people:
You can choose your file, by the file categorization kirby uses (document, image, etc.) and the select by first or last. If you have a file, like a regularly updating flyer, you can keep going on with individual file names, but don´t have to specify the name in the tag eveny time you change your file! Isn´t this awesome?

#### note:
This is only tested with kirby 2!


#### how to use
#### installation
store this file in

site/tags/

#### usage
Now you have a new kitbytext extension for download-links.
The syntax is quite simple:

Expand Down

0 comments on commit abe4862

Please sign in to comment.