Update (copies)

This commit is contained in:
2023-11-23 11:20:11 +08:00
parent e374875015
commit 3c2b6bbc26
4 changed files with 45 additions and 6 deletions

View File

@@ -4,7 +4,9 @@
use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\HybridTopRssPostKeywords;
use App\Models\RssPost;
use App\Models\RssPostKeyword;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
use JsonLd\Context;
@@ -26,19 +28,38 @@ public function searchResults(Request $request, $query)
$query = urldecode($query);
$rss_post_keyword = RssPostKeyword::where('value_lowercased', strtolower($query))->first();
if (!is_null($rss_post_keyword))
{
$query = $rss_post_keyword->value;
}
$breadcrumbs = collect([
['name' => 'Home', 'url' => route('front.home')],
['name' => 'News Bites', 'url' => route('front.all')],
['name' => '#'.$query, 'url' => null],
['name' => strtolower('#'.$query), 'url' => null],
]);
$title = 'Latest News about '.ucwords($query).' in FutureWalker';
$title = "{$query} News Bites: Updated Hourly";
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 5);
$description = "Stay updated with " . $query;
foreach ($top_rss_keywords as $rss_keyword)
{
$description .= ", " . $rss_keyword->value;
}
$description .= " and 1000+ other news topics with 1-minute news bites with FutureWalker.";
SEOTools::metatags();
SEOTools::twitter();
SEOTools::opengraph();
SEOTools::jsonLd();
SEOTools::setTitle($title, false);
SEOTools::setDescription($description);
$rss_posts = RssPost::with('category', 'entities_keywords')
->where('status', 'published')
@@ -73,13 +94,15 @@ public function index(Request $request)
['name' => 'News Bites', 'url' => null], // or you can set a route for Latest News if there's a specific one
]);
$title = 'Latest News Bites from FutureWalker';
$title = '1-minute AI & Tech News Bites: Updated Hourly';
$description = "Stay updated over 1000+ news topics summarised to 1-minute news bites with FutureWalker.";
SEOTools::metatags();
SEOTools::twitter();
SEOTools::opengraph();
SEOTools::jsonLd();
SEOTools::setTitle($title, false);
SEOTools::setDescription($description);
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
->where('published_at', '<=', now())
@@ -120,13 +143,25 @@ public function category(Request $request, $category_slug)
['name' => $category->name, 'url' => null],
]);
$title = 'Latest News from FutureWalker';
$title = 'AI & Tech ' . "$category->name" . ": Updated Hourly" ;
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 10);
$description = "Stay updated with ";
foreach ($top_rss_keywords as $rss_keyword)
{
$description .= ", " . $rss_keyword->value;
}
$description .= " and 1000+ other news " . strtolower($category->name) . " with 1-minute news bites with FutureWalker.";
SEOTools::metatags();
SEOTools::twitter();
SEOTools::opengraph();
SEOTools::jsonLd();
SEOTools::setTitle($title, false);
SEOTools::setDescription($description);
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
->where('category_id', $category->id)

View File

@@ -10,7 +10,7 @@ class="nav-link px-2 text-body-secondary">Privacy</a></li>
<li class="nav-item"><a href="{{ route('front.disclaimer') }}"
class="nav-link px-2 text-body-secondary">Disclaimer</a></li>
<li class="nav-item"><a href="sitemap.xml" class="nav-link px-2 text-body-secondary">Sitemap</a></li>
<li class="nav-item"><a href="/feeds/posts-feed" class="nav-link px-2 text-body-secondary">RSS</a></li>
{{-- <li class="nav-item"><a href="/feeds/posts-feed" class="nav-link px-2 text-body-secondary">RSS</a></li> --}}
</ul>
<p class="text-center text-body-secondary">&copy; {{ date('Y') }} FutureWalker. All rights reserved.</p>

View File

@@ -20,3 +20,7 @@
</div>
</aside>
--}}
<div class="w-full text-center text-secondary">
<small class="text-center">AI & tech news syndication site built by <a href="https://x.com/charlestehio">@charlestehio</a>. All trademarks are the property of their respective owners.</small>
</div>

View File

@@ -19,7 +19,7 @@
<div class="text-center row justify-content-center">
<div class="col-12 col-md-10 col-lg-6">
<h2 class="h4 fw-semibold mb-3">Monitoring top tags for the past 24 hours</h2>
<h2 class="h4 fw-semibold mb-3">📡 Monitoring top tags for the past 24 hours</h2>
@foreach ($top_rss_keywords as $rss_keyword)
<a href="{{ get_route_search_result($rss_keyword->value_lowercased) }}"