Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
krokyze authored Jan 14, 2024
1 parent 7ff9a7e commit ac8d543
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ dependencies:
seo: ^0.0.6
```
Use `usePathUrlStrategy()` to ensure that Google recognizes each URL as a distinct page. Failure to do so may result in Google perceiving all URLs as the same page. For additional details, refer to [this video](https://www.youtube.com/watch?v=vow-m6R-YHo).

```
void main() {
usePathUrlStrategy();
runApp(App());
}
```
 
Wrap your app within `SeoController` which will handle listening to widget tree changes and updating the html document tree. In case your app has authorization and user is logged in you can disable the controller by `enabled: false` as it's redundant to update the html document tree at that state.
```dart
import 'package:seo/seo.dart';
void main() {
usePathUrlStrategy();
runApp(const App());
}
Expand Down

0 comments on commit ac8d543

Please sign in to comment.