All Projects → KodiCMS → laravel-assets

KodiCMS / laravel-assets

Licence: GPL-2.0 license
Laravel Assets manager

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-assets

Awesome-meta-tags
📙 Awesome collection of meta tags
Stars: ✭ 18 (+38.46%)
Mutual labels:  meta, seo, seo-meta, meta-tags
Magento 2 Seo
Magento 2 SEO extension will do perfectly for your better SEO. This is a bundle of outstanding features that are auto-active when you install it from Mageplaza without any code modifications. It is also friendly with your store if you need to insert meta keywords and meta descriptions for your product.
Stars: ✭ 99 (+661.54%)
Mutual labels:  meta, seo, meta-tags
Ngx Meta
Dynamic page title & meta tags utility for Angular (w/server-side rendering)
Stars: ✭ 331 (+2446.15%)
Mutual labels:  meta, seo, meta-tags
Seotools
SEO Tools for Laravel
Stars: ✭ 2,406 (+18407.69%)
Mutual labels:  seo, seo-meta, meta-tags
Laravelmetatags
The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project
Stars: ✭ 226 (+1638.46%)
Mutual labels:  meta, seo, meta-tags
Meta Tags
Search Engine Optimization (SEO) for Ruby on Rails applications.
Stars: ✭ 2,464 (+18853.85%)
Mutual labels:  seo, seo-meta, meta-tags
Seo Manager
Seo Manager Package for Laravel ( with Localization )
Stars: ✭ 192 (+1376.92%)
Mutual labels:  meta, seo
SeoTags
SeoTags create all SEO tags you need such as meta, link, twitter card (twitter:), open graph (og:), and JSON-LD schema (structred data).
Stars: ✭ 113 (+769.23%)
Mutual labels:  seo, seo-meta
Silverstripe-SEO
A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content
Stars: ✭ 41 (+215.38%)
Mutual labels:  meta, seo
laravel-meta
💥 Render meta tags within your Laravel application
Stars: ✭ 36 (+176.92%)
Mutual labels:  meta, meta-tags
svelte-seo
Optimize your website for search engines and social media with meta tags, Open Graph, and JSON-LD.
Stars: ✭ 257 (+1876.92%)
Mutual labels:  seo, meta-tags
seo-genius
Lightweight WordPress SEO plugin
Stars: ✭ 15 (+15.38%)
Mutual labels:  seo, seo-meta
Craft Seomatic
SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
Stars: ✭ 135 (+938.46%)
Mutual labels:  meta, seo
Vue Meta
Manage HTML metadata in Vue.js components with SSR support
Stars: ✭ 3,807 (+29184.62%)
Mutual labels:  meta, seo
vuepress-plugin-autometa
Auto meta tags plugin for VuePress 1.x
Stars: ✭ 40 (+207.69%)
Mutual labels:  meta, meta-tags
classicpress-seo
Classic SEO is the first SEO plugin built specifically to work with ClassicPress. A fork of Rank Math, the plugin contains many essential SEO tools to help optimize your website.
Stars: ✭ 18 (+38.46%)
Mutual labels:  seo, seo-meta
drupal 8 unset html head link
🤖 Module for unset any wrong HTML links (like rel="delete-form", rel="edit-form", etc.) from head on Drupal 8.x websites. This is trust way to grow up position in SERP Google, Yandex, etc.
Stars: ✭ 19 (+46.15%)
Mutual labels:  seo, seo-meta
assetic
Asset Management for PHP
Stars: ✭ 61 (+369.23%)
Mutual labels:  assets, assets-management
Asset Packagist
Asset Packagist
Stars: ✭ 235 (+1707.69%)
Mutual labels:  assets, assets-management
Seo Helper
🔍 SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization).
Stars: ✭ 262 (+1915.38%)
Mutual labels:  meta, seo

!!! This project is not maintained anymore. Please use this package https://github.com/butschster/LaravelMetaTags !!!

Laravel Assets

Build Status StyleCI

Установка

Для установки пакета вы можете выполнить консольную команду

composer require kodicms/laravel-assets

Или добавить пакет в composer.json

{
  "require": {
    ...
    "kodicms/laravel-assets": "~0.6"
    ...
  }
}

Добавить в загрузку сервис провайдер

'providers' => [
  ...
  KodiCMS\Assets\AssetsServiceProvider::class,
  ...
],
'aliases' => [
  ...
  'Assets' => KodiCMS\Assets\Facades\Assets::class,
  'PackageManager' => KodiCMS\Assets\Facades\PackageManager::class,
  'Meta' => KodiCMS\Assets\Facades\Meta::class,
  ...
]

Использование

Формирование пакетов

PackageManager::add('jquery')
	->js(null, 'https://code.jquery.com/jquery-2.1.4.min.js');

PackageManager::add('jquery-ui')
	->js(null, 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js', 'jquery')
	->css(null, 'https://code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css');

PackageManager::add('custom')
	->js(null, '...')
	->js('custom.second.js', '...', 'custom')
	->css(null, '...')
	->css('custom.second.css', '...');

Добавление данных в вывод

Формировать мета данные для вывода можно не только в шаблоне, но и непосредственно коде приложения

use KodiCMS\Assets\Contracts\SocialMediaTagsInterface;

class Article extends Model implements SocialMediaTagsInterface
{
	...
}

use Meta;

class ArticleController extends Controller
{
	public function show($articleId)
    {
        $article = Article::find($articleId);

        Meta::loadPackage('jquery')
        	->addSocialTags($article);

		Meta::addCss('style', url('css/style.css'));
		Meta::addJs('scripts', url('js/scripts.js'), 'jquery');

		Meta::addJsElixir();
		...
    }
}

Вывод

Для вывода css и js в шаблон сайта используется класс Meta.

<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
	{!!
		Meta::setFavicon('favicon.ico')
			// Подключение файлов из пакетов
			->loadPackage('jquery', 'jquery-ui', 'custom')

			// Meta title
			->setTitle('Hello world')
		    ->setMetaDescription('Meta description')
		    ->setMetaKeywords('Meta keywords')
		    ->setMetaRobots('Meta robots')

		    // Alternative meta title
			->setMetaData(MetaDataInterface $data)

			// Social tags
		    ->addSocialTags(SocialMediaTagsInterface $socialTags)

		    // Custom tag
		    ->addMeta([
				'property' => 'og:title',
				'content'  => 'Title',
				'name' => 'og:title'
			])

			->render()
	!!}
</head>

Вывод списка пакетов

php artisan assets:packages

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].