kinnetica / jekyll-plugins Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://www.kinnetica.com
Home Page: http://www.kinnetica.com
$ jekyll new test_project
_plugins
folder_config.yml
file (from readme)$ jekyll serve --trace
about.md
file. Change nothing. Just save it and see that the file was regenerated. Save the file a second time and see the error.jekyll serve
process to see your text changes.I was unable to figure out anything more about the error. This is my first attempt at debugging a jekyll plugin and it seems quite difficult a process (debugging plugins that-is).
Needless to say, --trace
does not show an error on build
as it happens during regeneration. The --trace
flag doesn't seem helpful in this case.
$ jekyll serve --trace
Configuration file: /home/mark/dev/jekyll/testing_debug/_config.yml
Source: /home/mark/dev/jekyll/testing_debug
Destination: /home/mark/dev/jekyll/testing_debug/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.522 seconds.
Auto-regeneration: enabled for '/home/mark/dev/jekyll/testing_debug'
Configuration file: /home/mark/dev/jekyll/testing_debug/_config.yml
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
Regenerating: 1 file(s) changed at 2015-11-22 19:11:29 ...done in 0.174784221 seconds.
Regenerating: 1 file(s) changed at 2015-11-22 19:11:31 ...error:
Error: no implicit conversion of nil into String
Error: Run jekyll build --trace for more information.
I roll in here and know that I'm using Jekyll version X. What commit of this plugin do I download? The current HEAD is incompatible with 2.x, but there's no indication of that.
Tags would be nice. :)
I'm getting this error:
Configuration file: /Users/***/dev/website/jekyll/_config.yml
/Users/***/dev/website/jekyll/_plugins/sitemap_generator.rb:18:in `<module:Jekyll>': cannot load such file -- jekyll/post (LoadError)
from /Users/***/dev/website/jekyll/_plugins/sitemap_generator.rb:16:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:75:in `block (2 levels) in require_plugin_files'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `each'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `block in require_plugin_files'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `each'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `require_plugin_files'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/site.rb:97:in `setup'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/site.rb:49:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `new'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.0.0/bin/jekyll:17:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
Only solution was to remove plugin.
jekyll 3.0.0
This plugins generates a sitemap just fine, but for toplevel pages only. Any directories down seem to be entirely ignored. Is this by design? If not, then I may have found a bug.
I tried explicitly including a directory, but even then it's ignored. All options for the sitemap plugin are default.
Using the latest everything.
change_frequency_name is a nice idea, but when implementing this plugin after a site has been built, it requires going through all pages and putting a changefreq in them.
This is not cool if the changefreq is going to be the same for most pages. Therefore, I propose including a setting like "default_change_frequency" that controls, when set, the changefreq that gets added to pages where the change_frequency_name setting has not been set.
If an invalid value provided, it should print an error and simply exclude that element for the page or post.
In the readme.md you mention that the configuration must have the following line.
sitemap:
file: "/sitemap.xml"
However in the sitemap_generator.rb file you are using this to check the config key.
@config['filename'] = sitemap_config['filename'] || SITEMAP_FILE_NAME
Please rectify the configuration instructions.
For newbies, if you clearly mention what the name of configuration file should be, it would help.
Thanks
SVS
Our sitemap has a urlset element, but it's now empty after upgrading to latest Jekyll and latest sitemap plugin. Jekyll 3.0.1, about a bazillion pages, zero posts. Our site builder runs Jekyll using the --source
and --destination
flags, and does not chdir into the source dir before running it.
Prying things open with byebug, it looks like the problem is here:
def fill_pages(site, urlset)
site.pages.each do |page|
if !excluded?(site, page.path_to_source)
if File.exists?(page.path) # <-- RIGHT HERE
url = fill_url(site, page)
urlset.add_element(url)
end
end
end
end
The value of page.path
is always something like "pe/2015.3/windows_config_mgmnt.md"
, and just calling File.exists?
on it will only work if you've chdired into the source dir.
So I figure, instead of relying on an unreliable pwd, the generator should be prepending the value of site.source
to each page.
And actually, come to think of it, why test for existence in the first place? Is there a situation where Jekyll would create and hold onto a page object without a source file?
The last modification date of the homepage and archive page should reflect the date of the latest post if it is after the last modified date of the page or its layouts.
In my root jekyll folder, I have some folders, they generated in a static too. How can index this files in sitemap.xml too?
Howdy,
If I use the sitemap_generator.rb with either the monthly or category archives plugin, I'm getting the following error:
sitemap_generator.rb:78:in
join': no implicit conversion of nil into String (TypeError)`
I'm not a Rubyist, but it appears that the site
object contains the following array for pages
when the monthly or category archive plugin is installed:
@pages=[#<Jekyll:Page @name="index.html">, #<Jekyll:Page @name=nil>]
Any thoughts on how to work around this appreciated. :)
Phillip.
jekyll 1.4.2
ruby 2.0.0
Currently, users using pagination will receive an error because of an invalid path. The plugin should recognize pagination and use the last modified date of the main index.html.
I get an error on Heroku with this because it's trying to access the destination folder that isn't available on Heroku.
Sorry for noob question, hoping for more detail on this point:
Change the sitemap: include_posts: list to include any pages that are looping through your posts (e.g. "/index.html", "/notebook/index.md", etc.). This will ensure that right after you make a new post, the last modified date will be updated to reflect the new post.
Do you mean any page that contains a post loop? Want to be sure since a broken sitemap could be really bad for SEO. Thanks.
I don't know why, but the generated sitemap.xml
doesn't show the correct URL for me:
<url>
<loc>http://mysite.devhttp://mysite.dev/2014/11/post.html</loc>
<lastmod>2014-11-22T17:06:06+01:00</lastmod>
</url>
I don't thinks it's important, but in my config both url
and baseurl
point to mysite.dev
.
Anyone know how to work around this?
I followed the readme, and see it in my _site folder, however, not on my user github pages, repo, or by trying to go directly through the site. Any thoughts on why this might be?
➜ project-website git:(qa) jekyll
Configuration from /Users/krosenberg/Desktop/Projects/website/_config.yml
Building site: ./src -> ./public
/Users/krosenberg/Desktop/Projects/website/_plugins/sitemap_generator.rb:126:in `initialize': No such file or directory -/Users/krosenberg/Desktop/Projects/website/public/sitemap.xml (Errno::ENOENT)
from /Users/krosenberg/Desktop/Projects/website/_plugins/sitemap_generator.rb:126:in `new'
from /Users/krosenberg/Desktop/Projects/website/_plugins/sitemap_generator.rb:126:in `generate'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/gems/jekyll-0.12.1/lib/jekyll/site.rb:190:in `block in generate'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `each'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `generate'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/gems/jekyll-0.12.1/lib/jekyll/site.rb:40:in `process'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/gems/jekyll-0.12.1/bin/jekyll:264:in `<top (required)>'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/bin/jekyll:23:in `load'
from /Users/krosenberg/.rvm/gems/ruby-1.9.3-p327/bin/jekyll:23:in `<main>'
Not sure why this script is trying to reach into the public folder like that, or why it cares about whether this file exists? Any ideas?
I see this in the instructions: "A sitemap.xml should be included in your _site folder."
It may be an issue that the project I am currently working on is not using a "_site" folder, but a folder called "src"?
Mac OSX with rvm using Ruby 1.9.3
Thanks so much,
When I use either plugin on its own the site works fine but when I use both together I get this error:
jekyll serve --trace /Users/erik/.rvm/gems/ruby-head/gems/liquid-2.6.1/lib/liquid/htmltags.rb:43: warning: duplicated key at line 46 ignored: "index0" Configuration file: /Users/erik/chessground/_config.yml Source: /Users/erik/chessground Destination: /Users/erik/chessground/_site Generating... /Users/erik/chessground/_plugins/generate_sitemap.rb:84:in '+': no implicit conversion of nil into String (TypeError) from /Users/erik/chessground/_plugins/generate_sitemap.rb:84:in 'block in generate_content' from /Users/erik/chessground/_plugins/generate_sitemap.rb:83:in 'each' from /Users/erik/chessground/_plugins/generate_sitemap.rb:83:in 'generate_content' from /Users/erik/chessground/_plugins/generate_sitemap.rb:60:in 'block in generate' from /Users/erik/chessground/_plugins/generate_sitemap.rb:58:in 'open' from /Users/erik/chessground/_plugins/generate_sitemap.rb:58:in 'generate' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/site.rb:280:in 'block in generate' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/site.rb:279:in 'each' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/site.rb:279:in 'generate' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/site.rb:50:in 'process' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/command.rb:28:in 'process_site' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/commands/build.rb:56:in 'build' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/commands/build.rb:34:in 'process' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/lib/jekyll/commands/serve.rb:26:in 'block (2 levels) in init_with_program' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in 'call' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in 'block in execute' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in 'each' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in 'execute' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in 'go' from /Users/erik/.rvm/gems/ruby-head/gems/mercenary-0.3.5/lib/mercenary.rb:19:in 'program' from /Users/erik/.rvm/gems/ruby-head/gems/jekyll-2.5.2/bin/jekyll:20:in '<top (required)>' from /Users/erik/.rvm/gems/ruby-head/bin/jekyll:23:in 'load' from /Users/erik/.rvm/gems/ruby-head/bin/jekyll:23:in '<main>' from /Users/erik/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in 'eval' from /Users/erik/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in '<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.