bmarwell / webtrees-jsonld

Implementation for application/ld+json-output in webtrees' person/individual view.
GNU General Public License v3.0
2 stars 0 forks source link

json-ld module for webtrees

Contents

Introduction

This module for webtrees will generate json-ld-compatible code für bots, search engines, spiders and other engines. For more information visit schema.org or json-ld.org.

Installation

  1. Copy the folder src/jsonld (only the subfolder) to your webtrees/modules_v3-folder.
  2. Go to the admin menu and modules, then enable the JsonLD-Module.

Update

If you have a previous version of JsonLD installed, remove the folder modules_v4/jsonld. The new Foldername reflects the title (which has capital letters). Otherwise, this plugin will not work!

Verification

To see if it works, open up the Google Structured Data Testing Tool and paste the url of any public individual. You should also see a new tab on individuals, containing the hidden source code and also the human-readable version inside a html pre-tag.

If you use curl, you can do sth. like this:

curl -so - "http://​path.to/​webtrees/​individual.​php?​pid=I1&​ged=AllGED" | \
    xmllint --html --xpath "//​script[@​id='json-​ld-​data']/​text()" - 2>/dev/null | \
    jq -C '.​'

Links

License

webtrees json-ld: online genealogy json-ld-module. Copyright (C) 2015 webtrees development team

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.