-
Notifications
You must be signed in to change notification settings - Fork 27
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
display:none showing for templates in DevTools. Confused on how to use this #85
Comments
It works for new posts not old ones. Will close this down now. |
Sorry, I just had a chance to circle back on some of these issues. Are you still seeing the exception? |
@aarongustafson no. It works now. Thanks. |
Not all my webmentions are showing up. I only have two on my blog so far but I have at least 10 from Brid.gy. Not sure how this works exactly. |
Here is my YAML file. Not sure why they aren't showing up. Just three of them are. |
Also when I respecified the templates, got the same error: Here is the posts layout file. |
When I run Liquid Exception: String does not have #dig method in /_layouts/post.html
bundler: failed to load command: jekyll (/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/bin/jekyll)
TypeError: String does not have #dig method
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-webmention_io-2.9.3/lib/jekyll/webmention_io.rb:251:in `dig'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-webmention_io-2.9.3/lib/jekyll/webmention_io.rb:251:in `get_template_contents'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-webmention_io-2.9.3/lib/jekyll/tags/_.rb:38:in `template='
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-webmention_io-2.9.3/lib/jekyll/tags/count.rb:18:in `initialize'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/tag.rb:9:in `new'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/tag.rb:9:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:27:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block.rb:51:in `parse_body'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block.rb:10:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/tag.rb:10:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:27:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/document.rb:10:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/document.rb:5:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:132:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:116:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/tags/include.rb:168:in `load_cached_partial'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/tags/include.rb:134:in `render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:109:in `render_node'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:88:in `block in render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `each'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:208:in `block in render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:242:in `with_profiling'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:207:in `render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:220:in `render!'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:123:in `render_liquid'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:188:in `render_layout'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:155:in `place_in_layouts'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:85:in `render_document'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:62:in `run'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:455:in `block (2 levels) in render_docs'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:453:in `each'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:453:in `block in render_docs'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:452:in `each_value'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:452:in `render_docs'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:192:in `render'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:73:in `process'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/command.rb:28:in `process_site'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:65:in `build'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:36:in `process'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/exe/jekyll:15:in `<top (required)>'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/bin/jekyll:23:in `load'
/Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/bin/jekyll:23:in `<top (required)>' |
Thanks ! I was literally just about to ask for that. |
Hahaha no worries. |
AFAICT your template seems to only dump out webmentions for the I’ll look into the trace issue. |
Can you update to v2.9.6 and trace again? It’ll be easier to figure out where the trace is pointing :-) |
Yup. Will do so now. |
Here is the trace: /Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:49:in /Users/tiffanywhite/Desktop/Git_Repositories/TWBlog/vendor/bundle/ruby/2.5.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:453:in Basically, not sure what template to use and am finding them wherever I can. |
I've edited the repo a bit. I've deleted the old webmentions template and added a different one as well as creating a |
Ok, so it seems to be thinking that your webmentions configuration is a string rather than a Hash. That’s super odd. Let’s try this: clone a copy of this repo locally and point Once that’s rigged up, head over to line 265 in puts config.inspect Then run the trace again and post anything related to this plugin (the issue should not exist beyond there). |
@aarongustafson here is the trace for your plugin only:
|
Thank you. Did you happen to see the output of the |
I swapped that instance of |
Just merged a bunch of performance tweaks from @ashmaroli, so you’ll want to grab the latest & see if you are still having issues. |
Okay thanks. Just checking this today @aarongustafson. Will update and see what's up. |
How do I install this as a |
Nevermind got it. |
Still getting the |
@aarongustafson Here are a list of gems. Any known issue with your gem and these? gem 'json'
gem "jekyll", "~> 3.6.0"
gem "jekyll-theme-hydeout", "~> 3.4"
gem 'compass-yiq-color-contrast'
gem 'hash-joiner'
group :jekyll_plugins do
gem 'jekyll-gist'
gem 'jekyll-paginate'
gem 'redcarpet'
gem 'pygments.rb'
gem "html-proofer"
gem 'jekyll-cloudinary'
gem 'jekyll-seo-tag'
gem 'jekyll-archives'
gem 'octopress-social'
gem 'jekyll-algolia', '~> 1.0'
gem 'jekyll-font-awesome-sass'
gem 'sassc'
gem 'rake'
gem 'jekyll-include-cache'
gem 'font-awesome-sass', '~> 5.2.0'
gem 'jekyll-webmention_io'
end |
Here is the error with
|
Reading your docs I found this: "templates - If you would like to roll your own templates, you totally can. You will need to assign a hash of the template paths to use for loading each one." What does this mean? |
@twhite96 I cloned your blog repo locally and was able to build successfully on my Windows system... |
@twhite96 Here’s an example from the docs: webmentions:
username: YOUR_USERNAME
cache_folder: .cache
cache_bad_uris_for: 5
legacy_domains:
- http://aaron-gustafson.com
- http://www.aaron-gustafson.com
templates:
count: _includes/webmentions/count.html
likes: _includes/webmentions/likes.html
links: _includes/webmentions/links.html
posts: _includes/webmentions/posts.html
replies: _includes/webmentions/replies.html
reposts: _includes/webmentions/reposts.html
webmentions: _includes/webmentions/webmentions.html In this code, the templates key contains references to 7 different custom templates. The paths start in your site root, so in this case it’s showing them in the Does that clarify the configuration? |
@ashmaroli that's interesting. It isn't building on my Mac. Weird. |
@twhite96 You may want to setup Continuous Integration for your blog repo with TravisCI to initially just test if the site builds w/o any premature halts.. Once, that's set, you can edit your config file to have webmentions processed under Then, you may graduate to using Travis to deploy the site it builds, to your |
@twhite96 I do see one issue in your config regarding templates. You have this (currently commented out): templates:
_includes/webmentions.html
_includes/count.html
_includes/reposts.html
_includes/likes.html The configuration requires you to assign these templates to the different template names (like I demonstrated in the comment above). To get what you’re after, change it to this: templates:
webmentions: _includes/webmentions.html
count: _includes/count.html
reposts: _includes/reposts.html
likes: _includes/likes.html |
Okay. Thanks. That's probably what's happening. Once I get home I'll do this. |
@aarongustafson got it to build partially by adding a legacy domain. But then I get this error:
My config is this: webmentions:
username: tiffanywhite.tech
legacy_domains:
- https://helloburgh.me
templates:
count: _includes/webmentions/count.html
likes: _includes/webmentions/likes.html
webmentions: _includes/webmentions/webmentions.html
reposts: _includes/webmentions/reposts.html
js: false
debug: true |
According the the stack trace this seems to be an issue with the uris being provided.
|
Here is a sample of how
|
That would be a tag issue I think. Lemme look at your repo again. |
Let’s try this. Can you copy your all-up webmentions include and reduce it to only one call to a webmentions tag first? I’d also like to see what |
Tags as far as Jekyll metadata? It so I have a ton of posts I imported from WordPress with empty brackets in the tags front matter. I was wondering if that is the tags issue at hand? |
What is a webmentions tag? Not sure what you mean here. |
Here is an error from the trace: Puzzled as to what this means. |
According the the stack trace this seems to be an issue with the uris being provided. The issue behind this bug is the following method: jekyll-webmention_io/lib/jekyll/tags/_.rb Lines 26 to 32 in c98ec89
|
@ashmaroli okay so how do I fix it? Is it something I am doing or a bug in the plugin? |
It looks more like a bug in the plugin to me.. |
@twhite96 I pulled a copy of your repo and when I strip away your includes and custom templates, I get no errors on build. I am working my way through your templates to see if I can find the source of your issue. |
@twhite96 Ah! I think I see the issue: You are using If you want to have a custom “count” template, you reference it in your configuration: webmentions:
templates:
count: _includes/webmentions/count.html Then you use the count tag and the custom template will be automatically applied: {% webmention_count page.url %} It looks like you were setting up the config and then including the template (rather than the tag). I’m going to swap things around in my local just to be sure, but I believe that’s your issue. |
In your post template, I commented out lines 32-35 of your posts template and swapped in the tags: {% webmention_count page.url %}
{% webmention_likes page.url %}
{% webmentions page.url %}
{% webmention_reposts page.url %}
{% comment %}
{% include webmentions/count.html %}
{% include webmentions/likes.html %}
{% include webmentions/webmentions.html %}
{% include webmentions/reposts.html %}
{% endcomment %} With that in place, everything works, except your custom webmentions template. So currently I have that one commented out in the config: webmentions:
username: tiffanywhite.tech
legacy_domains:
- http://helloburgh.me
- https://helloburgh.me
- https://twhite96.github.io
- http://twhite96.github.io
cache_bad_uris_for: 365
templates:
count: _includes/webmentions/count.html
likes: _includes/webmentions/likes.html
#webmentions: _includes/webmentions/webmentions.html
reposts: _includes/webmentions/reposts.html
# debug: true
throttle_lookups:
last_week: daily
last_month: weekly
last_year: every 2 weeks
older: monthly I’m looking into what the issue is with your custom template now. |
Ahhhhhh ok. I'll check this out. Thanks for all your help. |
@twhite96 Actually the error in that template was my fault: a window focus issue caused me to accidentally type in the file, breaking it. So making the change above should get you going again. I am not seeing any issue building on my end. |
It works!!! Thanks @aarongustafson!!! I can probably close this now. Thanks for being so helpful. Appreciated. |
I have a template I am using from https://github.com/nhoizey/nicolas-hoizey.com/blob/master/_includes/webmentions/webmentions.html but none of my webmentions are showing.
I get an build error when using a
webmentions
directory in_includes
with this template in it. So, I moved it to the root of the_includes
directory and it builds.But when I go to my site: https://tiffanywhite.tech, I see the webmentions templates say,
display: none
in their ids or classes. I am finally receiving webmentions but I can't seem to get them to show up. Guess I am just confused.Any ideas?
Here is the error when I specify a template:
Liquid Exception: String does not have #dig method in /_layouts/post.html
My repo, if you want to take a look at it: https://github.com/twhite96/TWBlog
The text was updated successfully, but these errors were encountered: