jekyll-youtube-lazyloading icon indicating copy to clipboard operation
jekyll-youtube-lazyloading copied to clipboard

Jekyll Cannot Resolve <youtube> Tag

Open verticon opened this issue 4 years ago • 1 comments

Hello Etienne,

Thank you, and contributors, for creating this Jekyll YouTube plugin. I am attempting to use it for the first time and have encountered a difficulty. Please have a look. I am grateful for any advise.

I have followed your installation guide; I have triple checked. When I generate the site, Jekyll complains:

    ~/verticon.io$ bundle exec rake generate
    ## Generating Site with Jekyll
          write source/stylesheets/screen.css
   Configuration file: /Users/Robert/verticon.io/_config.yml
                       Source: source
                Destination: public
             Generating... 
   Liquid Exception: No such file or directory @ dir_s_mkdir - .jekyll-cache/youtube in about/index.markdown
                                 done.
   Auto-regeneration: disabled. Use --watch to enable.
   ~/verticon.io$ 

The file referenced by the error, about/index.markdown, is where I am attempting to embed the YouTube video. Here are its contents:

    ---
    layout: page
    title: "Welcome To iLand"
    #date: 2020-12-07 11:56
    comments: false
    sharing: true
    footer: false
    ---

    [//]: # This is a comment

    {% img left about/image1.jpg 150 250 One %}
    {% img left about/image2.jpg 150 250 Two %}

    {% video http://localhost:4000/about/MyVideo.mp4 300 200 http://localhost:4000/about/MyPoster %}

    {% youtube 9oDoy0IAKKM %}

If I remove the line with the youtube tag then all is well. "img"and 'video" are tags that are defined by other plugins which reside in the plugins directory along side youtube.rb

verticon avatar Dec 10 '20 16:12 verticon

I have gone to https://github.com/optikfluffel/octopress-responsive-video-embed (which is, I believe, your starting point), obtained youtube.rb and _rve.scss from there, and put them in place on my site. Voila! Jekyll does not complain when generating and the YouTube video is properly displayed on the about/index page.

Hmmm. Not sure what to make of this.

Also, @optikfluffel's instructions make no mention of the YouTube API key, or of the yt gem.

verticon avatar Dec 10 '20 18:12 verticon