This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Initially 'app_raw.blade.php' (see the next code) now broken into 3 templates: | |
i. app.blade.php (will yield contents of the optmization) | |
ii. _metas.blade.php (main section for the optimization) | |
iii. _assets.blade.php (not important in our case) | |
--> | |
<!doctype html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
@include('layouts._metas') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- 1. General Tags --> | |
<title>{{ config('app.name') }}</title> | |
<meta name="description" content="@yield('meta-description')"> | |
<meta name="keywords" content="@yield('meta-keywords')"> | |
<!-- 2. Microformat Markup --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('title', $post->title) | |
@section('meta-description', $post->meta_description) // or $post->metaDescription() if generated from a method | |
@section('meta-keywords', $post->meta_keywords) // or $post->metaKeywords() | |
@section('meta-image', $post->meta_image) // or $post->metaImage() | |
@section('meta-og-url', route('posts.show', $post->slug)) | |
@section('author-tw-handle', $post->user->twitterHandle) | |
@section('content') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The variables and constants listed below were referenced witihn the _metas template. | |
Variables (to be supplied on the relevant pages) | |
- @yield('title') | |
- @yield('meta-description') | |
- @yield('meta-keywords') | |
- @yield('meta-image') | |
- @yield('meta-og_url') | |
- @yield('author-tw-handle') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits\ViewRepos; | |
use Illuminate\Http\Request; | |
/** | |
* Given a post has properties such as County, State, Country. | |
* You may want to captivate audience from a particular locality | |
* with descriptions and keywords as dynamic the methods below: | |
*/ | |
trait PostViewFragment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NB: The values below should be generated dynamically but for our purpose this will work just fine. | |
To be supplied within individual page templates | |
-------------------------------------------------------- | |
KEYs | VALUES | |
---------------------+---------------------------------- | |
- title = "Link Preview Customizations On Dynamic Websites — A Basic Onpage SEO for Web Developers" | |
- meta-description = "Learn to customize link previews for your dynamic website." | |
- meta-keywords = "SEO, link preview, link preview optimization, SEO for web developers" | |
- meta-image = "https://cdn-images-1.medium.com/max/1200/1*cTq1xTowzbV37I8KlKhJGA.jpeg" | |
- meta-og_url = "https://medium.com/@tonyfrenzy/scaffolding-a-dynamic-website-with-basic-onpage-seo-web-developers-8b571c58ffe7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('title', 'Link Preview Customizations On Dynamic Websites — A Basic Onpage SEO for Web Developers') | |
@section('meta-description', 'Learn to customize link previews for your dynamic website.') | |
@section('meta-keywords', 'SEO, link preview, link preview optimization, SEO for web developers') | |
@section('meta-image', 'https://cdn-images-1.medium.com/max/1200/1*cTq1xTowzbV37I8KlKhJGA.jpeg') | |
@section('meta-og-url', 'https://medium.com/@tonyfrenzy/scaffolding-a-dynamic-website-with-basic-onpage-seo-web-developers-8b571c58ffe7') | |
@section('author-tw-handle', '@_tonyfrenzy') | |
@section('content') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- 1. General tags --> | |
<title>Medium</title> | |
<meta name="description" content="Learn to customize link previews for your dynamic website."> | |
<meta name="keywords" content="SEO, link preview, link preview optimization, SEO for web developers"> | |
<!-- 2. Schema.org Microformat Markup --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section itemscope itemtype="http://schema.org/Person"> | |
Hello, my name is <span itemprop="name">John Doe</span>, I am a <span itemprop="jobTitle">graduate research assistant</span> at the <span itemprop="affiliation">University of Dreams</span>. My friends call me <span itemprop="additionalName">Johnny</span>. | |
You can visit my homepage at <a href="http://www.JohnnyD.com" itemprop="url">www.JohnnyD.com</a>. | |
<section itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">I live at <span itemprop="streetAddress">1234 Peach Drive</span>, <span itemprop="addressLocality">Warner Robins</span>, | |
<span itemprop="addressRegion">Georgia</span>. | |
</section> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Schema code seperated from HTML code --> | |
<script type="application/ld+json"> | |
{ | |
"@context":"https://schema.org", | |
"@type": "Person", | |
"name": "John Doe", | |
"additionalName": "Johnny", | |
"jobTitle": "graduate research assistant", |
OlderNewer