Cara Mengatasi Breadcrumbs issue detected pada blog

Cara Mengatasi Breadcrumbs issue detected pada blog

Breadcrumbs issue detected

Nah!!Buat kamu yang belum mengetahui apa itu Breadcrumb. Breadcrumbs itu adalah sebuah navigasi pada blog yang mana membantu para pengunjung untuk memahami lokasi mereka saat berada dalam sebuah website.

Berikut ini adalah email notifikasi yang dikirim google karena adanya masalah breadcrumb pada blog saya ini.



Nah berikut ini adalah cara untuk mengatasi masalah breadcrumb langsung dibagikan oleh mas sugeng.


  • Pertama kamu harus login dahulu ke akun blog milik kamu
  • Klik menu Tema kemudian Edit HTML
  • Cari kode seperti berikut ini


<b:includable id='breadcrumb' var='posts'> ...sampai dengan penutup ... </b:includable>

Jika bingung gunakan fungsi Search dengan menekan tombol CTRL + F lalu copykan kode diatas
Kalau sudah ketemu, hapus kode tersebut dan ganti dengan kode berikut ini

<b:includable id='breadcrumb' var='posts'><b:if cond='data:view.isPost'><b:loop values='data:posts' var='post'><div class='breadcrumbs' itemscope='itemscope' itemtype='https://schema.org/BreadcrumbList'><span itemprop='itemListElement' itemscope='itemscope' itemtype='https://schema.org/ListItem'><a expr:href='data:blog.homepageUrl' itemprop='item' title='Home'><meta content='1' itemprop='position'/><span itemprop='name'><b:switch var='data:blog.locale'><b:case value='id'/>Beranda<b:default/>Home</b:switch></span></a></span><b:if cond='data:post.labels'><b:loop index='nomor' values='data:post.labels' var='label'> &amp;nbsp;&#8250;&amp;nbsp;<span itemprop='itemListElement' itemscope='itemscope' itemtype='https://schema.org/ListItem'><meta expr:content='data:nomor+2' itemprop='position'/><a expr:href='data:label.url + &quot;?&amp;max-results=8&quot;' expr:title='data:label.name' itemprop='item' rel='nofollow'><span itemprop='name'><data:label.name/></span></a></span></b:loop><b:else/>&amp;nbsp;&#8250;&amp;nbsp; <span itemprop='name'><data:blog.pageName/></span></b:if></div></b:loop><b:elseif cond='data:view.isPage'/><div class='breadcrumbs' itemscope='itemscope' itemtype='https://schema.org/BreadcrumbList'><span itemprop='itemListElement' itemscope='itemscope' itemtype='https://schema.org/ListItem'><a expr:href='data:blog.homepageUrl' itemprop='item' title='Home'><meta content='1' itemprop='position'/><span itemprop='name'><b:switch var='data:blog.locale'><b:case value='id'/>Beranda<b:default/>Home</b:switch></span></a></span> &amp;nbsp;&#8250;&amp;nbsp;<span itemprop='itemListElement' itemscope='itemscope' itemtype='https://schema.org/ListItem'><meta expr:content='data:num+2' itemprop='position'/><a expr:href='data:blog.url' expr:title='data:post.url' itemprop='item'><span itemprop='name'><data:blog.pageName/></span></a></span></div></b:if></b:includable>


Lalu klik Simpan tema Selesai.

Bagaimana  ?!!

Cukup mudahkan triknya yang dibagikan langsung tentang Bagaimana Cara Mengatasi Breadcrumb pada Blog, semoga apa yang saya posting hari ini dapat bermanfaat..



Visual Studio Code snippet fungsi php di blade laravel

Visual Studio Code snippet fungsi php di blade laravel  - Kode ini gunanya agar ketika menginstall extensionsnya laravel blade snippets di vscode milik onecentlin@gmail.com di link berikut :
https://github.com/onecentlin/laravel-blade-snippets-vscode  
autocomplete fungsi php tetap bisa muncul.

Saya cuma menghapus perintah agar extension ini tidak mengubah language nya menjadi blade, jadi lang nya tetap PHP.

Modif file package.json yang ada di 
C:\Users\nama-user\.vscode\extensions\onecentlin.laravel-blade-1.20.0\

jadi seperti ini :
{
    "name""laravel-blade",
    "displayName""Laravel Blade Snippets",
    "description""Laravel blade snippets and syntax highlight support",
    "version""1.20.0",
    "publisher""onecentlin",
    "author": {
        "name""Winnie Lin",
        "email""onecentlin@gmail.com",
        "url""https://devmanna.blogspot.com"
    },
    "homepage""https://github.com/onecentlin/laravel-blade-snippets-vscode",
    "repository": {
        "type""git",
        "url""https://github.com/onecentlin/laravel-blade-snippets-vscode"
    },
    "bugs": {
        "url""https://github.com/onecentlin/laravel-blade-snippets-vscode/issues"
    },
    "engines": {
        "vscode""^1.26.0"
    },
    "keywords": [
        "laravel",
        "blade",
        "template",
        "snippet",
        "formatter"
    ],
    "icon""images/icon.png",
    "galleryBanner": {
        "color""#f66f62",
        "theme""dark"
    },
    "categories": [
        "Programming Languages",
        "Snippets",
        "Formatters"
    ],
    "main""./out/src/extension",
    "scripts": {
        "build-srv""cd ./server && npm install && tsc -p ./",
        "vscode:prepublish""tsc -p ./ && pushd \"./\" && npm run build-srv && popd",
        "compile""tsc -watch -p ./",
        "postinstall""node ./node_modules/vscode/bin/install",
        "test""node ./node_modules/vscode/bin/test"
    },
    "contributes": {
        "grammars": [
            {
                "language""php",
                "scopeName""text.html.php.blade",
                "path""./syntaxes/blade.tmLanguage.json",
                "embeddedLanguages": {
                    "source.php""php",
                    "source.css""css",
                    "source.js""javascript"
                }
            }
        ],
        "snippets": [
            {
                "language""php",
                "path""./snippets/snippets.json"
            },
            {
                "language""php",
                "path""./snippets/helpers.json"
            }
        ],
        "configuration": {
            "title""Blade Configuration",
            "properties": {
                "blade.format.enable": {
                    "type""boolean",
                    "default"false,
                    "description""Enable format blade file"
                }
            }
        }
    },
    "activationEvents": [
        "onLanguage:blade"
    ],
    "devDependencies": {
        "@types/node""^8.0.17",
        "vscode""^1.1.33"
    },
    "dependencies": {
        "vscode-css-languageservice""^3.0.13",
        "vscode-html-languageservice""^2.1.12",
        "vscode-languageclient""^3.5.1",
        "vscode-languageserver-types""^3.14.0"
    },
    "__metadata": {
        "id""3b58a227-618a-4b57-a06b-6984a2a8d1ba",
        "publisherId""ae5a5701-dff3-41f0-bdb1-adbf4a18997b",
        "publisherDisplayName""Winnie Lin"
    }
}

Configuration Environment Variables - site header

Naming Conventions

The following is the generally accepted naming conventions being used by Laravel Community:

Controllers

Controller name MUST start with a noun (in singular form) followed by the word “Controller”.

Good
class ArticleController extends Controller
{
Bad
class ArticlesController extends Controller
{
class wp_articlesController extends Controller
{
class Article extends Controller
{

You SHOULD Use Resource Controllers unless you have any particular reason not to do so

Good
class DomainController extends Controller
{
    public function index(){} // list domains
    public function create(){} // show create form
    public function store(Request $request){ } // handle the form POST 
    public function show($id){} // show a single domain
    public function edit($id){} // show edit page
    public function update(Request $request, $id){} // handle show edit page POST
    public function destroy($id){} // delete a domain
}
Bad
class DomainController extends Controller
{
    public function list(){} // list domains
    public function create_or_save(){} // show create form then handle save
    public function show_edit($id){} // show a single domain then show edit page
    public function delete($id){} // delete a domain
}

Models

Model names MUST be in singular form with its first letter in uppercase

Good
class Flight extends Model
{
...
Bad
class Flights extends Model
{
...
class flight extends Model
{
...

hasOne or belongsTo relationship methods MUST be in singular form

Good
class User extends Model
{
    public function phone()
    {
        return $this->hasOne('App\Phone');
    }
}
Bad
class User extends Model
{
    public function phones()
    {
        return $this->hasOne('App\Phone');
    }
}

Any other relationships other than above MUST be in plural form

Good
class Post extends Model
{
    public function comments()
    {
        return $this->hasMany('App\Comment');
    }
}
Bad
class Post extends Model
{
    public function comment()
    {
        return $this->hasMany('App\Comment');
    }
}

Model properties should be in snake_case

Good
$user->created_at
Bad
$user->createdAt

Methods should be in camelCase

Good
class User extends Model
{
    public function scopePopular($query)
    {
        return $query->where('votes', '>', 100);
    }
Bad
class User extends Model
{
    public function scope_popular($query)
    {
        return $query->where('votes', '>', 100);
    }

Functions

Laravel comes with a lot of useful helper functions, but you can also define your own helper functions, given the following conditions:

You SHOULD place your custom helper functions by creating a file called helper.php

Good
project_folder/app/helper.php
project_folder/app/Http/helper.php
Bad
project_folder/functions.php

You MUST use Composer’s autolading capability to load your functions

Good
// file composer.json
...
"autoload": {
    "files": [
        "app/helpers.php"
    ],
...
Bad
// file app/Http/Controllers/HomeController.php

class HomeController.php
{
    function index(){
        require_once(app_path("helpers.php"));
    }
}

You MUST check if the the function exists before defining it

Good
if (! function_exists('my_custom_helper')) {
    function my_custom_helper($key, $default = null) {
        // ...
    }
}
Bad
function my_custom_helper($key, $default = null) {
    // ...
}

Other General guides with functions

  • If the function length exceeds 25 lines, you SHOULD break it down to multiple functions
  • Each function SHOULD have a Unit Test associated with it

Routes

Routes should be in plural form of the resource it is trying to manipulate and SHOULD be all lower-case

Good
Route::get('/users', 'UserController@index');
Route::resource('photos', 'PhotoController');
Bad
Route::get('/user', 'UserController@index');
Route::get('/UsersList', 'UserController@index');
Route::resource('PHOTO', 'PhotoController');

Named Routes SHOULD use snake_case and dot notation

Good
Route::get('/user', 'UserController@active')->name('users.show_active');
Bad
Route::get('/user', 'UserController@active')->name('users.show-active');
Route::get('/user', 'UserController@active')->name('show-active-users');

Variables

General rule for variable is it SHOULD be in camelCase

Good
$articlesWithAuthor
Bad
$articles_with_author

Collection names SHOULD be descriptive and in plural form

Good
$activeUsers = User::active()->get()
Bad
$users = User::active()->get()
$user = User::active()->get()
$User = User::active()->get()

Single Object SHOULD be descriptive and in singular form

Good
$activeUser = User::active()->first()
Bad
$users = User::active()->first()

Views

You SHOULD use snake_case as file name of your Blade templates

Good
show_filtered.blade.php
Bad
showFiltered.blade.php
show-filtered.blade.php
Good
// $api_results is passed by controller
<ul>  
    @foreach($api_results as $result)
        <li>{{ $result->name }}</li>
    @endforeach
</ul>

Bad
@php
   $api_results = json_decode(file_get_contents("https://api.example.com"));
@endphp
<ul>
    @foreach($api_results as $result)
        <li>{{ $result->name }}</li>
    @endforeach
</ul>


refrences : https://www.laravelbestpractices.com/#site-header