Git Product home page Git Product logo

jekyll-spaceship's Introduction

spaceship โ†’~ jekyll
๐Ÿš€ Jekyll Spaceship ๐Ÿš€

Jekyll plugin for Astronauts.

CI Status Gem Version Code Climate Test Coverage License Download Data

Donate (Liberapay) Donate (Patreon) Donate (Ko-fi)

Built with โค๏ธŽ by jeffreytse and contributors

Spaceship is a minimalistic, powerful and extremely customizable Jekyll plugin. It combines everything you may need for convenient work, without unnecessary complications, like a real spaceship.

Jekyll Spaceship Demo

๐Ÿ’ก Tip: I hope you enjoy using this plugin. If you like this project, a little star for it is your way make a clear statement: My work is valued. I would appreciate your support! Thank you!

Table of Contents

Requirements

  • Ruby >= 2.3.0

Installation

Add jekyll-spaceship plugin in your site's Gemfile, and run bundle install.

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

Or you better like to write in one line:

gem 'jekyll-spaceship', group: :jekyll_plugins

Add jekyll-spaceship to the plugins: section in your site's _config.yml.

plugins:
  - jekyll-spaceship

๐Ÿ’ก Tip: Note that GitHub Pages runs in safe mode and only allows a set of whitelisted plugins. To use the gem in GitHub Pages, you need to build locally or use CI (e.g. travis, github workflow) and deploy to your gh-pages branch.

Additions for Unlimited GitHub Pages

  • Here is a GitHub Action named jekyll-deploy-action for Jekyll site deployment conveniently. ๐Ÿ‘
  • Here is a Jekyll site using Travis to build and deploy to GitHub Pages for your references.

Configuration

This plugin runs with the following configuration options by default. Alternative settings for these options can be explicitly specified in the configuration file _config.yml.

# Where things are
jekyll-spaceship:
  # default enabled processors
  processors:
    - table-processor
    - mathjax-processor
    - plantuml-processor
    - mermaid-processor
    - polyfill-processor
    - media-processor
    - emoji-processor
    - element-processor
  mathjax-processor:
    src:
      - https://polyfill.io/v3/polyfill.min.js?features=es6
      - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
    config:
      tex:
        inlineMath:
          - ['$','$']
          - ['\(','\)']
        displayMath:
          - ['$$','$$']
          - ['\[','\]']
      svg:
        fontCache: 'global'
    optimize: # optimization on building stage to check and add mathjax scripts
      enabled: true # value `false` for adding to all pages
      include: []   # include patterns for math expressions checking (regexp)
      exclude: []   # exclude patterns for math expressions checking (regexp)
  plantuml-processor:
    mode: default  # mode value 'pre-fetch' for fetching image at building stage
    css:
      class: plantuml
    syntax:
      code: 'plantuml!'
      custom: ['@startuml', '@enduml']
    src: http://www.plantuml.com/plantuml/svg/
  mermaid-processor:
    mode: default  # mode value 'pre-fetch' for fetching image at building stage
    css:
      class: mermaid
    syntax:
      code: 'mermaid!'
      custom: ['@startmermaid', '@endmermaid']
    config:
      theme: default
    src: https://mermaid.ink/svg/
  media-processor:
    default:
      id: 'media-{id}'
      class: 'media'
      width: '100%'
      height: 350
      frameborder: 0
      style: 'max-width: 600px; outline: none;'
      allow: 'encrypted-media; picture-in-picture'
  emoji-processor:
    css:
      class: emoji
    src: https://github.githubassets.com/images/icons/emoji/

Usage

1. Table Usage

For now, these extended features are provided:

  • Cells spanning multiple columns
  • Cells spanning multiple rows
  • Cells text align separately
  • Table header not required
  • Grouped table header rows or data rows

Noted that GitHub filters out style property, so the example displays with the obsolete align property. But in actual this plugin outputs style property with text-align CSS attribute.

Rowspan and Colspan

^^ in a cell indicates it should be merged with the cell above.
This feature is contributed by pmccloghrylaing.

|              Stage | Direct Products | ATP Yields |
| -----------------: | --------------: | ---------: |
|         Glycolysis |          2 ATP              ||
| ^^                 |          2 NADH |   3--5 ATP |
| Pyruvaye oxidation |          2 NADH |      5 ATP |
|  Citric acid cycle |          2 ATP              ||
| ^^                 |          6 NADH |     15 ATP |
| ^^                 |          2 FADH |      3 ATP |
|                               30--32 ATP        |||

Code above would be parsed as:

Stage Direct Products ATP Yields
Glycolysis 2 ATP
2 NADH 3โ€“5 ATP
Pyruvaye oxidation 2 NADH 5 ATP
Citric acid cycle 2 ATP
6 NADH 15 ATP
2 FADH2 3 ATP
30โ€“32 ATP

Multiline

A backslash at end to join cell contents with the following lines.
This feature is contributed by Lucas-C.

| :    Easy Multiline   : |||
| :----- | :----- | :------ |
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  |
| Apple  | Banana | Orange  |

Code above would be parsed as:

Easy Multiline
Apple
Apple
Apple
Banana
Banana
Banana
Orange
Orange
Orange
Apple
Apple
Banana
Banana
Orange
Orange
Apple Banana Orange

Headerless

Table header can be eliminated.

|--|--|--|--|--|--|--|--|
|โ™œ| |โ™|โ™›|โ™š|โ™|โ™ž|โ™œ|
| |โ™Ÿ|โ™Ÿ|โ™Ÿ| |โ™Ÿ|โ™Ÿ|โ™Ÿ|
|โ™Ÿ| |โ™ž| | | | | |
| |โ™—| | |โ™Ÿ| | | |
| | | | |โ™™| | | |
| | | | | |โ™˜| | |
|โ™™|โ™™|โ™™|โ™™| |โ™™|โ™™|โ™™|
|โ™–|โ™˜|โ™—|โ™•|โ™”| | |โ™–|

Code above would be parsed as:

โ™œ โ™ โ™› โ™š โ™ โ™ž โ™œ
โ™Ÿ โ™Ÿ โ™Ÿ โ™Ÿ โ™Ÿ โ™Ÿ
โ™Ÿ โ™ž
โ™— โ™Ÿ
โ™™
โ™˜
โ™™ โ™™ โ™™ โ™™ โ™™ โ™™ โ™™
โ™– โ™˜ โ™— โ™• โ™” โ™–

Cell Alignment

Markdown table syntax use colons ":" for forcing column alignment.
Therefore, here we also use it for forcing cell alignment.

Table cell can be set alignment separately.

| :        Fruits \|\| Food       : |||
| :--------- | :-------- | :--------  |
| Apple      | : Apple : | Apple      \
| Banana     |   Banana  | Banana     \
| Orange     |   Orange  | Orange     |
| :   Rowspan is 4    : || How's it?  |
|^^    A. Peach         ||   1. Fine :|
|^^    B. Orange        ||^^ 2. Bad   |
|^^    C. Banana        ||  It's OK!  |

Code above would be parsed as:

Fruits || Food
Apple
Banana
Orange
Apple
Banana
Orange
Apple
Banana
Orange
Rowspan is 4
A. Peach
B. Orange
C. Banana
How's it?
1. Fine
2. Bad
It' OK!

Cell Markdown

Sometimes we may need some abundant content (e.g., mathjax, image, video) in Markdown table
Therefore, here we also make markown syntax possible inside a cell.

| :                   MathJax \|\| Image                 : |||
| :------------ | :-------- | :----------------------------- |
| Apple         | : Apple : | Apple                          \
| Banana        | Banana    | Banana                         \
| Orange        | Orange    | Orange                         |
| :     Rowspan is 4     : || :        How's it?           : |
| ^^     A. Peach          ||    1. ![example][cell-image]   |
| ^^     B. Orange         || ^^ 2. $I = \int \rho R^{2} dV$ |
| ^^     C. Banana         || **It's OK!**                   |

[cell-image]: https://jekyllrb.com/img/octojekyll.png "An exemplary image"

Code above would be parsed as:

MathJax || Image
Apple
Banana
Orange
Apple
Banana
Orange
Apple
Banana
Orange
Rowspan is 4
A. Peach
B. Orange
C. Banana
How's it?
It' OK!

Cell Inline Attributes

This feature is very useful for custom cell such as using inline style. (e.g., background, color, font)
The idea and syntax comes from the Maruku package.

Following are some examples of attributes definitions (ALDs) and afterwards comes the syntax explanation:

{:ref-name: #id .cls1 .cls2}
{:second: ref-name #id-of-other title="hallo you"}
{:other: ref-name second}

An ALD line has the following structure:

  • a left brace, optionally preceded by up to three spaces,
  • followed by a colon, the id and another colon,
  • followed by attribute definitions (allowed characters are backslash-escaped closing braces or any character except a not escaped closing brace),
  • followed by a closing brace and optional spaces until the end of the line.

If there is more than one ALD with the same reference name, the attribute definitions of all the ALDs are processed like they are defined in one ALD.

An inline attribute list (IAL) is used to attach attributes to another element.
Here are some examples for span IALs:

{: #id .cls1 .cls2} <!-- #id <=> id="id", .cls1 .cls2 <=> class="cls1 cls2" -->
{: ref-name title="hallo you"}
{: ref-name class='.cls3' .cls4}

Here is an example for custom table cell with IAL:

{:color-style: style="background: black;"}
{:color-style: style="color: white;"}
{:text-style: style="font-weight: 800; text-decoration: underline;"}

|:             Here's an Inline Attribute Lists example                :||||
| ------- | ------------------ | -------------------- | ------------------ |
|:       :|:  <div style="color: red;"> &lt; Normal HTML Block > </div> :|||
| ^^      |   Red    {: .cls style="background: orange" }                |||
| ^^ IALs |   Green  {: #id style="background: green; color: white" }    |||
| ^^      |   Blue   {: style="background: blue; color: white" }         |||
| ^^      |   Black  {: color-style text-style }                         |||

Code above would be parsed as:

IALs

Additionally, here you can learn more details about IALs.

2. MathJax Usage

MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

Some of the main features of MathJax include:

  • High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
  • Supported in most browsers with no plug-ins, extra fonts, or special setup for the reader
  • Easy for authors, flexible for publishers, extensible for developers
  • Supports math accessibility, cut-and-paste interoperability, and other advanced functionality
  • Powerful API for integration with other web applications

2.1 Performance optimization

At building stage, the MathJax engine script will be added by automatically checking whether there is a math expression in the page, this feature can help you improve the page performance on loading speed.

2.2 How to use?

Put your math expression within $...$

$ a * b = c ^ b $
$ 2^{\frac{n-1}{3}} $
$ \int\_a^b f(x)\,dx. $

Code above would be parsed as:

MathJax Expression

3. PlantUML Usage

PlantUML is a component that allows to quickly write:

  • sequence diagram,
  • use case diagram,
  • class diagram,
  • activity diagram,
  • component diagram,
  • state diagram,
  • object diagram

There are two ways to create a diagram in your Jekyll blog page:

```plantuml!
Bob -> Alice : hello world
```

or

@startuml
Bob -> Alice : hello
@enduml

Code above would be parsed as:

PlantUML Diagram

4. Mermaid Usage

Mermaid is a Javascript based diagramming and charting tool. It generates diagrams flowcharts and more, using markdown-inspired text for ease and speed.

It allows to quickly write:

  • flow chart,
  • pie chart,
  • sequence diagram,
  • class diagram,
  • state diagram,
  • entity relationship diagram,
  • user journey,
  • gantt

There are two ways to create a diagram in your Jekyll blog page:

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

or

@startmermaid
pie title Pets adopted by volunteers
  "Dogs" : 386
  "Cats" : 85
  "Rats" : 35
@endmermaid

Code above would be parsed as:

Mermaid Diagram

5. Media Usage

How often did you find yourself googling "How to embed a video/audio in markdown?"

While its not possible to embed a video/audio in markdown, the best and easiest way is to extract a frame from the video/audio. To add videos/audios to your markdown files easier I developped this tool for you, and it will parse the video/audio link inside the image block automatically.

For now, these media links parsing are provided:

  • Youtube
  • Vimeo
  • DailyMotion
  • Spotify
  • SoundCloud
  • General Video ( mp4 | avi | ogg | ogv | webm | 3gp | flv | mov ... )
  • General Audio ( mp3 | wav | ogg | mid | midi | aac | wma ... )

There are two ways to embed a video/audio in your Jekyll blog page:

Inline-style:

![]({media-link})

Reference-style:

![][{reference}]

[{reference}]: {media-link}

For configuring media attributes (e.g, width, height), just adding query string to the link as below:

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY?width=800&height=500)

![](https://www.dailymotion.com/video/x7tfyq3?width=100%&height=400&autoplay=1)

Youtube Usage

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY)

![](//www.youtube.com/watch?v=Ptk_1Dc2iPY?width=800&height=500)

Vimeo Usage

![](https://vimeo.com/263856289)

![](https://vimeo.com/263856289?width=500&height=320)

DailyMotion Usage

![](https://www.dailymotion.com/video/x7tfyq3)

![](https://dai.ly/x7tgcev?width=100%&height=400)

Spotify Usage

![](http://open.spotify.com/track/4Dg5moVCTqxAb7Wr8Dq2T5)

Spotify Podcast Usage

![](https://open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)

SoundCloud Usage

![](https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny)

General Video Usage

![](//www.html5rocks.com/en/tutorials/video/basics/devstories.webm)

![](//techslides.com/demos/sample-videos/small.ogv?allow=autoplay)

![](//techslides.com/demos/sample-videos/small.mp4?width=400)

General Audio Usage

![](//www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3)

![](//www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3?autoplay=1&loop=1)

6. Hybrid HTML with Markdown

As markdown is not only a lightweight markup language with plain-text-formatting syntax, but also an easy-to-read and easy-to-write plain text format, so writing a hybrid HTML with markdown is an awesome choice.

It's easy to write markdown inside HTML:

<script type="text/markdown">
# Hybrid HTML with Markdown is a not bad choice ^\_^

## Table Usage

| :        Fruits \|\| Food       : |||
| :--------- | :-------- | :--------  |
| Apple      | : Apple : | Apple      \
| Banana     |   Banana  | Banana     \
| Orange     |   Orange  | Orange     |
| :   Rowspan is 4    : || How's it?  |
|^^    A. Peach         ||   1. Fine :|
|^^    B. Orange        ||^^ 2. Bad   |
|^^    C. Banana        ||  It's OK!  |

## PlantUML Usage

@startuml
Bob -> Alice : hello
@enduml

## Video Usage

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY)
</script>

7. Markdown Polyfill

It allows us to polyfill features for extending markdown syntax.

For now, these polyfill features are provided:

  • Escape ordered list

7.1 Escape Ordered List

A backslash at begin to escape the ordered list.

Normal:

1. List item Apple.
3. List item Banana.
10. List item Cafe.

Escaped:

\1. List item Apple.
\3. List item Banana.
\10. List item Cafe.

Code above would be parsed as:

Normal:

1. List item Apple.
2. List item Banana.
3. List item Cafe.

Escaped:

1. List item Apple.
3. List item Banana.
10. List item Cafe.

8. Emoji Usage

GitHub-flavored emoji images and names would allow emojifying content such as: it's raining ๐Ÿฑs and ๐Ÿถs!

Noted that emoji images are served from the GitHub.com CDN, with a base URL of https://github.githubassets.com, which results in emoji image URLs like https://github.githubassets.com/images/icons/emoji/unicode/1f604.png.

In any page or post, use emoji as you would normally, e.g.

I give this plugin two :+1:!

Code above would be parsed as:

I give this plugin two ๐Ÿ‘!

8.1 Emoji Customizing

If you'd like to serve emoji images locally, or use a custom emoji source, you can specify so in your _config.yml file:

jekyll-spaceship:
  emoji-processor:
    src: "/assets/images/emoji"

See the Gemoji documentation for generating image files.

9. Modifying Element Usage

It allows us to modify elements via CSS3 selectors. Through it you can easily modify the attributes of an element tag, replace the children nodes and so on, it's very flexible, but here is example usage for modifying a document:

# Here is a comprehensive example
jekyll-spaceship:
  element-processor:
    css:
      - a: '<h1>Test</h1>'                     # Replace all `a` tags (String Style)
      - ['a.link1', 'a.link2']:                # Replace all `a.link1`, `a.link2` tags (Hash Style)
          name: img                            # Replace element tag name
          props:                               # Replace element properties
            title: Good image                  # Add a title attribute
            src: ['(^.*$)', '\0?a=123']        # Add query string to src attribute by regex pattern
            style:                             # Add style attribute (Hash Style)
              color: red
              font-size: '1.2em'
          children:                            # Add children to the element
            -                                  # First empty for adding after the last child node
            - "<span>Google</span>"            # First child node (String Style)
            -                                  # Middle empty for wrapping the children nodes
            - name: span                       # Second child node (Hash Style)
              props:
                prop1: "1"                     # Custom property1
                prop2: "2"                     # Custom property2
                prop3: "3"                     # Custom property3
              children:                        # Add nested chidren nodes
                - "<span>Jekyll</span>"        # First child node (String Style)
                - name: span                   # Second child node (Hash Style)
                  props:                       # Add attributes to child node (Hash Style)
                    prop1: "a"
                    prop2: "b"
                    prop3: "c"
                  children: "<b>Yap!</b>"      # Add children nodes (String Style)
            -                                  # Last empty for adding before the first child node
      - a.link: '<a href="//t.com">Link</a>'   # Replace all `a.link` tags (String Style)
      - 'h1#title':                            # Replace `h1#title` tags (Hash Style)
          children: I'm a title!               # Replace inner html to new text

Example 1

Automatically adds a target="_blank" rel="noopener noreferrer" attribute to all external links in Jekyll's content.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:
            class: ['(^.*$)', '\0 ext-link']   # Add `ext-link` to class by regex pattern
            target: _blank                     # Replace `target` value to `_blank`
            rel: noopener noreferrer           # Replace `rel` value to `noopener noreferrer`

Example 2

Automatically adds loading="lazy" to img and iframe tags to natively load lazily. Browser support is growing. If a browser does not support the loading attribute, it will load the resource just like it would normally.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:                               #
            loading: lazy                      # Replace `loading` value to `lazy`

In case you want to prevent loading some images/iframes lazily, add loading="eager" to their tags. This might be useful to prevent flickering of images during navigation (e.g. the site's logo).

See the following examples to prevent lazy loading.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:                               #
            loading: eager                     # Replace `loading` value to `eager`

There are three options when using this method to lazy load images. Here are the supported values for the loading attribute:

  • auto: Default lazy-loading behavior of the browser, which is the same as not including the attribute.
  • lazy: Defer loading of the resource until it reaches a calculated distance from the viewport.
  • eager: Load the resource immediately, regardless of where itโ€™s located on the page.

Credits

  • Jekyll - A blog-aware static site generator in Ruby.
  • MultiMarkdown - Lightweight markup processor to produce HTML, LaTeX, and more.
  • markdown-it-multimd-table - Multimarkdown table syntax plugin for markdown-it markdown parser.
  • jmoji - GitHub-flavored emoji plugin for Jekyll.
  • jekyll-target-blank - Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.
  • jekyll-loading-lazy - Automatically adds loading="lazy" to img and iframe tags to natively load lazily.
  • mermaid - Generation of diagram and flowchart from text in a similar manner as markdown.

Contributing

Issues and Pull Requests are greatly appreciated. If you've never contributed to an open source project before I'm more than happy to walk you through how to create a pull request.

You can start by opening an issue describing the problem that you're looking to resolve and we'll go from there.

License

This software is licensed under the MIT license ยฉ JeffreyTse.

jekyll-spaceship's People

Contributors

arefeena avatar irlabs avatar jeffreytse avatar ptorru avatar willflet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jekyll-spaceship's Issues

Using jekyll-spaceship kills Liquid

I can't use many characters in Liquid epressions, for example, I'm trying
{% assign x = 100 %} {% assign x = x | divided_by 3 %}

And I got
Liquid Warning: Liquid syntax error (line 13): Unexpected character \ in "{{x | divided\_by 3 }}" in test.md

The same situation with ": {% assign t = "a,c,b" | split "," %} gives
Liquid Warning: Liquid syntax error (line 15): Unexpected character \ in "{{\"a,c,b\" | split \",\" }}" in test.md

TableProcessor not escaping special chars within code tags

Hello

Just wanted to report an issue with the TableProcessor not automatically escaping special characters like angled brackets when within a table cell. By default, Kramdown should be escaping these specials chars as per [1].

Example markdown:

Not in table: `<Mail Gateway>`

In table:

Decision Point | Design Decision
--- | ---
Authoritative DNS MX Record | `<Mail Gateway>`

Output:

Screen Shot 2020-10-07 at 3 40 06 pm

Thanks
Michael

[1] https://kramdown.gettalong.org/syntax.html#automatic-and-manual-escaping

0.9.8 version has error in emoji-processor

I tried your another project named 'jekyll-deploy-action'.
I got some error in the process of the workflow running.
But I noticed that jekyll-spaceship version was different between github (0.9.8) and local machine (0.9.7).
So I updated jekyll-spaceship to 0.9.8 version on my local windows 10 machine too.

Now I got the same error on the local machine too.

Can I use the 0.9.8 version ?
( There was no problem when I was using 0.9.7 version at today morning..)

ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
Configuration file: D:/repository/honggaruy.github.io/_config.yml
  Jekyll Spaceship: ๐Ÿš€ Jekyll-Spaceship 0.9.8
  Jekyll Spaceship: ๐ŸŽ‰ A Jekyll plugin to provide powerful supports.
  Jekyll Spaceship: ๐Ÿ‘‰ https://github.com/jeffreytse/jekyll-spaceship
  Jekyll Spaceship: ๐Ÿ—‚  use table-processor
  Jekyll Spaceship: ๐Ÿ—‚  use mathjax-processor
  Jekyll Spaceship: ๐Ÿ—‚  use plantuml-processor
  Jekyll Spaceship: ๐Ÿ—‚  use mermaid-processor
  Jekyll Spaceship: ๐Ÿ—‚  use polyfill-processor
  Jekyll Spaceship: ๐Ÿ—‚  use media-processor
  Jekyll Spaceship: ๐Ÿ—‚  use emoji-processor
  Jekyll Spaceship: ๐Ÿ—‚  use element-processor
            Source: D:/repository/honggaruy.github.io
       Destination: D:/repository/honggaruy.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
  Jekyll Spaceship: [TableProcessor] _posts/2020/2020-04-28-todays-ideas.md
  Jekyll Spaceship: [TableProcessor] _posts/2020/2020-06-04-todays-ideas.md
  Jekyll Spaceship: [TableProcessor] _posts/2020/2020-11-23-week-48th.md
  Jekyll Spaceship: [TableProcessor] _posts/2020/2020-12-07-week-50th.md
  Jekyll Spaceship: [EmojiProcessor] _posts/2020/2020-12-28-week-53th.md
  Jekyll Spaceship: [TableProcessor] _posts/2021/2021-01-01-week-01th.md
  Jekyll Spaceship: [MediaProcessor] _posts/2021/2021-01-18-week-03th.md
  Jekyll Spaceship: [MediaProcessor] _posts/2021/2021-02-01-week-05th.md
  Jekyll Spaceship: [EmojiProcessor] _wiki/vim-folding.md
  Jekyll Spaceship: [TableProcessor] _wiki/wiki-toc2side.md
  Jekyll Spaceship: [TableProcessor] _wiki/css-meaning.md
  Jekyll Spaceship: [EmojiProcessor] _wiki/sed-problem-solving.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/sed-problem-solving.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/Git-Category.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/apps-script-starter.md
  Jekyll Spaceship: [TableProcessor] _wiki/windows-terminal-config.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/Windows-Sysinternals.md
  Jekyll Spaceship: [TableProcessor] _wiki/book-developer-writing.md
  Jekyll Spaceship: [TableProcessor] _wiki/book-how-javascript-works.md
  Jekyll Spaceship: [TableProcessor] _wiki/re2-translation.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/re2-translation.md
  Jekyll Spaceship: [TableProcessor] _wiki/book-refactoring-2nd.md
  Jekyll Spaceship: [PolyfillProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [PlantumlProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [MermaidProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [MediaProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [EmojiProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [TableProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [MathjaxProcessor] _wiki/wiki-jekyll-spaceship.md
  Jekyll Spaceship: [EmojiProcessor] _wiki/OpenApi-usage.md
  Jekyll Spaceship: [TableProcessor] _wiki/meet-puppeteer.md
                    ------------------------------------------------
      Jekyll 4.1.1   Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
Traceback (most recent call last):
        35: from C:/tools/ruby27/bin/jekyll:23:in `<main>'
        34: from C:/tools/ruby27/bin/jekyll:23:in `load'
        33: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
        32: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        31: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        30: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        29: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        28: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        27: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        26: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        25: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
        24: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        23: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:36:in `process'
        22: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:65:in `build'
        21: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:28:in `process_site'
        20: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:75:in `process'
        19: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/profiler.rb:41:in `profile_process'
        18: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/profiler.rb:41:in `each'
        17: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/profiler.rb:43:in `block in profile_process'
        16: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:208:in `render'
        15: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `render_pages'
        14: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `each'
        13: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:524:in `block in render_pages'        
        12: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/site.rb:533:in `render_regenerated'
        11: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/page.rb:181:in `trigger_hooks'
        10: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `trigger'
         9: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `each'
         8: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:99:in `block in trigger'
         7: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:42:in `block in hook'
         6: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
         5: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
         4: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
         3: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
         2: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/processor.rb:132:in `dispatch'
         1: from C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/emoji-processor.rb:19:in `on_handle_html'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/emoji-processor.rb:43:in `emoji_filter': undefined method `css' for nil:NilClass (NoMethodError)

Markdown Table Formatter

Hi, Thank you for distributing the amazing gem !

I want to ask you one question.

When I save or use Markdown Table Formatter, it always format like the classic a markdown table.

Here is the sample:

Before Table Formatter:

image

After Table Formatter (Alt+Shift+T)

image

As you can see, the formatter formats my table too correctly.

But I want it to be like this

image

Is it possible to format like the one above?

Thank you !

HTML5 audio not supported problem

I tried to embed .wav file from this link

I used the media-processor like as follows ( General Audio Usage)

![ ](https://www.just-great-software.com/special/JanGoyvaerts.wav)

But this is rendered like this and it shows only this message " Your browser doesn't support ...."

<p>
     <audio id="media-JanGoyvaerts.wav" class="media" src="https://www.just-great-software.com/special/JanGoyvaerts.wav" style="max-width: 600px;outline: none"><p> 
        Your browser doesn't support HTML5 audio. Here is a <a href="https://www.just-great-software.com/special/JanGoyvaerts.wav">link to download the audio</a>instead. </p></audio>
</p>

I became curious whether my Chrome browser (89.0.4389.90 , 64bit) really does not support html 5 audio.
So I tried the following .md file and it was successful. This shows audio controls and didn't show not support message.

<audio controls>
    <source src="https://www.just-great-software.com/special/JanGoyvaerts.wav">
    Sorry,  but your browser doesn't support audio.
</audio>

Can you tell me why they work differently ?

After <head> tag contents moved under the <body> tag , some legacy functions are not working.

Before I apply jekyll-spaceship , I got the following structure of my web page

<!DOCTYPE html>
<html>
   <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
         <title> ... </title>
         .......
         <link rel= "icon" type="image/png" sizes="32x32" href="/resources/icon/favicon-32x32.png">
         ......
         <script type="text/javascript" async="" src="https://cse.google.com/cse.js?cx=....."></script>
         ...... 
         <some chrome extension style tags>
    <head>

   < body> 
       <header> ... </header>
       <div id="home-search">
           <script  for google custom search >
           < googles custom search results are displayed here. >
       </div>
       <footer> ...</footer>
       .....
   </body>

After I apply jekyll-spacship, the structure of my web page changed like this.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitionall//EN .....>
<head> 
       <some chrome extension style tags>
</head>
<html>  
   < body> 
       <div>
           <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title> ... </title>
             .......
            <link rel= "icon" type="image/png" sizes="32x32" href="/resources/icon/favicon-32x32.png">
             ......
            <script type="text/javascript" async="" src="https://cse.google.com/cse.js?cx=....."></script>
             ......         
            <header> ... </header>
            <div id="home-search">
                    <script  for google custom search >
                    < google custom search result is empty>
            </div>
             <footer> ...</footer>
              .....
      </div>
   </body>

My original <head> tag has favicon and google custom search functions and worked well without jekyll-spaceship
Afte I install jekyll-spaceship , the position of favicon and google custom search have been moved under the <body> tag and they do not work anymore.

Do you have any solution for this ?

Bug: When using {:target="_blank"} in the first link of the cell it is applied to <td>, not <a> as expexted

Markdown

| Sample table | |
| --------------|----------------------------|
| Item 1        | [Google](https://google.com){:target="_blank"}  |
| ^^            | ^^ [Yahoo](https://yahoo.com){:target="_blank"}  |

Genarated HTML

<table>
  <thead>
    <tr>
      <th>Sample table</th>
      <th> </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="2">Item 1
        <br>
      </td>
      <td target="_blank" rowspan="2">
        <a href="https://google.com">Google</a>
        <br>
        <a href="https://yahoo.com" target="_blank">Yahoo</a>
      </td>
    </tr>
    <tr>
    </tr>
  </tbody>
</table>

Check this in the code:

<td target="_blank" rowspan="2">

If I remove {:target="_blank"} from the first link the target="_blank" disappears from <td>

table

Mermaid Diagrams with Extra Lines Sometimes Broken

When designing diagrams I leave extra lines in so that it easier for me to see what happens.
For example:

flowchart
  A([Test 1]) --> D{Request}
  B([Test 2]) --> D
  C([Test 3]) --> D

  D -->|Do Something| E[/Use Something/]
  D -->|Do Another Thing| F[/Request Something/]
  
  E --> G{Check}
  F --> G
  
  G -->|Valid| H{Does Some<Br>Other Thing<br>Have To Happen?}
  G -->|Invalid| X1
  
  H -->|Yes| I[/Do The Other Thing/]
  H -->|No| J

  I -->|Valid| J{What Happens Next?}
  I -->|Invalid| X2

  J -->|Option 1| K([Send To Option 1])
  J -->|Option 2| L{Check with<br>Option 2<br>if possible}

  L -->|Valid| M([Send To Option 2])
  L -->|Invalid| X3

  X1([Deny Access])
  X2([Deny Access])
  X3([Deny Access])

  classDef green fill:#59E817,stroke:#333,stroke-width:2px;
  classDef orange fill:#FDD017,stroke:#333,stroke-width:2px;
  classDef yellow fill:#FFF380,stroke:#333,stroke-width:2px;
  classDef red fill:#F75D59,stroke:#333,stroke-width:2px;

  class X1 red
  class X2 red
  class X3 red

  class D yellow
  class G yellow
  class H yellow
  class J yellow
  class L yellow

  class K green
  class M green

Using the live editor this works fine:
https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZmxvd2NoYXJ0XG4gIEEoW1Rlc3QgMV0pIC0tPiBEe1JlcXVlc3R9XG4gIEIoW1Rlc3QgMl0pIC0tPiBEXG4gIEMoW1Rlc3QgM10pIC0tPiBEXG5cbiAgRCAtLT58RG8gU29tZXRoaW5nfCBFWy9Vc2UgU29tZXRoaW5nL11cbiAgRCAtLT58RG8gQW5vdGhlciBUaGluZ3wgRlsvUmVxdWVzdCBTb21ldGhpbmcvXVxuICBcbiAgRSAtLT4gR3tDaGVja31cbiAgRiAtLT4gR1xuICBcbiAgRyAtLT58VmFsaWR8IEh7RG9lcyBTb21lPEJyPk90aGVyIFRoaW5nPGJyPkhhdmUgVG8gSGFwcGVuP31cbiAgRyAtLT58SW52YWxpZHwgWDFcbiAgXG4gIEggLS0-fFllc3wgSVsvRG8gVGhlIE90aGVyIFRoaW5nL11cbiAgSCAtLT58Tm98IEpcblxuICBJIC0tPnxWYWxpZHwgSntXaGF0IEhhcHBlbnMgTmV4dD99XG4gIEkgLS0-fEludmFsaWR8IFgyXG5cbiAgSiAtLT58T3B0aW9uIDF8IEsoW1NlbmQgVG8gT3B0aW9uIDFdKVxuICBKIC0tPnxPcHRpb24gMnwgTHtDaGVjayB3aXRoPGJyPk9wdGlvbiAyPGJyPmlmIHBvc3NpYmxlfVxuXG4gIEwgLS0-fFZhbGlkfCBNKFtTZW5kIFRvIE9wdGlvbiAyXSlcbiAgTCAtLT58SW52YWxpZHwgWDNcblxuICBYMShbRGVueSBBY2Nlc3NdKVxuICBYMihbRGVueSBBY2Nlc3NdKVxuICBYMyhbRGVueSBBY2Nlc3NdKVxuXG4gIGNsYXNzRGVmIGdyZWVuIGZpbGw6IzU5RTgxNyxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O1xuICBjbGFzc0RlZiBvcmFuZ2UgZmlsbDojRkREMDE3LHN0cm9rZTojMzMzLHN0cm9rZS13aWR0aDoycHg7XG4gIGNsYXNzRGVmIHllbGxvdyBmaWxsOiNGRkYzODAsc3Ryb2tlOiMzMzMsc3Ryb2tlLXdpZHRoOjJweDtcbiAgY2xhc3NEZWYgcmVkIGZpbGw6I0Y3NUQ1OSxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O1xuXG4gIGNsYXNzIFgxIHJlZFxuICBjbGFzcyBYMiByZWRcbiAgY2xhc3MgWDMgcmVkXG5cbiAgY2xhc3MgRCB5ZWxsb3dcbiAgY2xhc3MgRyB5ZWxsb3dcbiAgY2xhc3MgSCB5ZWxsb3dcbiAgY2xhc3MgSiB5ZWxsb3dcbiAgY2xhc3MgTCB5ZWxsb3dcblxuICBjbGFzcyBLIGdyZWVuXG4gIGNsYXNzIE0gZ3JlZW4iLCJtZXJtYWlkIjp7fSwidXBkYXRlRWRpdG9yIjpmYWxzZX0

When using the plugin it appears the extra lines are removed which then ends up combing lines together.
In the above example the plugin returns the following (invalid) image:
https://mermaid.ink/svg/eyJjb2RlIjoiZmxvd2NoYXJ0XG5BKFtUZXN0IDFdKSAtLT4gRHtSZXF1ZXN0fVxuQihbVGVzdCAyXSkgLS0-IERcbkMoW1Rlc3QgM10pIC0tPiBERCAtLT58RG8gU29tZXRoaW5nfCBFWy9Vc2UgU29tZXRoaW5nL11cbkQgLS0-fERvIEFub3RoZXIgVGhpbmd8IEZbL1JlcXVlc3QgU29tZXRoaW5nL11cbkUgLS0-IEd7Q2hlY2t9XG5GIC0tPiBHXG5HIC0tPnxWYWxpZHwgSHtEb2VzIFNvbWU8QnI-T3RoZXIgVGhpbmc8YnI-SGF2ZSBUbyBIYXBwZW4_fVxuRyAtLT58SW52YWxpZHwgWDFcbkggLS0-fFllc3wgSVsvRG8gVGhlIE90aGVyIFRoaW5nL11cbkggLS0-fE5vfCBKSSAtLT58VmFsaWR8IEp7V2hhdCBIYXBwZW5zIE5leHQ_fVxuSSAtLT58SW52YWxpZHwgWDJKIC0tPnxPcHRpb24gMXwgSyhbU2VuZCBUbyBPcHRpb24gMV0pXG5KIC0tPnxPcHRpb24gMnwgTHtDaGVjayB3aXRoPGJyPk9wdGlvbiAyPGJyPmlmIHBvc3NpYmxlfUwgLS0-fFZhbGlkfCBNKFtTZW5kIFRvIE9wdGlvbiAyXSlcbkwgLS0-fEludmFsaWR8IFgzWDEoW0RlbnkgQWNjZXNzXSlcblgyKFtEZW55IEFjY2Vzc10pXG5YMyhbRGVueSBBY2Nlc3NdKWNsYXNzRGVmIGdyZWVuIGZpbGw6IzU5RTgxNyxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O1xuY2xhc3NEZWYgb3JhbmdlIGZpbGw6I0ZERDAxNyxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O1xuY2xhc3NEZWYgeWVsbG93IGZpbGw6I0ZGRjM4MCxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O1xuY2xhc3NEZWYgcmVkIGZpbGw6I0Y3NUQ1OSxzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6MnB4O2NsYXNzIFgxIHJlZFxuY2xhc3MgWDIgcmVkXG5jbGFzcyBYMyByZWRjbGFzcyBEIHllbGxvd1xuY2xhc3MgRyB5ZWxsb3dcbmNsYXNzIEggeWVsbG93XG5jbGFzcyBKIHllbGxvd1xuY2xhc3MgTCB5ZWxsb3djbGFzcyBLIGdyZWVuXG5jbGFzcyBNIGdyZWVuIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0

After running through a base64 decode and stripping just the mermaid code from the json you get the following (I have replaced \n with new lines):

flowchart
A([Test 1]) --> D{Request}
B([Test 2]) --> D
C([Test 3]) --> DD -->|Do Something| E[/Use Something/]
D -->|Do Another Thing| F[/Request Something/]
E --> G{Check}
F --> G
G -->|Valid| H{Does Some<Br>Other Thing<br>Have To Happen?}
G -->|Invalid| X1
H -->|Yes| I[/Do The Other Thing/]
H -->|No| JI -->|Valid| J{What Happens Next?}
I -->|Invalid| X2J -->|Option 1| K([Send To Option 1])
J -->|Option 2| L{Check with<br>Option 2<br>if possible}L -->|Valid| M([Send To Option 2])
L -->|Invalid| X3X1([Deny Access])
X2([Deny Access])
X3([Deny Access])classDef green fill:#59E817,stroke:#333,stroke-width:2px;
classDef orange fill:#FDD017,stroke:#333,stroke-width:2px;
classDef yellow fill:#FFF380,stroke:#333,stroke-width:2px;
classDef red fill:#F75D59,stroke:#333,stroke-width:2px;class X1 red
class X2 red
class X3 redclass D yellow
class G yellow
class H yellow
class J yellow
class L yellowclass K green
class M green

As you can see for example there are several lines that have been combined with other lines (line 4,5,13,14,16 etc as examples)

This can easily be fixed by having no blank lines or (in my case) adding %%- in place of the blank lines.

I apologise as I would look to change the code myself but I have no Ruby experience.
At the very least the issue is here for if anyone else is having issues with the following error:
Jekyll Spaceship: [MermaidProcessor] invalid encoded code

relative url doesn't work with video tag

Hi @jeffreytse ,

First of all, thanks for creating this awesome plugin. Love the features it provides.

Recently when trying to use the video tag to play one of my local video files using relative_url, it seems not recognizing the video, instead it's rendered as a normal image tag as result.

I'm using the following syntax: ![]( {{ "/assets/images/2015/12/2015-12-13-wu-biao-t2/1.mp4" | relative_url }} ).

Could you please check if it's reproducible on you end? Please share if there's any workaround.

Thanks in advance.

The table-processor processes pipes (|) that are outside tables

I found a tiny bug - if I have a pipe | somewhere in my text that's not in a table, the text is still seemingly processed by the table-processor.

For example, compare this output without jekyll-spaceship:

image

to this output with jekyll-spaceship:

image

The problem seems to happen regardless of whether or not I surround my | with liquid raw tags. Here is the code I'm using. Note that without jekyll-spaceship I don't need the raw tags, but they don't hinder either. With jekyll-spaceship, I get the same results (depicted above) regardless of whether or not I specify raw.

Tips:
* Use pipes {% raw %}(`|`){% endraw %} to delineate columns, and dashes to delineate the header row from the rest of the table.
* Spacing doesn't matter to the markdown processor, any extra white space is removed, but it can really help with readability.
The two markdown examples below both create this table.

Weird inline Mathjax processing

Hi, I am not familiar with Mathjax syntax.
But i think this is weird.

* A safe integer is an integer that
  * can be exactly represented as an IEEE-754 double precision number, and
  * whose IEEE-75 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation
* For example, $ 2 ^ {53} - 1 $ is a safe integer,

image

The above case has no problem where the Mathjax line is the last li node.
But if I add one more li node , it rendered like this; The Mathjax part is not processed.

* A safe integer is an integer that
  * can be exactly represented as an IEEE-754 double precision number, and
  * whose IEEE-75 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation
* For example, $ 2 ^ {53} - 1 $ is a safe integer,
  * it can be exactly represented 

image

I want to show one more case.
If I add few more lines and I ended it with Mathjax line like this, it shows no problem again.

* A safe integer is an integer that
  * can be exactly represented as an IEEE-754 double precision number, and
  * whose IEEE-75 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation
* For example, $ 2 ^ {53} - 1 $ is a safe integer,
  * it can be exactly represented 
  * no other integer rounds to it under any IEEE-754 rounding mode.
* In contrast, $ 2 ^ {53} $ is not a safe integer.

image

But if i add strong tag to the not word in the last line, the Mathjax processor not working again as follows.

* A safe integer is an integer that
  * can be exactly represented as an IEEE-754 double precision number, and
  * whose IEEE-75 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation
* For example, $ 2 ^ {53} - 1 $ is a safe integer,
  * it can be exactly represented 
  * no other integer rounds to it under any IEEE-754 rounding mode.
* In contrast, $ 2 ^ {53} $ is **not** a safe integer.

image

Can you tell me what is the problem ?

undefined local variable crashes when fetch_img_data fails

I'm seeing some bugs in error handling when we have failures fetch_img_data in the MermaidProcessor.

Reproduction case

  • misconfigure the mermaid-process to trigger http errors. In _config.yaml:
plugins:
  - jekyll-spaceship

jekyll-spaceship:
  mermaid-processor:
    mode: "pre-fetch"
    src: "http://does-not-exist/svg/"
  • add two pages, one with a mermaid diagram
  • run jekyll build

Expected behavior: we log a "Failed to open TCP connection to does-not-exist" error and continue processing the other file

Actual behavior: we catch the "Failed to open..." error and then throw an unhandled error trying to log, which crashes jekyll:

/usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:215:in `rescue in fetch_img_data': undefined local variable or method `logger' for Jekyll::Spaceship::MermaidProcessor:Class (NameError)
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:203:in `fetch_img_data'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:70:in `handle_mermaid'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:56:in `block in handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `scan'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:39:in `block in on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:118:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:48:in `block in hook'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:99:in `block in trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/page.rb:181:in `trigger_hooks'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/renderer.rb:61:in `run'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:532:in `render_regenerated'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:524:in `block in render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:208:in `render'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:80:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:28:in `process_site'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:65:in `build'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:36:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
   from /usr/gem/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
   from /usr/local/bundle/bin/jekyll:29:in `load'
   from /usr/local/bundle/bin/jekyll:29:in `<main>'
/usr/local/lib/ruby/2.7.0/net/http.rb:960:in `initialize': Failed to open TCP connection to does-not-exist:80 (getaddrinfo: Name does not resolve) (SocketError)
   from /usr/local/lib/ruby/2.7.0/net/http.rb:960:in `open'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
   from /usr/local/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
   from /usr/local/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:958:in `connect'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:932:in `start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:606:in `start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:481:in `get_response'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:205:in `fetch_img_data'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:70:in `handle_mermaid'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:56:in `block in handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `scan'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:39:in `block in on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:118:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:48:in `block in hook'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:99:in `block in trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/page.rb:181:in `trigger_hooks'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/renderer.rb:61:in `run'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:532:in `render_regenerated'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:524:in `block in render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:208:in `render'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:80:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:28:in `process_site'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:65:in `build'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:36:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
   from /usr/gem/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
   from /usr/local/bundle/bin/jekyll:29:in `load'
   from /usr/local/bundle/bin/jekyll:29:in `<main>'
/usr/local/lib/ruby/2.7.0/net/http.rb:960:in `initialize': getaddrinfo: Name does not resolve (SocketError)
   from /usr/local/lib/ruby/2.7.0/net/http.rb:960:in `open'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
   from /usr/local/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
   from /usr/local/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:958:in `connect'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:932:in `start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:606:in `start'
   from /usr/local/lib/ruby/2.7.0/net/http.rb:481:in `get_response'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:205:in `fetch_img_data'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:70:in `handle_mermaid'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:56:in `block in handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `scan'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:47:in `handle_mermaid_block'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:39:in `block in on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/processors/mermaid-processor.rb:38:in `on_handle_markdown'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/processor.rb:118:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
   from /usr/gem/gems/jekyll-spaceship-0.9.5/lib/jekyll-spaceship/cores/manager.rb:48:in `block in hook'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:99:in `block in trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:98:in `trigger'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/page.rb:181:in `trigger_hooks'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/renderer.rb:61:in `run'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:532:in `render_regenerated'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:524:in `block in render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:523:in `render_pages'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:208:in `render'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:80:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:28:in `process_site'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:65:in `build'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:36:in `process'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
   from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
   from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
   from /usr/gem/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
   from /usr/local/bundle/bin/jekyll:29:in `load'
   from /usr/local/bundle/bin/jekyll:29:in `<main>'

Analysis

The error is thrown from

I'm not very familiar with ruby OO, but it seems like the base class's initialize to set the logger

@logger = Logger.new(self.name)
is somehow not taking effect in sub-classes like MermaidProcessor?

Or maybe the way we call fetch_img_data inside MermaidProcessor is somehow changing the context and losing a reference to the logger?

data = self.class.fetch_img_data(url)

Is the mathjax configuration hard-coded?

Hi,

the plugin is just great, thank you very much for the good work. I am not sure if this is the correct place to ask, I hope it is.

I am quite new to jekyll and ruby in particular, but I have more experience with another SSG and programming languages.

I added jekyll-spaceship, because it was the easiest way to add mathjax support to a project based on jekyll to which I just started contributing. Also, the additional functionality might come handy soon enough. However, I would like to configure mathjax options beyond the default ones.

I added a section in _config.yml with the additional settings, however they are not included in the generated code. Just for testing I tried to override one of the default settings, but the generated code still used the default values.

By looking at the code, I think the configuration script for mathjax is hardcoded, although I might be wrong, considering I am not that familiar with ruby.

I am currently using version 0.9.2 of the plugin.

This is the section I added to _config.yml (to enable equation numbering)

jekyll-spaceship:
  mathjax-processor:
    config:
      tex:
        tags: 'ams'

So, is it possible to configure MathJax at all? If so, what is the correct way to do it?

Thanks you very much

Link within angle brackets was corrupted by table rowspan `^^`

Added two urls within angle brackets to make them as links. It works fine at a normal single cell. While it cannot be turned successfully for a url after the ^^ symbol. Here is the test case:

| **Windows Application**                                                   ||
| -------------------- | --------------------------------------------------- |
| Application / Softs  | Download links / Webpages                           |
| jekyll-spaceship     | <https://github.com/jeffreytse/jekyll-spaceship>    |
| ^^                   | ^^ <https://github.com/jeffreytse/jekyll-spaceship> |

The second url can not be turned into a hyperlink.

image

Feature request: Media processor for Youtube-nocookie

Hello ๐Ÿ˜„

I was setting up a Jekyll site using Jekyll-spaceship's media processor for Youtube links.
While doing so i did some research on Youtube and cookies with GDPR and learned that you can embed videos using a nocookie youtube url. Read more on Youtube support

The url looks like this: https://www.youtube-nocookie.com/embed/iik25wqIuFo

Creating a link like this: results in an iframe using the normal base url: https://www.youtube.com/embed/ and not https://www.youtube-nocookie.com/embed/.

I think this feature could be created simply by adding a new media processor in media-processor.rb for the nookie option.

Thanks

Colspan feature is not working

I tried a couple of different examples and I could not get the colspan feature to work. I know the plugin is installed correctly because both the multiline and rowspan features work.

Here is an example I tried:

| :    Easy Multiline   : |||
| :----- | :----- | :------ |
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  |
| Apple  | Banana | Orange  |

Which renders

image

jekyll spaceship breaks the jekyll build --config flag

    def self.load(filename = '_config.yml')
      config = deep_merge(
        { CONFIG_NAME => DEFAULT_CONFIG },
        YAML.load_file(File.expand_path(filename))
      )[CONFIG_NAME]
      @@store = config
      self.use_processors(config)
    end

from https://github.com/jeffreytse/jekyll-spaceship/blob/master/lib/jekyll-spaceship/cores/config.rb

the filename variable should equate to the --config flag value passed through from jekyll build

$ bundle exec jekyll build --config _configprod.yml --destination ./dist --trace
Configuration file: /mnt/c/git/fta-kb/_configprod.yml
  Jekyll Spaceship: ๐Ÿš€ Jekyll-Spaceship 0.7.0
  Jekyll Spaceship: ๐ŸŽ‰ A Jekyll plugin to provide powerful supports.
  Jekyll Spaceship: ๐Ÿ‘‰ https://github.com/jeffreytse/jekyll-spaceship
Traceback (most recent call last):
        27: from /usr/local/bin/jekyll:23:in `<main>'
        26: from /usr/local/bin/jekyll:23:in `load'
        25: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>'
        24: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        23: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        22: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        21: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        20: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        19: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        18: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        17: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each'
        16: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'  
        15: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:30:in `process'
        14: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:30:in `new'
        13: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:34:in `initialize'
        12: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:124:in `setup'
        11: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/plugin_manager.rb:22:in `conscientious_require'
        10: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/plugin_manager.rb:30:in `require_gems'
         9: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
         8: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:57:in `each'
         7: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail' 
         6: from /var/lib/gems/2.5.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:60:in `require'
         5: from /var/lib/gems/2.5.0/gems/jekyll-spaceship-0.7.0/lib/jekyll-spaceship.rb:9:in `<top (required)>'
         4: from /var/lib/gems/2.5.0/gems/jekyll-spaceship-0.7.0/lib/jekyll-spaceship.rb:11:in `<module:Spaceship>'       
         3: from /var/lib/gems/2.5.0/gems/jekyll-spaceship-0.7.0/lib/jekyll-spaceship/cores/config.rb:44:in `load'        
         2: from /usr/lib/ruby/2.5.0/psych.rb:497:in `load_file'
         1: from /usr/lib/ruby/2.5.0/psych.rb:497:in `open'
/usr/lib/ruby/2.5.0/psych.rb:497:in `initialize': No such file or directory @ rb_sysopen - /mnt/c/git/fta-kb/_config.yml (Errno::ENOENT)

Mathjax matrix not registering newlines

Hi, not sure if this is a jeykll-spaceship bug or other...

$\begin{bmatrix}a & b \\ c & d\end{bmatrix}$

That should give 2 rows of matrix, but right now only registering as one big row. I think it is because something is interfering with the \.

image

Replace `\0' in code block to exclusion

Hi, I have some problem to convert cpp code block

I want to convert code block as below

Trie* find(const char* key) {
    if (*key == '\0') return this;
    int idx = *key - 'A';
    if (!next[idx]) return NULL;
    return next[idx]->find(key + 1);
}

void insert(const char* key) {
    if (*key == '\0') finish = true;
    else {
        int idx = *key - 'A';
        if (!next[idx])
            next[idx] = new Trie();
        next[idx]->insert(key + 1);
}

but, result is not I expected
image

Not all md files are treated

Hello,

first of all a really nice plugin, table processing is really useful!

I am not sure if my request is a bug or a feature, I would like to share with you my experience. I have configured the table in my project and in the build log, the following files appear to be treated:

  Jekyll Spaceship: [TableProcessor] _pages/about.md
  Jekyll Spaceship: [TableProcessor] _pages/withprocessor.md

But I have other collections containing other files that are not treated at all. Is there a way to indicate which folder should be treated and which one should not?

Request: Easy way to set CSS for table cells, such as Kramdown Inline Attribute Lists

It would be really awesome if there was a way to tag table cell content to tell it to use a certain CSS class for formatting. For example, to do things like set the cell background and/or colour/font/font-size, etc. This is something I can do outside tables with a IAL tags (described here https://kramdown.gettalong.org/syntax.html#block-ials), for example.

When I tried it with IAL tags (code below), I see that {: th} text in the output. So it's like it's failing to be parsed a-la Kramdown. I'm not hugely surprised by this because Kramdown doesn't support it in the tables either.

I tried a couple other ideas as well such as setting an HTML span inline, but I couldn't accomplish my goal. What I'm trying to do is have a header "column" for a table that has merged column cells.

| ---                             | ---                        | ---    |
| my merged cell  {: .th}         | o                          | row 1 content |
| ^^                              | Shift + o                  | row 2 content |
| ^^                              | Alt + o                    | row 3 content |

Results:
image

Note that when you look at the HTML for the resulting table, the first column of the first row has my merged cell. The first column of the second and third row are Shift+o and Alt+o, respectively. This means I can't just use CSS to target the first column of my table. Because I'd get shading on the middle column in rows 2 and 3. (Hopefully that makes sense.)

I hope you don't mind the feature request. I wish I had the Ruby skills to help you out with a PR.

Keep up the great work on this project!

table processor destroys a div table rendering

An example is better than long words, I have attached the jekyll project demonstrating the bug.

In this about.md, I include a jekyll component '_includes/team.html' which generating some div Table. If you deactivate the table processor in '_config.yml', everything is fine if you reactivate it you will see the rendering is corrupt.
testspaceship.zip

Error: undefined method `match?' for "tableprocessor":String

When using ruby 2.3.8 environment, get the following error:

$ bundle exec jekyll build

Configuration file: /home/travis/build/jekyll/jekyll-blog/_config.yml
  Jekyll Spaceship: Jekyll-Spaceship 0.2.1
  Jekyll Spaceship: A Jekyll plugin to provide powerful supports.
  Jekyll Spaceship: https://github.com/jeffreytse/jekyll-spaceship
jekyll 3.8.5 | Error:  undefined method `match?' for "tableprocessor":String
Did you mean?  match

The command "bundle exec jekyll build" exited with 1.

Markdown Jekyll-minimal issue

HI, I am using 'jekyll-theme-minimal' and Just installed this awesome gem, jekyll-spaceship.

I installed the gem into my config and gem document, and this gem so great !

But, when I created the table, it just break my jekyll layout which I haven't expected.

image

The layout shout be like the below,

The navigation menu and the contents area should be deployed separately. Also, the size of all contents in git page should be automatically resized following the size of the window.

image

If you have any idea or suggestions, it would be so grateful !

Thank you

Best regards,

NoMethodError: undefined method `config' for nil:NilClass (NoMethodError)

Hello there,

I faced this issue when serving:

/usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship/cores/config.rb:54:in `site_config': undefined method `config' for nil:NilClass (NoMethodError)

Some of my system information:

Ruby: ruby 2.6.4p104 (2019-08-28 revision 67798)
OS: Mac OS X 10.15.1

Link within angle brackets was corrupted by table colspan `||`

Added two urls within angle brackets to make them as links. It works fine at a normal single cell. While it cannot be turned successfully for a url before the || colspan symbol. Here is the test case:

| Row 4      | <https://www.google.com>    |                              |
|^^          |^^ <https://www.youtube.com> |                              |
| Row 5      | <https://www.google.com>                                  ||

The third url can not be turned into a hyperlink.

image

Can't use brackets in table cells

I am trying to put a footnote in a table cell, but it doesn't seem to be working with Jekyll Spaceship.

Example:
Input:

| Header|
|--|
|Words[^1]|

[^1]: Footnote

Output without Jekyll Spaceship::
table

Output with Jekyll Spaceship::
table1

interactive mermaid diagrams don't work

Repro

  • create a blank jekyll site configured with jekyll-spaceship

  • make a markdown page like this:

    ---
    title: mermaid demo
    ---
    ```mermaid!
    graph TD
      a[jekyll-spaceship]
      click a "https://github.com/jeffreytse/jekyll-spaceship" "view on github"
    ```
    
  • run jekyll build

Expected behavior

Clicking the "jekyll-spaceship" node in the rendered graph navigates to https://github.com/jeffreytse/jekyll-spaceship

Actual behavior

Nothing

Analysis

mermaid-processor.rb gets the SVG from mermaid and renders it in an <img> tag. That tag does not support interactivity.

If we render it with an <object> tag, then the interactive elements in SVG work.

I think the relevant spot to change is here:

"<img class=\"#{css_class}\" src=\"#{url}\">"

Some image links were hijacked to dailymotion

I used a same template to generate image galleries in my site pages.
Most works fine. While I found out MediaProcessor of jekyll-spaceship was invoked accidently and the image links were hijacked to dailymotion.

image

I can not find out the bug point. So I post the pages and their sources built in my site here.

The page built correctly: https://longlovemyu.tk/vod-golden-age/
and its source: https://raw.githubusercontent.com/longavailable/longavailable.github.io/master/myCollections/_separate-pages/view-of-delft-01-golden-age.md

The page was wrongly built: https://longlovemyu.tk/vod-dl/
and its source: https://raw.githubusercontent.com/longavailable/longavailable.github.io/master/myCollections/_separate-pages/view-of-delft-04-daily-life.md

I think it was caused by jekyll-spaceship. Because I saw the following logs when I checked locally. Only one of the webpages used a template invoked MediaProcessor unexpectedly.

image

The invoked includes is located at https://raw.githubusercontent.com/longavailable/longavailable.github.io/master/_includes/image-gallery.html .

lightbox.js:
https://raw.githubusercontent.com/longavailable/longavailable.github.io/master/js/lightbox.js.

Problem with python code in liquid tags

There is a problem when rendering python code where lines end in a colon (:) and are in a {% highlight %} block. The text is no longer rendered as code in this case.

Media Processor: undefined method `match' for nil:NilClass (NoMethodError)

Today I updated jekyll-spaceship from 0.9.2 to 0.9.8. Unfortunately, now my site doesn't compile. Tried with 0.9.7, but the same thing happens.

EDIT: Last working version is 0.9.3.

gem list nokogiri

*** LOCAL GEMS ***

nokogiri (1.11.2 x86_64-darwin, 1.10.10)

Error log:

Traceback (most recent call last):
        54: from /usr/local/opt/[email protected]/bin/bundle:23:in `<main>'
        53: from /usr/local/opt/[email protected]/bin/bundle:23:in `load'
        52: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
        51: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
        50: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
        49: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
        48: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
        47: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
        46: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
        45: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        44: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        43: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
        42: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
        41: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
        40: from /usr/local/Cellar/[email protected]/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
        39: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `<top (required)>'
        38: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `load'
        37: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/exe/jekyll:15:in `<top (required)>'
        36: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        35: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        34: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        33: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        32: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        31: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        30: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        29: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `each'
        28: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        27: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:36:in `process'
        26: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:65:in `build'
        25: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:28:in `process_site'
        24: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:80:in `process'
        23: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:210:in `render'
        22: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:530:in `render_docs'
        21: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:530:in `each_value'
        20: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:531:in `block in render_docs'
        19: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:531:in `each'
        18: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:532:in `block (2 levels) in render_docs'
        17: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:548:in `render_regenerated'
        16: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/document.rb:392:in `trigger_hooks'
        15: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:102:in `trigger'
        14: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:102:in `each'
        13: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:103:in `block in trigger'
        12: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:42:in `block in hook'
        11: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
        10: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
         9: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
         8: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
         7: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/processor.rb:132:in `dispatch'
         6: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:26:in `on_handle_html'
         5: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:238:in `each'
         4: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:238:in `upto'
         3: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:239:in `block in each'
         2: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:27:in `block in on_handle_html'
         1: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:42:in `handle_normal_audio'
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:131:in `handle_media': undefined method `match' for nil:NilClass (NoMethodError)

bundle install, if needed

Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.1.4
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
Using i18n 1.8.9
Using ruby-enum 0.9.0
Using commonmarker 0.21.2
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.15.0
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using sassc 2.4.0
Using jekyll-sass-converter 2.1.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.4.1
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.1
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.4.0
Using pathutil 0.16.2
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 2.0.0
Using webrick 1.7.0
Using jekyll 4.2.0 from https://github.com/jekyll/jekyll.git (at master@c9c9dc7)
Using jekyll-commonmark 1.3.1
Using jekyll-contentblocks 1.2.0
Using jekyll-include-cache 0.2.1
Using jekyll-redirect-from 0.16.0
Using jekyll-seo-tag 2.7.1
Using jekyll-sitemap 1.4.0
Using mini_portile2 2.5.0
Using racc 1.5.2
Using nokogiri 1.11.2 (x86_64-darwin)
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.8
Using mime-types-data 3.2021.0225
Using mime-types 3.3.1
Using mini_magick 4.11.0
Using objective_elements 1.1.2
Using jekyll_picture_tag 1.14.0
Using liquid-c 4.0.0
Bundle complete! 12 Gemfile dependencies, 49 gems now installed.

Text in paranthesis become interpreted

When no LaTeX is present in a post, anything in paranthesis is fine, but otherwise, it seems to remove all spaces and italicize the contents, as though it were being interpreted as LaTeX.

Screen Shot 2020-05-13 at 3 54 50 AM

Screen Shot 2020-05-13 at 3 55 15 AM

Can anyone else replicate this bug, or is solely on my end?

TableProcessor and asterisks *

Hiya

Just like to report that the TableProcessor is not treating asterisks (*) that appear within table cells the same as native Kramdown (eg when TableProcessor has been disabled). You can see with the following markdown code:

heading 1 | heading 2
--- | ---
one | * item 1
two | \* item 2
three | \\* item 3

Expected outcome (without TableProcessor):

kramdown

With TableProcessor enabled:

tableprocessor

You can see that all rows are different to what they should be when TableProcessor has been disabled.

Running Jekyll 4.2.0 and Jekyll-Spaceship 0.9.7. Let me know if you need any further details.

Thanks

Feature request: enable processors on a per file basis

Hi @jeffreytse ,

I'm wondering if you have considered allowing enabling each processor on a per file basis.

In my use case, sometimes spaceship processed some files I don't want to be processed. For example, it transformed this image link[![w:1100](https://i.imgur.com/bc9HOJU.png)](https://www.youtube.com/watch?v=kCHGDRHZ4eU) into a normal text link (which isn't expected).

Another reason is this might save some build time in my case (currently takes 10+s for my 1k~ files). Since I only need certain processing on some files.

Thanks.

emoji processor touches code block strings

Hi,
I recently changed the emoji plugin from jemoji to jekyll-spaceship.

When i was using jemoji , it didn't touch the emoji string (\:+1\:) in the code block.

* I give this plugin two :+1:!

This action was what I expected.

But , jekyll-spaceship touches the emoji string in the code block too !

  • I give this plugin two ๐Ÿ‘!

The code block string displayed just the same way as above.

Is this a bug ? Did I miss any configuration setting ?

Customize `autoplay` attribute in `video` tag ?

For the media processor, it looks like the autoplay attribute is added with the default configuration. (general video usage)
But, I don't want autoplay sometimes.

According to the answers of this quesition , the presence of autoplay attribute is a shorthand for true.

How can i customize the autoplay attribute in video tag ?

jekyll-spaceship doesn't work both locally and on github pages

Sorry if this is a dumb question, I'm very new to jekyll. I'm afraid I can't use this plugin. I followed exactly by the installation.

Locally, the bundle install was successful:

...
Using github-pages 214
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.8
Using webrick 1.7.0
Bundle complete! 7 Gemfile dependencies, 95 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

But after I add it to the index.md, it isn't displayed properly (also for Mathjax):

<my actual content...>

|              Stage | Direct Products | ATP Yields |
| -----------------: | --------------: | ---------: |
|         Glycolysis |          2 ATP              ||
| ^^                 |          2 NADH |   3--5 ATP |
| Pyruvaye oxidation |          2 NADH |      5 ATP |
|  Citric acid cycle |          2 ATP              ||
| ^^                 |          6 NADH |     15 ATP |
| ^^                 |          2 FADH |      3 ATP |
|                               30--32 ATP        |||


$ 1^2 $

I also use jekyll-deploy-action. It builds successfully once I push new stuffs.

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 --livereload
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.2.0"
# 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", 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-spaceship'

_config.yml

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
#
# If you need help with YAML syntax, here are some quick references for you: 
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

title: Yuchen Zhang
email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
  Yuchen Zhang (Anthony)'s personal website. Here you can find my resume and blogs.
baseurl: "/website" # the subpath of your site, e.g. /blog
url: "https://anthonyive.github.io" # the base hostname & protocol for your site, e.g. http://example.com
linkedin_username: anthonyive
github_username:  anthonyive

author: Yuchen Zhang

copyright: "Yuchen Zhang"

# Build settings
# theme: minima
plugins:
  - jekyll-feed
  - jekyll-spaceship

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
#   - .sass-cache/
#   - .jekyll-cache/
#   - gemfiles/
#   - Gemfile
#   - Gemfile.lock
#   - node_modules/
#   - vendor/bundle/
#   - vendor/cache/
#   - vendor/gems/
#   - vendor/ruby/



Can we override any processor?

For the media processor, I will love to be able to choose the thumbnail (poster) of the video (local videos), but with the default configuration, and since the generated html for videos is an iframe, this is not possible.

Can we override the processors?, How should i do it?.

Thanks for the answer!

MathJax processor ignores files with only `$$` (display notation) and text when optimization is enabled

As the title says, when running the server with the latest version of the plugin (0.9.6) with default configs (optimize has enable: true for mathjax), the MathJax processor is only called on files which have either only mathjax display notation (text between pairs of $$) and no text or have the inline notation (pairs of $).

When using $$ and regular text or without $ in that same post, nothing happens.

Below are some screenshots of examples. Setting enable: false in the optimize config for MathJax seems to solve the issue.

The repository is available here.

Screenshot_2020-12-04 Testing math
Screenshot_2020-12-04 Using only the display notation (no text) works
Screenshot_2020-12-04 Testing math 2

Bug: Tables row can have links or images, but not both

I noticed that when I try to add a link to the same table row as an image, that both disappear.

For example, consider this simple table:

[cell-image]: https://jekyllrb.com/img/octojekyll.png "An exemplary image"

| Heading                           | Column 1      | Column 2                           |
|-----------------------------------|---------------|------------------------------------|
| Row 1                             | Apple         | Orange                             |
| Row 2 (merged)                    | Blueberry     | Strawberry                         |
| ^^                                | Plum          | Raspberry ![example][cell-image]   |

image
(Screen capture trimmed so this post isn't super long).

The above displays as expected. And if I modify the last line to remove the image and add a link to Plum like this:

| ^^                                | [Plum](https://example.com) | Raspberry                          |

I see the link, no problem.
image

But when I add both the link to Plum and the image beside Raspberry, neither appear:

| ^^                                | [Plum](https://example.com) | Raspberry ![example][cell-image]   |

image

I made a little project to show you what I mean (attached zip_bug_both_images_and_links_spaceship.zip). My screen captures above are from this zipped up project. The changes are all on the main page.

Error with permalink file extension

Hello,
Thank you for the great plugin !

I've noticed that Jekyll builds no longer works when I use permalinks in the YAML front matter with filetype extension other than .htm or .html.

For example, if I do:

---
permalink: /test.php
----

I get the following error:

" Error: undefined method `css?' for #<Jekyll::Spaceship::TableProcessor:0x000056253cdc1150>"

jekyll (4.1.1)
jekyll-spaceship (0.8.4)

Error: undefined method `filter' for [:pre_render, :post_render]:Array

When I enable jekyll-spaceship in the _config.yml plugins I get the following error

$ jekyll serve
Configuration file: /Users/dzlab/Projects/dzlab/dltips/_config.yml
  Jekyll Spaceship: Jekyll-Spaceship 0.2.0
  Jekyll Spaceship: A Jekyll plugin to provide powerful supports.
  Jekyll Spaceship: https://github.com/jeffreytse/jekyll-spaceship
  Jekyll Spaceship: use table-processor
jekyll 3.8.6 | Error:  undefined method `filter' for [:pre_render, :post_render]:Array

Any clues?

Posts not being processed by MathJax

I have the following posts in my _posts/ folder:

-rw-r--r-- 1 alvaro alvaro 43783 oct  9 12:29 2020-10-01-configuracion-raid-5.markdown
-rw-r--r-- 1 alvaro alvaro 33636 oct  9 12:28 2020-10-02-almacenamiento-con-rclone.markdown
-rw-r--r-- 1 alvaro alvaro 25568 oct 17 20:15 2020-10-03-instalacion-debian-10.markdown
-rw-r--r-- 1 alvaro alvaro 73700 oct 17 11:39 2020-10-10-servidor-dhcp-con-nat.markdown
-rw-r--r-- 1 alvaro alvaro 38531 oct 15 13:50 2020-10-11-cifrado-asimetrico-gpg-openssl.markdown
-rw-r--r-- 1 alvaro alvaro 39324 oct 17 20:18 2020-10-17-instalacion-automatica-pxe.markdown
-rw-r--r-- 1 alvaro alvaro 21051 oct 17 19:07 2020-10-17-virtualhosting-con-apache.markdown

So when I run the bundle exec jekyll serve command, the output from Jekyll Spaceship only shows that it has processed 4 of them all (the first 3 posts are not shown up):

  Jekyll Spaceship: [MathjaxProcessor] _posts/2020-10-10-servidor-dhcp-con-nat.markdown
  Jekyll Spaceship: [MathjaxProcessor] _posts/2020-10-11-cifrado-asimetrico-gpg-openssl.markdown
  Jekyll Spaceship: [MathjaxProcessor] _posts/2020-10-17-instalacion-automatica-pxe.markdown
  Jekyll Spaceship: [MathjaxProcessor] _posts/2020-10-17-virtualhosting-con-apache.markdown

Anyways, although they are not being shown, they are still accessible in the generated site. This is really not an important issue, but it has drawn my attention that 3 of my posts are not being processed by MathjaxProcessor but still accessible in the final generated site.

I have been looking deeply in the code and I can't find any math expression that should use MathJax for processing in any of the posts.

Here you have my GitHub repository with the website code, in case you need it. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.