getgrav / grav-plugin-breadcrumbs Goto Github PK
View Code? Open in Web Editor NEWGrav Breadcrumbs Plugin
Home Page: https://getgrav.org
License: MIT License
Grav Breadcrumbs Plugin
Home Page: https://getgrav.org
License: MIT License
As a non native speaker, can someone please explain the purpose of the setting "link trailing"?
Google was not as helpful as I hoped it would be.
Thanks in advance.
not displayed when the menu is collapsed. tell me what could be the reason. clean GRAV with theme antimatter
Current schema for breadcumps is deprecated by Google
data-vocabulary.org schema is deprecated and is no longer supported by Google. Please migrate to using schema.org types.
and will be ignored after April 2020. Consider movement to Schema.org
Making a breadcrumbs modular with:
{% if config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
in it doesn't work. Only fa-home
icon appears. Is it intentional? Is there any way I could put working breadcrumbs between modulars which are loaded through:
{% for module in page.collection() %}
{{ module.content }}
{% endfor %}
?
Removing the plugin causes website frontend crashes with error
RuntimeException (400) Template "partials/breadcrumbs.html.twig" is not defined in "blog.html.twig" at line 27.
After deleting the plugin config file left in user/config/plugins, site works again.
[...@... breadcrumbs]$ composer update
[Composer\Json\JsonValidationException]
"./composer.json" does not match the expected JSON schema:
- name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$
Works after changing name to getgrav/grav-plugin-breadcrumbs
Composer 2.1.14
PHP 7.4.25
Hi,
many of you probably received an infotmation from google search console about error regarding Data-Vocabulary.org is being deprecated. here is the quick fix (it is really quick, spent 20min with it, not tested widely) to this to switch from Data-Vocabulary.org to the Shema.org which is supportted by Google now. It consists of 2 modifications:
1. breadcrumbs/templates/partials/breadcrumbs.html.twig
{% set crumbs = breadcrumbs.get() %}
{% set breadcrumbs_config = config.plugins.breadcrumbs %}
{% set divider = breadcrumbs_config.icon_divider_classes %}
{% set lang = "/"~html_lang %}
{% set siteurl = base_url_absolute|replace({ (lang) : ""}) %}
{% if crumbs|length > 1 or breadcrumbs_config.show_all %}
<ol id="breadcrumbs" itemscope itemtype="https://schema.org/Breadcrumblist">
{% if breadcrumbs_config.icon_home %}
<i class="{{ breadcrumbs_config.icon_home }}"></i>
{% endif %}
{% set position = 1 %}
{% for crumb in crumbs %}
{% if not loop.last %}
{% if crumb.routable %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ siteurl }}{{ crumb.url }}" itemprop="item"><span itemprop="name">{{ crumb.menu }}</span></a>
<meta itemprop="position" content="{{ position }}">
</li>
{% else %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<span itemprop="name">{{ crumb.menu }}</span>
<meta itemprop="position" content="{{ position }}">
</li>
{% endif %}
<i class="{{ divider }}"></i>
{% else %}
{% if breadcrumbs_config.link_trailing %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ siteurl }}{{ crumb.url }}" itemprop="item"><span itemprop="name">{{ crumb.menu }}</span></a>
<meta itemprop="position" content="{{ position }}">
</li>
{% else %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<span itemprop="name">{{ crumb.menu }}</span>
<meta itemprop="position" content="{{ position }}">
</li>
{% endif %}
{% endif %}
{% set position = position + 1 %}
{% endfor %}
</ol>
{% endif %}
2. breadcrumbs/css/breadcrumbs.css
#breadcrumbs {
height: 3rem;
line-height: 3rem;
padding-left: 3rem;
}
#breadcrumbs li {
display: inline-block;
padding: 0 1rem;
}
#breadcrumbs ol {
padding-left: 0;list-style:none;display:-webkit-inline-box;
}
#breadcrumbs i {
display: inline-block;
width: 20px;
text-align: center;
}
this will mage Google happy and you site will look exactly the same. You may test the structured data result here https://search.google.com/structured-data/testing-tool
When I display a single Flex Object from a directory, the URL looks something like /about/careers/id:11025b4c30e0e7c93e8ab97dfd3611c7
but the bread crumbs display as About > Careers, ignoring the object component (e.g., About > Careers > My Object Title). This is using a Gantry-based theme but I don't think that's a factor.
Hello I am Yoast Wordpress user can you please add breadcrumb title in admin please as I always use custom breadcrumb title for the page like my page name is Free Online Tutorials and Courses so I don't want this name in every page I want custom name like Tutorials only hope you understand, It will be great if you will consider adding it.
Maybe I am missing something as I am new to grav, but can't figure this one out. Breadcrumbs are working on all blog related pages, but pages like :
https://blog.example.com/search/query:hills
This one outputs the html with no pages included :
<ol class="blog-breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
</ol>
https://blog.example.com/archives_month:jul_2014
https://blog.example.com/tag:photography
These two only show the root level breadcrumb :
<ol class="blog-breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">Blog</span></a>
<meta itemprop="position" content="1">
</li>
</ol>
Does it not work for these types or what is going on? The pages I mentioned use their respective plugins from the grav team. I am using the blog skeleton as my default.
i think the new link: https://schema.org/breadcrumb
I think it would be nice if there could be an option to include/exclude the current page on the breadcrumb trail, similar to how you can optionally include home.
(I'll open a PR for this soon)
It doesn't seem like this is mobile friendly. Long blog names distort the layout. As an interim fix, I made a small change to the else portion of the twig to keep everything on one line and within a mobile display.
<span itemprop="name">{{ crumb.menu|truncate(15) }}</span>
This is just a bandaid, I hope someone can help with some CSS guidance.
Thanks,
J
I have a simple site only using pages and I have a hierarchy that nests some folders with markdown files with organizational folders without markdown files. Currently, the plugin adds these non-routable folders in the breadcrumbs list.
The simple fix, which seems to be working for me, is to check routability before adding to the hierarchy array in classes/breadcrumbs.php
:
while($current && !$current->root()) {
if($current->routable()) {
$hierarchy[$current->url()] = $current;
}
$current = $current->parent();
}
EDIT: Sorry for not making a PR. Being a bit lazy while working on the site. ;)
Hello,
I've followed the instructions, but the breadcrumb plugin isn't working. I'm running Grav 0.9.2.
Any help would be really appreciated.
Thanks,
Jeff
Given that Google dropped support on April 6th for the markup used by this plugin, and that despite a fix posted here on Jan 22, should I assume this plugin is no longer supported?
Just to save this for reference: https://schema.org/BreadcrumbList
Thank you for this plugin.
Is there a plan to include also categories into the trail? Ex:
Home > Sports > Article 1
For not it takes the name from homepage title set in .md file. Is it possible to set it independent of homepage title?
For example, homepage title is "News around the world", and i want to make it just "Home".
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.