sanduhrs / microformats2 Goto Github PK
View Code? Open in Web Editor NEWMarkup your Drupal entities with microformats2.
Home Page: http://microformats.org/wiki/microformats2
Markup your Drupal entities with microformats2.
Home Page: http://microformats.org/wiki/microformats2
microformats2 ------------- This module provides a way to markup your entities with microformats2. It therefore wraps a field's content into a span or div with the corresponding classes. Installation ------------ 1. Normal Drupal module installation See https://www.drupal.org/documentation/install/modules-themes 2. Create some fields with Content you want to markup with microformats2 Optional dependencies --------------------- 3. You may use the field_group module to group fields into formats See https://www.drupal.org/project/field_group Supported third parties ----------------------- 4. You may use addressfield module to markup addresses See https://www.drupal.org/project/addressfield 5. You may use title module to markup core pseudo fields See https://www.drupal.org/project/title Usage ----- At the time being there is no ui to control the mapping. Instead use drush to save the mapping to a variable. php -r "print json_encode(array('field_name', 'microformats2_property_name'));" | drush vset --format=json Markup a simple microformats2 h-card ------------------------------------ * Download and enable field_group module `drush en -y field_group` * Create a field_group named `group_hcard` * Create a field named `field_given_name` * Create a field named `field_family_name` * Move the two fields into the field group * Mark up the information with microformats2 php -r "print json_encode(array('group_hcard' => array('format' => 'h-card'), 'field_given_name' => 'p-given-name', 'field_family_name' => 'p-family-name'));" | drush vset --format=json Markup a more complex microformats2 h-card ------------------------------------------ * Download and enable addressfield module `drush en -y addressfield` * Create a addressfield named `field_address` * Move it into the previously created `group_hcard` * Mark up the information with microformats2 drush vset --format=json microformats2_mapping `php -r "print json_encode(array('group_hcard' => array('format' => 'h-card'), 'field_full_name' => 'p-name', 'field_given_name' => 'p-given-name', 'field_family_name' => 'p-family-name', 'field_address' => array('format' => 'h-adr', 'properties' => array('organisation_block|organisation_name' => 'p-label', 'name_block|name_line' => 'p-label', 'street_block|thoroughfare' => 'p-street-address', 'street_block|premise' => 'p-extended-address', 'locality_block|postal_code' => 'p-postal-code', 'locality_block|locality' => 'p-locality', 'locality_block|dependent_locality' => 'p-locality', 'locality_block|administrative_area' => 'p-locality', 'country' => 'p-country-name'))));"`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.