Skip to content

Commit 2f395f6

Browse files
Update themes.md
1 parent 26de700 commit 2f395f6

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

recipes/jekyll/themes.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,26 @@ See [Specification](https://ruby-doc.org/stdlib-2.7.0/libdoc/rubygems/rdoc/Gem/S
99

1010
### Gemspec
1111

12-
- The `*.gemspec` file is used to package the theme as gem.
13-
- Here are ways to add required dependencies. These are not actually installed when you install the gem, but the theme will give an error to say they are missing (at least this is the way it works with Remote Theme.
14-
```ruby
15-
spec.add_runtime_dependency 'example'
16-
spec.add_runtime_dependency 'example', '~> 1.1', '>= 1.1.4'
17-
18-
spec.add_dependency 'example' # alias for add_runtime_dependency
19-
20-
spec.add_development_dependency 'example'
21-
```
12+
- The `*.gemspec` file is used to package the theme as gem.
13+
- Required dependencies
14+
- Here are ways to add required dependencies.
15+
```ruby
16+
spec.add_runtime_dependency 'example'
17+
spec.add_runtime_dependency 'example', '~> 1.1', '>= 1.1.4'
18+
19+
spec.add_dependency 'example' # alias for add_runtime_dependency
20+
21+
spec.add_development_dependency 'example'
22+
```
23+
- When using the Remote Theme plugin, it will give an error if the listed depenedencies are missing and will **not** install them.
24+
- But if you add the theme to your site's `Gemfile`, then you can install the theme's dependencies and avoid the error. Even though the theme itself in local gems is not used due to Remote Theme plugin using the remote one on each build.
25+
- If you use explicity approach approach, then you can make your `Gemfile` lighter and let the theme control the gems.this works for a RubyGems theme like `gem 'minima'` or custom theme on GitHub like `gem 'minima', git: 'https://github.com/MichaelCurrin/minima'`.
26+
2227

2328
### Gemfile
2429

2530
- A `Gemfile` is not needed in the theme. If it is included, it is only for testing the project and it is not passed to a downstream project.
26-
- The `gemspec` command in the `Gemfile` will install dependencies from the `*.gemspec` file.
31+
- The `gemspec` command in the `Gemfile` will install dependencies from the `*.gemspec` file when running a Bundle install within the theme.
2732

2833

2934
## Samples

0 commit comments

Comments
 (0)