Skip to content
Permalink
Browse files
Update docs
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 20, 2017
1 parent a7b40e5 commit ac73f541edeaeb9553cb1b643f5343393f0bf622
Showing with 18 additions and 6 deletions.
  1. +8 −3 README.md
  2. +9 −3 scripts/test_themes.py
  3. +1 −0 v7/material-theme/engine
@@ -1,12 +1,17 @@
This repo contains the publicly available themes for Nikola (https://getnikola.com/)
This repo contains the publicly available themes for Nikola (<https://getnikola.com/>)

To contribute a theme:

* Make sure it works well for you
* Start a branch that puts your theme "foo" in vX/foo
* Run ``scripts/test_themes.py foo`` and see if it complains of anything
* Make sure you have a ``README.md`` (written in markdown) in your theme
* Make sure you have a ``README.md`` (written in Markdown), a ``.theme`` meta
file, and ``parent``/``engine`` files in your theme
* Double check licenses for everyhing in your theme
* Do a PR
* Make a Pull Request

After a brief discussion it will be merged and available for everyone :-)

See also: [Creating a Theme](https://getnikola.com/creating-a-theme.html),
[Theming reference](https://getnikola.com/theming.html), [Template
variables](https://getnikola.com/template-variables.html).
@@ -9,13 +9,16 @@
import os
import sys

import colorama

from nikola import utils


def error(msg):
print(colorama.Fore.RED + "ERROR:" + msg)
print("\x1b[31;1mERROR:", msg)


def warning(msg):
print("\x1b[33;1mWARNING:", msg)


def theme_list():
@@ -66,6 +69,10 @@ def sanity_check(theme=None):
if utils.get_asset_path('README.md', themes) is None:
error("theme '{0}' has no README.md".format(theme))

# Ensure the theme has a meta file
if utils.get_asset_path(theme + '.theme', themes) is None:
warning("theme '{0}' has no {0}.theme meta file".format(theme))


def is_asset_duplicated(path, themes):
# First get the path for the asset with whole theme chain
@@ -91,7 +98,6 @@ def is_asset_duplicated(path, themes):
)

if __name__ == "__main__":
colorama.init()
if len(sys.argv) == 1:
sanity_check()
else:
@@ -0,0 +1 @@
jinja

0 comments on commit ac73f54

Please sign in to comment.