ElkArte Community

Extending Elk => Custom Themes => Topic started by: Spuds on December 22, 2014, 01:33:19 pm

Title: How to add your theme to the Theme site
Post by: Spuds on December 22, 2014, 01:33:19 pm
Introduction
You finished your theme and now want to add it to the Theme Site (http://themes.elkarte.net), awesome!

To do so you need to make a PR to the elkarte/themes (https://github.com/elkarte/themes/) repo in the gh-pages (https://github.com/elkarte/themes/tree/gh-pages) branch.  The how to fork a repo, make a local copy, apply your changes, and submit the PR are not part of this guide. There are many guides on how to do this and it all depends on what tools you have chosen. This help assumes you know how to make a PR.
A couple of small additions:

To add your theme to the listing, you need to commit just a single file under the _posts directory. The file must follow the naming convention of YYYY-MM-DD-Theme Name. The date should be the initial release date of your theme, that date is only used to create the permalink to the file.

The above file must contain the following sections (see any of the existing files in the _posts directory for examples)
Code: [Select]
---  
front matter 
--- 

detailed description

Front Matter
The front matter is what makes everything cool happen. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines. Meaning the information contained between the --- & --- tags is in YAML format and is specially processed by Jekyll.
What the frig is YAML?, I don't want to learn YAML!, Good neither did I and you don't have either, just follow along.

Example file with front matter
Code: [Select]
---  
layout: post 
title: "Title of your theme" 
category: a category name 
color: dark
date: YYYY-MM-DD 
comments: false 
short: "A short description of your theme" 
license: license 
version: x.x.x 
elkversion: 1.0 
support: valid link or null 
demo: valid link or null 
author: thats you! 
thumbnail: valid link or null 
download: valid link 
images: 
  -Some name: link to it 
  -Another name: link to it 
--- 

Markdown text 

## Installation: 
{% include install_std.MD %} 

## License: 
{% include license.MD param="BSD"%}

Front Matter Details

Two helper templates are provided, one is the generic theme installation instructions and the other is the license block. To use the installation template add
Code: [Select]
## Installation:  
{% include install_std.MD %}
For the license template use the following with a param of
If you use a different license add your own block or make a PR to have it added to license.MD in the _includes directory
Code: [Select]
### License:  
{% include license.MD param="CC BY 4.0"%}
Title: Re: How to add your theme to the Theme site
Post by: emanuele on December 23, 2014, 11:49:16 am
A couple of small additions:
the repository is https://github.com/elkarte/themes/
the files should be added to the gh-pages branch https://github.com/elkarte/themes/tree/gh-pages
O:-)

Thanks @CrimeS for pointing out. :P
Title: Re: How to add your theme to the Theme site
Post by: ahrasis on December 23, 2014, 02:34:08 pm
Clear instructions. So I think addon site is applying something similar in PR. It will update my github and PR later.
Title: Re: How to add your theme to the Theme site
Post by: IchBin on December 25, 2014, 12:01:11 am
Audible Gasp  You are offering untested code to the community in the form of themes and mods? But what about the children!? And the baby seals that are all dying?

Sorry, I had an SMF Customizer relapse there for a second. Can't tell you how long I wanted SMF to get out of the business of approving fudge nuggets on their site...

Awesome to see Elkarte offering this!
Title: Re: How to add your theme to the Theme site
Post by: Bloc on August 19, 2016, 02:42:37 pm
Is this still the working way to add a theme? or has anything changed?
Title: Re: How to add your theme to the Theme site
Post by: emanuele on August 19, 2016, 04:02:28 pm
Yep, nothing has changed so far.
There is code somewhere I put together to push topics to github repositories (so that it would reduce the burden of having to learn a bit of git to get the theme up), but it's not finished... one day it will be. :P
Title: Re: How to add your theme to the Theme site
Post by: Bloc on August 19, 2016, 09:39:20 pm
:) Ok, then.

As far as I can see it all happens in the .md file? It will be fun once I get around to setting that up lol.
Title: Re: How to add your theme to the Theme site
Post by: emanuele on August 20, 2016, 01:15:47 am
Yep, that's everything. :)
Title: Re: How to add your theme to the Theme site
Post by: Spuds on June 29, 2019, 06:26:54 pm
Just a small update ... I've added additional download "buttons" to help distinguish if the theme is for 1.0, or 1.1.  Using the same format as the original post in this thread, the available (and optional) download buttons are:



Title: Re: How to add your theme to the Theme site
Post by: forumsearch0r2 on September 12, 2019, 02:22:00 pm
Most theme previews are 404.
Title: Re: How to add your theme to the Theme site
Post by: Spuds on September 12, 2019, 04:38:26 pm
Yes, mostly because I moved vpn's some time back and never re-setup my themes demo site with 1.1
Title: Re: How to add your theme to the Theme site
Post by: forumsearch0r2 on September 12, 2019, 08:12:08 pm
That makes (a very limited number of) things notably harder. Thank you though.
Title: Re: How to add your theme to the Theme site
Post by: Spuds on September 13, 2019, 04:39:22 pm
I re-enabled my theme site, so now at least the ones that I updated for 1.1 have the demo's available