Tagged: #jekyll Toggle Comment Threads | Keyboard Shortcuts

  • Novice wrote on December 10, 2022 @ 11:48 Permalink
    Tags: #jekyll, plugin   

    Source

    Last Modified At Plugin

    A liquid tag for Jekyll to indicate the last time a file was modified.

    This plugin determines a page’s last modified date by checking the last Git commit date of source files. In the event Git is not available, the file’s mtime is used.
    Setting up

    Open your Gemfile in your Jekyll root folder and add the following:

    
    group :jekyll_plugins do
      gem "jekyll-last-modified-at"
    end
    

    Add the following to your site’s _config.yml file

    
    plugins:
      - jekyll-last-modified-at
    
    # Optional. The default date format, used if none is specified in the tag.
    last-modified-at:
        date-format: '%d-%b-%y'
    

    Usage

    There are a few ways to use this gem.

    You can place the following tag somewhere within your layout:

    
    {% last_modified_at %}
    

    By default, this creates a time format matching “%d-%b-%y” (like “04-Jan-14”).

    You can also choose to pass along your own time format. For example:

    
    {% last_modified_at %Y:%B:%A:%d:%S:%R %}
    

    That produces “2014:January:Saturday:04.”

    You can also call the method directly on a Jekyll “object,” like so:

    
    {{ page.last_modified_at }}
    

    To format such a time, you’ll need to rely on Liquid’s date filter:

    
    {{ page.last_modified_at | date: '%Y:%B:%A:%d:%S:%R' }}
    

    (It’s generally more performant to use the page.last_modified_at version of this plugin.)

     
  • Novice wrote on November 26, 2022 @ 17:30 Permalink
    Tags: #jekyll   

    Error

    Dependency Error: Yikes! It looks like you don’t have kramdown-parser-gfm or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. The full error message from Ruby is: ‘cannot load such file — kramdown-parser-gfm’ If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
    Conversion error: Jekyll::Converters::Markdown encountered an error while converting ‘_posts/2022-11-26-welcome-to-jekyll.markdown’:
    kramdown-parser-gfm
    ERROR: YOUR SITE COULD NOT BE BUILT:
    ————————————
    kramdown-parser-gfm

    Solution
    Add gem “kramdown-parser-gfm” to the Gemfile and run bundle install.
    Run “bundle exec jekyll serve” to access the site.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel