Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiriksm/twigjs-drupal8
Testing twig.js with Drupal 8
https://github.com/eiriksm/twigjs-drupal8
Last synced: 3 months ago
JSON representation
Testing twig.js with Drupal 8
- Host: GitHub
- URL: https://github.com/eiriksm/twigjs-drupal8
- Owner: eiriksm
- Created: 2015-01-03T16:06:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-14T18:34:43.000Z (over 8 years ago)
- Last Synced: 2024-05-02T06:06:28.298Z (8 months ago)
- Language: JavaScript
- Size: 289 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
twigjs-drupal8
==============
[![Build Status](https://travis-ci.org/eiriksm/twigjs-drupal8.svg?branch=master)](https://travis-ci.org/eiriksm/twigjs-drupal8)
[![Code Climate](http://img.shields.io/codeclimate/github/eiriksm/twigjs-drupal8.svg)](https://codeclimate.com/github/eiriksm/twigjs-drupal8)
[![devDependency Status](https://david-dm.org/eiriksm/twigjs-drupal8/dev-status.svg)](https://david-dm.org/eiriksm/twigjs-drupal8#info=devDependencies)Working theme for Drupal 8 that uses twig for templates both server side and client side.
First page load is a regular one. You get the page as rendered by Drupal.
Subsequent clicks on either the or logo or site name will load the /node page via a view with a REST output. Clicks on nodes will load the node via the REST module.
## Installation
- Install Drupal as usual.
- Enable the required modules and this theme (for example with drush: `drush en hal rest twigjs_drupal8 -y`)
- Grant the permission of requesting nodes via REST to anonymous users: (for example with drush: `drush rap "anonymous" "restful get entity:node" -y`)
- Set this theme as the default one: (for example with drush: `drush cset system.theme default twigjs_drupal8 -y`)
- Probably disable some blocks that clutters up the page.
- Generate some content (For example with devel generate and drush: `drush en devel devel_generate -y && drush genc 10`).## Demo
There is a demo site of this theme up at [https://dev-twigjs-drupal8.pantheon.io](https://dev-twigjs-drupal8.pantheon.io)## Quirks, bugs, hacks
This is just a quick proof of concept. Quite often you want to combine this maybe with a framework, and maybe not brute-force all those events onto the elements. Also, this has not been tested in other browsers than Chrome and Firefox. Your milage may vary.Things that are not implemented at all:
- Pager on the front page.
- Reattach quick edit links and events.
- Translation of templates.
- Probably a whole lot more.So keep that in mind. This is just a quick hack and not production code.
## Contribute?
If you want to help implement some of these things in the demo, that sounds swell. Pull requests welcome.