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

Provision for persistent remote themes #95

Open
ashmaroli opened this issue Aug 29, 2021 · 0 comments
Open

Provision for persistent remote themes #95

ashmaroli opened this issue Aug 29, 2021 · 0 comments

Comments

@ashmaroli
Copy link
Contributor

Is your feature request related to a problem? Please describe the problem you're trying to solve.

Currently, a remote-theme is downloaded and discarded for every build session.
This is wasteful when a user runs multiple jekyll build commands; each gap involving a change to an entity that is not going to regenerate with Jekyll's --watch option.
For example, changes to the config file or a local plugin.

Additionally, if a user is requesting for a fixed version of a remote-theme, e.g. owner/name@sha or owner/name@branch, having to spend bandwidth (albeit very little per request) is not ideal.

Describe the solution you'd like

A config setting to explicitly declare consent for persistence (irrespective of remote_theme value pointing to HEAD):

remote_theme_config:
  cache_theme: true
  cache_path: path/to/cache

or

Enable persistence automatically based on the presence of the git_ref component in remote_theme value

Describe alternatives you've considered

  • Resort to installing the gem-version of themes that provide them.
  • Clone theme repositories and add a gemspec file to them when gem-versions are not provided.

Additional context

This could be a welcome option for support teams servicing multiple clients using the same version of a theme

Additional design consideration

  • Configuration to set up global or local caches. (Similar to how npm or yarn packages are managed).
    Global caches could be set up inside user's HOME directory.
    Local caches (per project) could be set up within vendor/cache/ which is already ignored by Jekyll 4.x
  • Configuration to bust caches when desired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant