Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spaceship with paginate-v2 #62

Open
KjellMorgenstern opened this issue Oct 16, 2021 · 9 comments
Open

spaceship with paginate-v2 #62

KjellMorgenstern opened this issue Oct 16, 2021 · 9 comments
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@KjellMorgenstern
Copy link
Sponsor

I am using both gems

gem "jekyll-paginate-v2", ">= 3.0"
gem 'jekyll-spaceship'

However, when pagination is enabled, spaceship will not run.

I created a small demo: https://github.com/KjellMorgenstern/spaceship_paginate
When you look at the individual blog post, spaceship renders the mermaid example:

image
http://localhost:4000/2021/10/welcome-to-jekyll.html

However, if the same post is included in the main collection, spaceship will not process it:

image
http://localhost:4000

I am not sure if this is supposed to work? I saw a similar problem in issue #8, but it didn't get me further. What could I try?

@jeffreytse jeffreytse self-assigned this Oct 16, 2021
@jeffreytse
Copy link
Owner

Hi @KjellMorgenstern ,

Thanks for your support and issue, I will work on this issue as soon as possible. It's great that you gave me a minimal example on the issue, once I got progress, I will tell you in time.

Hope you have a good day! : )

Thanks and Regards

@jeffreytse jeffreytse added bug Something isn't working verified This issue was already verified labels Oct 16, 2021
jeffreytse added a commit that referenced this issue Oct 18, 2021
When the page was handled by processors, the page excerpt was not
updated, and keep the old excerpt of the page. The solution is to
update the page excerpt by checking whether the page is handled by
any one of processors.
@jeffreytse
Copy link
Owner

Hi @KjellMorgenstern

Thanks for your patience, now this issue has been addressed and fixed. Please update your jekyll-spaceship to the latest version. Here is the code snippet:

# Open Gemfile and check your plugin is at Github version
gem 'jekyll-spaceship', git: 'https://github.com/jeffreytse/jekyll-spaceship'

Thanks and Regards

@KjellMorgenstern
Copy link
Sponsor Author

KjellMorgenstern commented Oct 19, 2021

For better testing, I deployed
https://github.com/KjellMorgenstern/spaceship_paginate
to
https://spaceship-paginate.pages.dev/

Also, I added several posts for better checking pagination, an image asset, and in addition to mermaid also a Vimeo link to test the MediaProcessor

WIth the fix #62 , now the index.markdown page of the test is broken: It doesn't list the full articles anymore, probably it is not using the 'home' layout.

@jeffreytse
Copy link
Owner

Thanks for your demo, I will try to address the issue as soon as possible.

@KjellMorgenstern
Copy link
Sponsor Author

In the demo, excerpt is used without any excerpt separator.
Without a separator, doesn't {{ post.excerpt }} equal {{ post.content }} ?
However, the effect of the patch is that now we see a really short excerpt, and before it was showing the content.

@jeffreytse
Copy link
Owner

jeffreytse commented Oct 19, 2021

Yes, the default excerpt separator is \n\n. By default, excerpt is your first paragraph of a doc: everything before the first two new lines:

---
title: Example
---

First paragraph with [link][1].

Second paragraph.

[1]: http://example.com/

This is a fairly good option for Markdown and Textile files. But might cause problems for HTML docs (which is quite unusual for Jekyll). If the default excerpt delimiter is not good for you, you might want to set your own via configuration option excerpt_separator. For example, following is a good alternative for HTML docs:

# file: _config.yml
excerpt_separator: "<!-- more -->"

@jeffreytse
Copy link
Owner

jeffreytse commented Oct 21, 2021

Hi @KjellMorgenstern

I have done some research, and the include tag {% <Include your_file_path > %} does the action of reading file content individually after this plugin handle the markdown, so you saw the content included in your post markdown has not been processed by jekyll-spaceship, I will find out another solution to settle this issue as soon as possible.

Thanks for your patience.
Hope you have a good time. : )

Thanks and Regards

@longavailable
Copy link

longavailable commented Nov 12, 2021

Hi, @jeffreytse

I updated jekyll-spaceship to 2c008ed commit.

It seems something is not working. When I typed bundle exec jekyll serve --trace, the log shown as follwo:

bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
Traceback (most recent call last):
        47: from /usr/local/bin/bundle:23:in `<main>'
        46: from /usr/local/bin/bundle:23:in `load'
        45: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/exe/bundle:37:in `<top (required)>'
        44: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
        43: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/exe/bundle:49:in `block in <top (required)>'
        42: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli.rb:24:in `start'
        41: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        40: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli.rb:30:in `dispatch'
        39: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        38: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        37: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        36: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli.rb:494:in `exec'
        35: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli/exec.rb:28:in `run'
        34: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli/exec.rb:63:in `kernel_load'
        33: from /var/lib/gems/2.7.0/gems/bundler-2.2.11/lib/bundler/cli/exec.rb:63:in `load'
        32: from /usr/local/bin/jekyll:23:in `<top (required)>'
        31: from /usr/local/bin/jekyll:23:in `load'
        30: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>'
        29: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        28: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        27: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        26: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        25: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        24: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        23: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        22: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each'
        21: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'        20: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:36:in `process'
        19: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:65:in `build'
        18: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:28:in `process_site'
        17: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:76:in `process'
        16: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:202:in `render'
        15: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:515:in `render_pages'
        14: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:515:in `each'
        13: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:516:in `block in render_pages'
        12: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:524:in `render_regenerated'
        11: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/page.rb:179:in `trigger_hooks'
        10: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `trigger'
         9: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `each'
         8: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:102:in `block in trigger'
         7: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:43:in `block in hook'
         6: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:33:in `block in hook'
         5: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:70:in `dispatch'
         4: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:70:in `each'
         3: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:72:in `block in dispatch'
         2: from /home/bruce/.bundle/ruby/2.7.0/jekyll-spaceship-2c008ed2be44/lib/jekyll-spaceship/cores/manager.rb:72:in `new'
         1: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/excerpt.rb:26:in `initialize'
/var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/excerpt.rb:138:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @relative_path="index.html"> (NoMethodError)

@jeffreytse
Copy link
Owner

Hi @longavailable

Thanks for your issue and patience, this issue has been addressed and settled on issue #66.

Thanks and Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

3 participants