m.css icon indicating copy to clipboard operation
m.css copied to clipboard

Python theme packaging

Open Serkan-devel opened this issue 6 years ago • 2 comments

This MR should make the pelican theme accessible via pypi.org , where many python packages are hosted already

closes #82

Serkan-devel avatar Mar 31 '19 17:03 Serkan-devel

Codecov Report

Merging #97 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files          21       21           
  Lines        4205     4205           
  Branches       40       40           
=======================================
  Hits         4101     4101           
  Misses        104      104

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 07a027f...fae9ce2. Read the comment docs.

codecov[bot] avatar Mar 31 '19 17:03 codecov[bot]

This seems to be copied from my seafoam Pelican theme. You'll want to change it a little more to be specific to your project requirements.

Also, you may want to check out the project's __init__.py file, which has a short function:

# seafoam/__init__.py
from pathlib import Path

def get_path():
    """
    Shortcut for users whose theme is not next to their pelicanconf.py.
    Returns:
        str: filepath to folder containing theme
    """
    # Theme directory is defined as our parent directory
    return str(Path(__file__).resolve().parent)

This way, in your pelicanconf.py file (for your actual site), you can specifiy the theme like this:

# pelicanconf.py for your generated site
import seafoam

THEME = seafoam.get_path()

minchinweb avatar Apr 30 '20 00:04 minchinweb