Closed BenoitDuffez closed 6 months ago
👋
I may be wrong but I don't feel like it will add any value. From my understanding and what I'm reading here GoogleBot simply searches for <a href="">
links, so having them inside <ol/ul>
or <p>
tags doesn't make any difference.
Alright, makes sense. Thanks.
Edit: I thought it could be used to show the site structure below the result entry on Google search:
OK I'm reopening because you opened my eyes, my menu wasn't rendered as links in the DOM! This is catastrophic. I'm using a bottom navigation bar, which can't use Seo.link
s as the items
is strongly typed (they must be BottomNavigationBarItem
).
What would be your recommendation?
OK I'm reopening because you opened my eyes, my menu wasn't rendered as links in the DOM! This is catastrophic. I'm using a bottom navigation bar, which can't use
Seo.link
s as theitems
is strongly typed (they must beBottomNavigationBarItem
).What would be your recommendation?
Hey. As a quick solution you can do something like this:
return Stack(
children: [
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
BottomNavigationBar(items: items),
],
);
I'll think about how to make this usage bit cleaner.
Well I initially thought it was a smart idea, but I'm not smart enough to implement it. I'm new to flutter so I'm not sure how to wrap the bottom nav bar:
return Scaffold(
appBar: ColoredAppBar(title: title, hasIcon: true, actions: actions),
body: navigator,
bottomNavigationBar: BottomNavigationBar(
items: bottomTabs,
currentIndex: _getCurrentTabIndex(),
selectedItemColor: Colors.tealAccent,
onTap: _onBottomTabTapped,
),
);
Should the stack wrap the scaffold? or the navigator in the scaffold body? or something else?
Thanks
Well I initially thought it was a smart idea, but I'm not smart enough to implement it. I'm new to flutter so I'm not sure how to wrap the bottom nav bar:
return Scaffold( appBar: ColoredAppBar(title: title, hasIcon: true, actions: actions), body: navigator, bottomNavigationBar: BottomNavigationBar( items: bottomTabs, currentIndex: _getCurrentTabIndex(), selectedItemColor: Colors.tealAccent, onTap: _onBottomTabTapped, ), );
Should the stack wrap the scaffold? or the navigator in the scaffold body? or something else?
Thanks
The trick is that bottomNavigationBar:
doesn't need to be a BottomNavigationBar typed class it can be whatever Widget.
So this should work:
return Scaffold(
bottomNavigationBar: Stack(
children: [
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
Seo.link(
anchor: anchor,
href: href,
child: const SizedBox(),
),
BottomNavigationBar(
items: bottomTabs,
currentIndex: _getCurrentTabIndex(),
selectedItemColor: Colors.tealAccent,
onTap: _onBottomTabTapped,
),
],
),
);
Often times the navigation menu is an HTML
ol
/ul
withli
.My app has bottom tabs, I think it would make sense to advertise it as such for SEO / crawlers.
How about adding a
TextTagStyle
asli
(with a booleanordered
to switch betweenol
andul
) so that we can output the list in the crawler DOM?