Giter Club home page Giter Club logo

kirby-today's Introduction

Today tag for Kirby 2

A simple tag for Kirby CMS which lets you output the current day. It's multi-language ready and it has some options.

Installation

Download

Download the files and put them inside the site/plugins/today folder. If the folder doesn't exist, create it.

Note: You can also put today.php into your site/tags folder. I recommend to use the site/plugins folder, because you then can add it as Git Submodule.

With Git

If you are familiar with Git, you can clone this repository from Github to the /site/plugins/today folder.

git clone https://github.com/roylodder/kirby-today.git site/plugins/today

Or you can use it as a Git Submodule.

git submodule add https://github.com/roylodder/kirby-today.git site/plugins/today

Language

If you want this to work you'll need an multi-language instalation. You can use the Langkit of Kirby to get started. Add one or more translations to your files inside the site/language folder. There already are some translations ready to use. Find them in the language folder inside this repository.

Example translation

l::set('monday', 'Monday');
l::set('tuesday', 'Tuesday');
l::set('wednesday', 'Wednesday');
l::set('thursday', 'Thursday');
l::set('friday', 'Friday');
l::set('saterday', 'Saterday');
l::set('sunday', 'Sunday');

How to use it

In your text file you can use it as follows:

Enjoy the rest of your (today:)!

if it's a Monday, then the result is:

Enjoy the rest of your Monday!

Options

You can transform the text to UPPERCASE or lowercase by using the options. The default option will use the exact format of the translation.

Uppercase: (today: upper)

Lowercase: (today: lower)

Default: (today:)

Authors & Contributors

Author: Roy Lodder http://roylodder.com Contributor: Philippe Gervaise https://github.com/malvese

kirby-today's People

Stargazers

André Philip avatar

Watchers

Lee Tengum avatar André Philip avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.