getpelican/pelican-themes

Current procedure to acquire themes is very inefficient.

Jarmos-san opened this issue · 4 comments

As specified in the "Using Themes" section of the repo, the user has to clone the whole repository which seems redundant IMHO. Downloading a whole bunch of repo amounting to a few 100MB after download doesn't look efficient to me.

Besides, even the instructions in the official documentation appear redundant. If I had to download the themes, the pelican-themes -i path/to/themes willn't work as intended.

So I guess the documentation should at least align its instructions similar to the instructions specified in the README of the repo.

IMO perhaps a more efficient way of doing things without bloating the local repository would be to clone the individual theme & then specifying the path to it in the config file. That way not only are you refraining from downloading a whole bunch of files bloating the local system but it is much easier to follow as well without requiring any CLI commands.

Individual repos will happen... eventually (see this comment). It is a matter of resources (people willing to help, time, etc...).

Back to problem at hand. This repository contains a bunch of submodules, which are already repos of their own. So, if your theme-of-choice is one of those, then you don't need a clone of this repo. You can instead clone that directly.

Ignoring submodules (i.e. no --recursive in git clone), size of this repo is smaller (80MB) but still not that small. If you go to the repo and download a ZIP instead of cloning, you'll get a file about 30MB (unpacked to ~40MB) which is much more reasonable. The difference is essentially git duplicating content in the history and it is an (unfortunate) nature of storing binary files in git.

As a side note: Don't use pelican-themes. pelican-themes -i does some dubious things to pelican installation. In fact, we should just deprecate pelican-themes from pelican. It is not needed at all. THEME = '/path/to/theme/folder' works just fine.

Wonderful! Glad to see that work on the underlying issue with this repository is being addressed. So I guess rather than cluttering, I'll close this thread & subscribe to #1488 for future reference.

As for the workaround, it took me a while to figure out that I could just clone my theme of choice directly & appending the THEME = '/path/to/theme/folder' works perfectly. Heck, even the official documentation doesn't state that as a way around.

So I just wanted to give a heads up about it that the documentation can be updated until a solid solution to the problem has been released.

... but it is mentioned in the documentation:

... Can be a relative or absolute path to a theme folder, or the name of a default theme...

Oh, my bad for not clarifying my opinion well enough.

What I meant was to document this way around, officially.

So, if your theme-of-choice is one of those, then you don't need a clone of this repo. You can instead clone that directly.

To rephrase, state it somewhere within the documentation to clone the repository of choice directly & stating the path to it in the configurations using THEME = '/path/to/theme/folder'.

It's convenient from a user's POV & doesn't require them to make assumptions of what will work without any surprises.