dev-master
9999999-dev
GPL-2.0-or-later
The Requires
by Tim Otten
Drupal is well and good, but I don't like editing pages in a web UI. Or storing them in MySQL. Or configuring workflows. Is that a problem? Can I still use Drupal?, (*1)
Mr. Hyde is the evil version of Dr. Jekyll --
it's a Drupal module that lets you create Markdown files and store them in a git
repo... but it displays them as pages in a Drupal site. This allows you to use
Drupal's general layout engine (themes and blocks) while tracking content in
git
(and using stock workflows like Github PR's or Gitlab MR's)., (*2)
$ cd sites/all/modules $ git clone https://github.com/totten/hyde $ cd hyde $ composer install $ drush en hyde
Note: It should be OK to install via
composer require totten/hyde
, but I haven't done enough with D7+Composer to speak to that., (*3)
$ cd <drupal-private-data-folder> $ mkdir hyde $ cd hyde
Of course, this folder should probably be a git repo. You could initialize a
new repo here (git init
) or clone an existing repo., (*4)
Tip: If you want to store content in another folder, override the value of
hyde_path
by callingdrush vset hyde_path /path/to/doc/root
or editingsettings.php
., (*5)
$ echo "Hello __world__" > hello-world.md $ drush cc all $ curl https://example.org/hello-world $ git add hello-world.md $ git commit
In Jekyll syntax, a Markdown file can begin with a YAML metadata. In this
example, we set the title
of the HTML page with a little extra metadata:, (*6)
--- title: "The future of old school content" --- # Old is the new new Because sometimes you like to write content in a simple way. # Git is the new CMS Because sometimes you like to write content in a simple way.
Supported fields:, (*7)
title
: The main HTML page titleThere are several things that one might do if they really cared about this. Right now, I'm trying to write this quickly, so I don't really care., (*8)
hyde_path
body
via CLI or GUI. If a file is not writeable, then don't.This repo is a safe space for godawful code that I wrote in 15 minutes after drinking some beer., (*9)
GPL-2.0-or-later