[Bug]: Cannot find "jekyll-theme-primer" stylesheet to import when running 'jekyll build' command.
hwhsu1231 opened this issue · comments
Describe the issue
Recently, I've been studying Jekyll, and trying to use jekyll build
command to generate an HTML documentation for GoogleTest locally. However, there is an error occurred:
Error: Can't find stylesheet to import.
╷
1 │ @import "jekyll-theme-primer";
│ ^^^^^^^^^^^^^^^^^^^^^
╵
Even though I already runned gem install jekyll-theme-primer
to install jekyll-theme-primer
, the error still exists.
C:\Users\hwhsu1231>gem install jekyll-theme-primer
Successfully installed jekyll-theme-primer-0.6.0
Parsing documentation for jekyll-theme-primer-0.6.0
Done installing documentation for jekyll-theme-primer after 0 seconds
1 gem installed
What happened? What did I miss?
Steps to reproduce the problem
-
Install Ruby and Jekyll following the instructions:
ridk install 3 gem install jekyll bundler gem update --system 3.4.22
-
Git clone GoogleTest repo and run
jekyll build
command:git clone https://github.com/google/googletest.git cd googletest cd docs jekyll build --trace
See the following logs for details:
- LOG-1-rdik-install.txt
- LOG-2-gem-install-jekyll-and-bundler.txt
- LOG-3-git-clone-and-jekyll-build.txt
What version of GoogleTest are you using?
What operating system and version are you using?
Windows 11
What compiler and version are you using?
None
What build system are you using?
None
Additional context
- Ruby version:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]
- Jekyll version:
jekyll 4.3.2
- Bundler version:
Bundler version 2.4.22
- jekyll-theme-primer:
0.6.0
We use Jekyll for our documentation, but are not Jekyll experts and don't offer support for Jekyll issues.
I think I found a solution to this issue. Mainly do the following changes:
- modify
docs/_config.toml
- add
docs/Gemfile
- add
docs/Gemfile.lock
And all we need to do to build and preview GoogleTest Documentation locally is:
- Change Directory to
docs/
- Run Command:
bundle install
- Run Command:
bundle exec jekyll serve
- Open Server address in Browser: http://127.0.0.1:4000
Can I submit a PR to solve this issue?