Skip to content

Commit

Permalink
update ny doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Jan 26, 2024
1 parent 963ddf0 commit d59227c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
9 changes: 7 additions & 2 deletions app/Http/Services/SeoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ public function setTitle($title)
*/
public function setSeoViewingDocs($page)
{
SEO::setTitle(str($page)->headline() . ' - ' . config('app.name') . ' - Flutter Micro-framework');
SEO::setDescription(str($page)->headline() . ' documentation for ' . config('app.name') . '. Build modern applications on top of the foundation ' . config('app.name') . ' provides from it\'s micro-framework for Flutter.');
$docTitle = str($page)->headline();
if ($docTitle->startsWith('Ny')) {
$docTitle = $docTitle->replace(" ", "");
}

SEO::setTitle($docTitle . ' - ' . config('app.name') . ' - Flutter Micro-framework');
SEO::setDescription($docTitle . ' documentation for ' . config('app.name') . '. Build modern applications on top of the foundation ' . config('app.name') . ' provides from it\'s micro-framework for Flutter.');
SEO::opengraph()->addProperty('type', 'articles');
SEO::jsonLd()->addImage(asset('images/nylo-social-banner-github.png'));
}
Expand Down
1 change: 1 addition & 0 deletions resources/docs/5.20.0/ny-future-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Widget build(BuildContext context) {
return Text(data);
},
loading: CupertinoActivityIndicator(), // change the default loader
useSkeletonizer: true, // enable the skeletonizer effect
onError: (AsyncSnapshot snapshot) { // handle exceptions thrown from your future.
print(snapshot.error.toString());
return Text("Error");
Expand Down
3 changes: 2 additions & 1 deletion resources/docs/5.20.0/ny-list-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ Here are some important parameters you should know about before using the `NyPul
| child | Widget Function(BuildContext context, dynamic data) {} | The child widget that will be displayed when the data is available. |
| data | Future Function() data | The list of data you want the list view to use. |
| stateName | String? stateName | You can name the state using `stateName`, later you will need this key to update the state. |
| useSkeletonizer | bool useSkeletonizer | Enable loading using the skeletonizer effect |

If you would like to know all the parameters available, visit this link [here](https://github.com/nylo-core/support/blob/{{$version}}/lib/widgets/ny_list_view.dart).
If you would like to know all the parameters available, visit this link [here](https://github.com/nylo-core/support/blob/5.x/lib/widgets/ny_list_view.dart).

<a name="updating-the-state"></a>
<br>
Expand Down
3 changes: 2 additions & 1 deletion resources/docs/5.20.0/ny-pull-to-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ Here are some important parameters you should know about before using the `NyPul
| child | Widget Function(BuildContext context, dynamic data) {} | The child widget that will be displayed when the data is available. |
| data | Future Function(int iteration) data | The list of data you want the list view to use. |
| stateName | String? stateName | You can name the state using `stateName`, later you will need this key to update the state. |
| useSkeletonizer | bool useSkeletonizer | Enable loading using the skeletonizer effect |

If you would like to know all the parameters available, visit this link [here](https://github.com/nylo-core/support/blob/{{$version}}/lib/widgets/ny_pull_to_refresh.dart).
If you would like to know all the parameters available, visit this link [here](https://github.com/nylo-core/support/blob/5.x/lib/widgets/ny_pull_to_refresh.dart).

<a name="updating-the-state"></a>
<br>
Expand Down
12 changes: 8 additions & 4 deletions resources/views/docs/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
<h5 class="mb-8 lg:mb-3 font-semibold text-slate-900 dark:text-slate-200">{{ str($key)->headline() }}</h5>

<ul class="space-y-6 lg:space-y-2 border-l border-slate-100 dark:border-slate-800">
@foreach($docLinks as $dockLink)
@foreach($docLinks as $docLink)
<li>
<a class="block border-l pl-4 -ml-px border-transparent hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 dark:text-slate-400 dark:hover:text-slate-300 {!! Request::is('docs/' . $version . '/' . $dockLink) ? 'text-blue-600' : 'hover:text-slate-900' !!}"
href="{{ route('landing.docs', ['page' => $dockLink, 'version' => $version]) }}"
<a class="block border-l pl-4 -ml-px border-transparent hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 dark:text-slate-400 dark:hover:text-slate-300 {!! Request::is('docs/' . $version . '/' . $docLink) ? 'text-blue-600' : 'hover:text-slate-900' !!}"
href="{{ route('landing.docs', ['page' => $docLink, 'version' => $version]) }}"
>
{{ str($dockLink)->headline() }}
@if (str($docLink)->startsWith('ny'))
{{ str($docLink)->headline()->replace(" ", "") }}
@else
{{ str($docLink)->headline() }}
@endif
</a>
</li>
@endforeach
Expand Down

0 comments on commit d59227c

Please sign in to comment.