Skip to content

Instantly share code, notes, and snippets.

View vuchkov's full-sized avatar
😀

Ilcho Vuchkov vuchkov

😀
View GitHub Profile
@vuchkov
vuchkov / breadcrumb.html.twig
Created October 7, 2021 13:35 — forked from thejimbirch/breadcrumb.html.twig
Add Schema.org BreadcrumbList inline in Drupal 8+ in your theme's templates.
{#
/**
* @file
* Theme override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
{% if breadcrumb %}
@vuchkov
vuchkov / __INDEX.txt
Created November 11, 2020 08:25 — forked from facine/__INDEX.txt
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@vuchkov
vuchkov / web-servers.md
Created January 28, 2020 20:59 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@vuchkov
vuchkov / drupalci.yml
Created October 1, 2019 11:19 — forked from josephdpurcell/drupalci.yml
Drupal 9 compatibility drupalci-.yml
# This file customizes the steps that DrupalCI will use when testing this project.
#
# The primary customization provided here is to check for deprecation errors. It is recommended
# to do this only when you've used https://github.com/mglaman/drupal-check/ to verify any
# existing deprecation errors are addressed.
#
# Learn to make one for your own drupal.org project:
# https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-testing
build:
assessment:
@vuchkov
vuchkov / .htaccess
Created August 1, 2019 09:15 — forked from Guibzs/.htaccess
Symfony 4 ~ .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
@vuchkov
vuchkov / integrating_wordpress_with_composer.md
Last active February 11, 2019 20:49 — forked from CMCDragonkai/integrating_wordpress_with_composer.md
Integrating Wordpress with Composer #php #wordpress

Integrating Wordpress with Composer

Setup the project directory:

mkdir wordpress-composer
cd wordpress-composer
@vuchkov
vuchkov / CommunityLinksQuery.php
Created February 8, 2019 13:24 — forked from JeffreyWay/CommunityLinksQuery.php
Consider Query Objects source.
<?php
namespace App\Queries;
use App\CommunityLink;
class CommunityLinksQuery
{
/**
* Fetch all relevant community links.
@vuchkov
vuchkov / custom_twig.info.yml
Created January 31, 2019 13:05 — forked from mariacha/custom_twig.info.yml
Custom Twig functions Drupal 8
name: Custom twig
type: module
description: Custom Twig functions
core: 8.x
package: Custom