Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python theme packaging #97

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Serkan-devel
Copy link

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

closes #82

@codecov
Copy link

codecov bot commented Mar 31, 2019

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.

Comment on lines +17 to +23
'minchin.pelican.plugins.image_process>=1.0.1, !=1.1.2',
'minchin.pelican.jinja_filters',
# requires asset plugin, bundle? -- https://github.com/getpelican/pelican-plugins/tree/master/assets
],
extras_require={
':python_version < "3.4"': ['pathlib2'],
'dev': ['minchin.releaser',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minchin package is your personal stuff, I suppose?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, no that's mine :)

@ashwinvis ashwinvis mentioned this pull request Apr 23, 2020
@MinchinWeb
Copy link

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()

@mosra mosra changed the title [WIP] Python theme packaging Python theme packaging Jan 6, 2022
@mosra mosra marked this pull request as draft January 6, 2022 12:41
@mosra mosra added the needs fermenting Not sure what to do with this yet, give it time. label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs fermenting Not sure what to do with this yet, give it time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing setup.py-files for packaging
4 participants