All Projects → iamSahdeep → seo_renderer

iamSahdeep / seo_renderer

Licence: MIT license
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

Programming Languages

dart
5743 projects
C++
36643 projects - #6 most used programming language
CMake
9771 projects
HTML
75241 projects
ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to seo renderer

getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-83.5%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+33.98%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
Flutter-Apps
🌀 This is mainly focus on a complete application for production
Stars: ✭ 18 (-82.52%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
Motion-Tab-Bar
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.
Stars: ✭ 237 (+130.1%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
swipedetector
A Flutter package to detect up, down, left, right swipes.
Stars: ✭ 34 (-66.99%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (-43.69%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
flutter sliding tutorial
User onboarding library with smooth animation of objects and background colors
Stars: ✭ 127 (+23.3%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
liquid button
Liquify your buttons, web demo at website
Stars: ✭ 18 (-82.52%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
FlutterLoadingGIFs
Loading indicator GIFs. Material and Cupertino (Android and iOS) loading indicators in assorted sizes. Use as placeholders for loading remote image assets. Demo: https://gallery.codelessly.com/flutterwebsites/loadinggifs/
Stars: ✭ 28 (-72.82%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
survey kit
Flutter library to create beautiful surveys (aligned with ResearchKit on iOS)
Stars: ✭ 68 (-33.98%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+891.26%)
Mutual labels:  flutter-plugin, flutter-widget, flutter-package
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (-33.01%)
Mutual labels:  flutter-plugin, flutter-package
cross connectivity
A Flutter plugin for handling Connectivity and REAL Connection state in the mobile, web and desktop platforms. Supports iOS, Android, Web, Windows, Linux and macOS.
Stars: ✭ 27 (-73.79%)
Mutual labels:  flutter-plugin, flutter-package
Flutter swiper
The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
Stars: ✭ 3,209 (+3015.53%)
Mutual labels:  flutter-plugin, flutter-widget
Flutter Learning
🔥 👍 🌟 ⭐ ⭐⭐ Flutter all you want.Flutter install,flutter samples,Flutter projects,Flutter plugin,Flutter problems,Dart codes,etc.Flutter安装和配置,Flutter开发遇到的难题,Flutter示例代码和模板,Flutter项目实战,Dart语言学习示例代码。
Stars: ✭ 4,941 (+4697.09%)
Mutual labels:  flutter-plugin, flutter-widget
Gsy flutter demo
Flutter 不同于 GSYGithubAppFlutter 完整项目,本项目将逐步完善各种 Flutter 独立例子,方便新手学习上手和小问题方案解决。 目前开始逐步补全完善,主要提供一些有用或者有趣的例子,如果你也有好例子,欢迎提交 PR 。
Stars: ✭ 2,140 (+1977.67%)
Mutual labels:  flutter-plugin, flutter-widget
nativeweb
Build your Own Plugin using (PlatformViews) Demo for Flutter Live 2018 Extended Event - Hyderabad
Stars: ✭ 26 (-74.76%)
Mutual labels:  flutter-plugin, flutter-package
SeoTags
SeoTags create all SEO tags you need such as meta, link, twitter card (twitter:), open graph (og:), and JSON-LD schema (structred data).
Stars: ✭ 113 (+9.71%)
Mutual labels:  seo, seo-friendly
flutter bolg manage
Flutter实战项目,采用Getx框架管理,遵循Material design设计风格,适合您实战参考或练手
Stars: ✭ 373 (+262.14%)
Mutual labels:  flutter-plugin, flutter-widget
flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+1639.81%)
Mutual labels:  flutter-plugin, flutter-package

SEO Renderer [Not Maintaining]

Pub

Alternative : https://pub.dev/packages/seo

A flutter plugin (under development) to render text, link, image widgets as html elements for SEO purpose.

Created specifically for issue flutter/flutter#46789 It will automatic detect the crawler using regex and navigator userAgent and add the HtmlElement you choose to the DOM.

All PR's are welcome :)

Getting Started

  • Add this to your pubspec.yaml

    dependencies:
      seo_renderer: ^0.6.0
  • Get the package from Pub:

    flutter packages get
  • Import it in your file

    import 'package:seo_renderer/seo_renderer.dart';

Usage

It's required to add a RobotDetector to detect if page is visited by a robot and add seoRouteObserver to observe when widgets change their visibility. To do this simply wrap MaterialApp within RobotDetector and add seoRouteObserver in navigatorObservers:

runApp(
  RobotDetector(
    debug: true, // you can set true to enable robot mode
    child: MaterialApp(
      home: MyApp(),
      navigatorObservers: [seoRouteObserver],
    ),
  ),
);

For more complex projects it's recommended to add these lines in index.html which will force html web renderer in case robot is detected. It's because canvaskit has some stricter limits and potenitally can break.

<body>
  ...
  <script>
    const regExp = new RegExp("bot|google|baidu|bing|msn|teoma|slurp|yandex", "i");
    if (regExp.test(navigator.userAgent)) {
      window.flutterWebRenderer = "html";
    }
  </script>
  ...
</body>

TextRenderer

To render html text element above a child you pass Text, RichText as the child or simply set the text.

TextRenderer(
  child: Text(
    'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
  ),
)

TextRenderer(
  text: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
  child: CustomWidget(),
)

Optionally you can change the html element between <h1> to <h6> and <p> by setting style. Default value is TextRendererStyle.paragraph.

TextRenderer(
  style: TextRendererStyle.paragraph,
  child: Text(
    'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
  ),
)

TextRenderer(
  style: TextRendererStyle.header1,
  child: Text(
    'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
  ),
)

LinkRenderer

To render html link element above a child set text and href.

LinkRenderer(
  text: 'Try Flutter',
  href: 'https://www.flutter.dev',
  child: ...,
)

ImageRenderer

To render html image element above a child set alt and pass Image.network(...), Image.asset(...), Image.memory(...) as the child or simply set the src.

ImageRenderer(
  alt: 'Network Image',
  child: Image.network('https://fakeimg.pl/300x300/?text=Network'),
)

ImageRenderer(
  alt: 'Network Image',
  src: 'https://fakeimg.pl/300x300/?text=Network',
  child: CustomWidget(),
)

ScreenShot & Example

Live example https://seo-renderer.netlify.app/

Select GoogleBot here's how as userAgent in Network Condition and refresh the page to see created Div Elements.

License

MIT License

Copyright (c) 2021 Sahdeep Singh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Author & support

This project is created by Sahdeep Singh

If you appreciate my work you can connect and endorse me on LinkedIn to keep me motivated :)

Don't forget to check out these AWESOME contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].