jeffreytse / jekyll-spaceship

šŸš€ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
605 stars 63 forks source link

Preprocessors do not appear to be loading #79

Closed derailed-dash closed 2 years ago

derailed-dash commented 2 years ago

Apologies. I suspect this is a PICNIC problem, not a bug! I've installed Jekyll-Spaceship, and I can see the plugin loads when my Jekyll container starts. However, I don't see any of the use xxx-preprocessor messages that show in your demo video, and why I try and use processors like mermaid from my markdown, they're not being recognised.

I'm using the jekyll-theme-modernist theme, with GitHub Pages. I've installed the github-pages-unscramble plugin.

Gemfile:

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.9"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 219", group: :jekyll_plugins
# allow (local) use of plugins that aren't on the GitHub whitelist
gem "github-pages-unscramble", "~> 0.1.0", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

gem "webrick", "~> 1.7"
gem 'jekyll-seo-tag'
gem 'jekyll-sitemap'

# Add various processors, like table, mathjax, mermaid
gem 'jekyll-spaceship'

From _config.yml:

# Build settings
theme: jekyll-theme-modernist
#theme: minima
plugins:
  - jekyll-feed
  - jekyll-remote-theme
  - jekyll-seo-tag
  - jekyll-sitemap
  - jekyll-spaceship  

From console on startup:

dazbo-jekyll-aoc  | ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux-musl]
dazbo-jekyll-aoc  | Configuration file: _config.yml
dazbo-jekyll-aoc  | Configuration file: _config.docker.yml
dazbo-jekyll-aoc  | Configuration file: /srv/jekyll/_config.yml
dazbo-jekyll-aoc  |   Jekyll Spaceship: šŸš€ Jekyll-Spaceship 0.10.2
dazbo-jekyll-aoc  |   Jekyll Spaceship: šŸŽ‰ A Jekyll plugin to provide powerful supports.
dazbo-jekyll-aoc  |   Jekyll Spaceship: šŸ‘‰ https://github.com/jeffreytse/jekyll-spaceship
dazbo-jekyll-aoc  |             Source: /srv/jekyll
dazbo-jekyll-aoc  |        Destination: /srv/jekyll/_site
dazbo-jekyll-aoc  |  Incremental build: disabled. Enable with --incremental
dazbo-jekyll-aoc  |       Generating...
dazbo-jekyll-aoc  |        Jekyll Feed: Generating feed for posts

My attempt to test mermaid in a md:

```mermaid!
pie title Pets adopted by volunteers
  "Dogs" : 386
  "Cats" : 85
  "Rats" : 35


A bit of advice would be greatly appreciated!
jeffreytse commented 2 years ago

Hi @derailed-dash

I'd love to help you solve this problem, can you provide me your blog repository for further checking?

Thanks & Regards

derailed-dash commented 2 years ago

Hi @jeffreytse

Thank you so much for taking a look!

I've made the repo public. It's here. And the deployed GitHub Pages site is here.

jeffreytse commented 2 years ago

Hi @derailed-dash

After my checking, you should add jekyll-spaceship to the :jekyll_plugins group:

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-spaceship"
end

or

gem 'jekyll-spaceship', group: :jekyll_plugins

Otherwise, the plugin will not initialize as it will not get the after site initialization event.

Thanks & Regards

derailed-dash commented 2 years ago

You legend! Thank you so much. All working now!

jeffreytse commented 2 years ago

@derailed-dash You're welcome, hope you have a good day! : )