d3p1 / jekyll-theme-codify

A Jekyll theme from a developer to developers
MIT License
0 stars 0 forks source link

Init #1

Open d3p1 opened 1 year ago

d3p1 commented 1 year ago

Description

Create a custom Jekyll theme based on one of the greatest Jekyll theme templates: Chirpy Jekyll Theme.

Solution

Implement a Jekyll theme using the Chirpy Jekyll Theme as its parent. Check if it is possible to create a Jekyll theme, using the bundle exec jekyll new-theme jekyll-theme-codify command, that has as its dependencies the jekyll-theme-chirpy and extends from it configuring it in the theme options of the _config.yml file. If there is a problem with the above procedure, it will be necessary to fork/copy the Chirpy Jekyll Theme repository and customize its files directly (instead of using an override method as it would be possible with the above method). After the required modifications to create a custom Look&Feel, publish the theme gem.

Additional information

d3p1 commented 1 year ago

At the current moment (commit 89f4eb91533334248c9a1b2bd07171c95b2132c4), it was build and push a jekyll-theme-codify gem. This theme was developed based on the idea of extend the jekyll-theme-chirpy theme. In this way, was defined the jekyll-theme-chirpy as a runtime dependency of the theme.

Then, it was tried to install this theme in a site. It was used the d3p1/jekyll:nginx-alpine3.18 image and it was run the following command:

bundle add jekyll-theme-chirpy

After that, was removed the minimal theme from the Gemfile:

- gem "minima", "~> 2.5"

And it was added the jekyll-theme-codify as the theme in the _config.yml file:

- theme: minima
+ theme: jekyll-theme-codify

Finally, it was run:

bundle install

But when it was run:

/main.docker-entrypoint.sh bundle exec jekyll build --config _config.yml,_config.dev.yml

The following error was dispatched:

Theme Config file: /home/jekyll/.config/ruby/bundle/gems/jekyll-theme-codify-0.0.0/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-theme-chirpy or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the jekyll-theme-chirpy gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- jekyll-theme-chirpy' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

So, it seems that it is not possible to develop a Jekyll theme that extends from other Jekyll theme. The development will be continued using the jekyll-theme-chirpy source code directly

d3p1 commented 1 year ago

Following the last comment, it was also added to the gem a _config.yml that extends the jekyll-theme-chirpy but, after trying to install the theme in a site using the process mentioned in the last comment, the same error occurs.