google / googletest

GoogleTest - Google Testing and Mocking Framework

Home Page:https://google.github.io/googletest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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

  1. Install Ruby and Jekyll following the instructions:

    ridk install
    3
    gem install jekyll bundler
    gem update --system 3.4.22
    
  2. 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:

What version of GoogleTest are you using?

b10fad3

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.

@derekmauro

I think I found a solution to this issue. Mainly do the following changes:

  1. modify docs/_config.toml
  2. add docs/Gemfile
  3. add docs/Gemfile.lock

And all we need to do to build and preview GoogleTest Documentation locally is:

  1. Change Directory to docs/
  2. Run Command: bundle install
  3. Run Command: bundle exec jekyll serve
  4. Open Server address in Browser: http://127.0.0.1:4000

Can I submit a PR to solve this issue?