Skip to content

Instantly share code, notes, and snippets.

@markhuot
markhuot / EntryQueryBehavior.php
Created September 29, 2022 16:29
Craft Behaviors for Entry Query
<?php
namespace modules\behaviors;
use yii\base\Behavior;
class EntryQuery extends Behavior
{
function popular()
{
@markhuot
markhuot / gist:fc255080645eb9eae9f3
Created February 2, 2015 16:49
default.settings.php
<?php
/**
* @file
* Drupal site-specific configuration file.
*
* IMPORTANT NOTE:
* This file may have been set to read-only by the Drupal installation program.
* If you make changes to this file, be sure to protect it again after making
* your modifications. Failure to remove write permissions to this file is a
@markhuot
markhuot / gist:9398909
Last active September 29, 2022 17:51
Enhanced Markdown

The following is an idea for an enhancement to Markdown that allows for "YAML frontmatter" intersperced throughout the document. This will allow you to write standard markdown while also supporting more complex data types where necessary.

The idea incldues the ability to "class" your YAML to a specific object type. For example, what follows is an image object that would be rendered according to the specs of the rendering engine.

----image
src: /path/to/image.png
caption: some markdown [caption](#)
credit: a person's name
----