{"id":3579,"date":"2015-07-13T08:14:27","date_gmt":"2015-07-13T12:14:27","guid":{"rendered":"https:\/\/matbury.wordpress.com\/?p=3579"},"modified":"2015-07-13T08:14:27","modified_gmt":"2015-07-13T12:14:27","slug":"adding-bibliography-metadata-to-your-web-pages","status":"publish","type":"post","link":"https:\/\/matbury.com\/wordpress\/index.php\/2015\/07\/13\/adding-bibliography-metadata-to-your-web-pages\/","title":{"rendered":"Adding bibliography metadata to your web pages"},"content":{"rendered":"<p style=\"text-align: justify;\"><strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Open_access\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" class=\"alignright size-full wp-image-3580\" src=\"https:\/\/matbury.com\/wordpress\/wp-content\/uploads\/2015\/07\/320px-Books.jpg\" alt=\"320px-Books\" width=\"320\" height=\"240\" \/>Open Access<\/a>\u00a0<\/strong><strong>publishing is gaining popularity and, at the same time, increasing numbers of academics are uploading their papers on their personal websites, faculty pages, and blogs. This is great news for people who don&#8217;t have the luxury of an institution to pay for their access to the usually pay-walled research databases. Along with this positive development, I think\u00a0providing\u00a0bibliographical\u00a0metadata in academic websites and blogs should become more of a priority. It is necessary for bibliography managers such as <a href=\"https:\/\/www.mendeley.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Mendeley<\/a> and <a href=\"https:\/\/www.zotero.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Zotero<\/a> to quickly, easily, and accurately store, retrieve, and reference\u00a0academic papers, which can save other academics, science writers, journalists, and students hours of work for each paper or article they write. If academic websites and blogs provide the metadata to support bibliography managers, it means that it&#8217;s that much easier for people to cite their\u00a0research and provide links back to their\u00a0websites, faculty pages, or\u00a0blogs.\u00a0However, unlike research databases, most websites, faculty pages, and blogs don&#8217;t usually provide this bibliographical\u00a0metadata.<\/strong><\/p>\n<h3 style=\"text-align: justify;\">What is bibliographic\u00a0metadata?<\/h3>\n<p style=\"text-align: justify;\">Metadata is intended for machines, rather than people to read. Bibliographic metadata tells bibliography managers and search engines\u00a0by whom, when, where, what, and how\u00a0an\u00a0article or paper was published and makes it easier for people to find through title, author, subject, and keyword searches.<\/p>\n<h3 style=\"text-align: justify;\">Can we embed it in a blog?<\/h3>\n<p style=\"text-align: justify;\">I use\u00a0<a href=\"https:\/\/wordpress.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress<\/a> (this blog is built on my own customised version of WordPress) and it&#8217;s the most widely used and popular blogging software on the internet. While there&#8217;s a large and diverse range of plugins and extensions available, a search shows that while there are <a href=\"https:\/\/wordpress.org\/plugins\/search.php?q=metadata\" target=\"_blank\" rel=\"noopener noreferrer\">several that provide metadata<\/a> for <a href=\"https:\/\/en.wikipedia.org\/wiki\/Search_engine_optimization\" target=\"_blank\" rel=\"noopener noreferrer\">search engine optimisation<\/a> (SEO), few offer support for bibliography managers, and none of the ones I&#8217;ve found support the minimum required metadata for academic citations. In order to find out how difficult or easy embedding metadata is, I tried an experiment on this blog to automatically generate as much relevant metadata from standard WordPress format blog posts as possible.<\/p>\n<h3 style=\"text-align: justify;\">What does academic bibliography\u00a0metadata look like?<\/h3>\n<p style=\"text-align: justify;\">Here&#8217;s an example metadata set for a published academic paper in an academic journal database (Applied Linguistics, Oxford Journals):<\/p>\n<pre id=\"line1\">&lt;!-- start of citation metadata --&gt;\n&lt;meta content=\"\/applij\/4\/1\/23.atom\" name=\"HW.identifier\" \/&gt;\n&lt;meta name=\"DC.Format\" content=\"text\/html\" \/&gt;\n&lt;meta name=\"DC.Language\" content=\"en\" \/&gt;\n&lt;meta content=\"Analysis-by-Rhetoric: Reading the Text or the Reader's Own Projections? A Reply to Edelsky et al.1\" name=\"DC.Title\" \/&gt;\n&lt;meta content=\"10.1093\/applin\/4.1.23\" name=\"DC.Identifier\" \/&gt;\n&lt;meta content=\"1983-03-20\" name=\"DC.Date\" \/&gt;\n&lt;meta content=\"Oxford University Press\" name=\"DC.Publisher\" \/&gt;\n&lt;meta content=\"JIM CUMMINS\" name=\"DC.Contributor\" \/&gt;\n&lt;meta content=\"MERRILL SWAIN\" name=\"DC.Contributor\" \/&gt;\n&lt;meta content=\"Applied Linguistics\" name=\"citation_journal_title\" \/&gt;\n&lt;meta content=\"Applied Linguistics\" name=\"citation_journal_abbrev\" \/&gt;\n&lt;meta content=\"0142-6001\" name=\"citation_issn\" \/&gt;\n&lt;meta content=\"1477-450X\" name=\"citation_issn\" \/&gt;\n&lt;meta name=\"citation_author\" content=\"JIM CUMMINS\" \/&gt;\n&lt;meta name=\"citation_author\" content=\"MERRILL SWAIN\" \/&gt;\n&lt;meta content=\"Analysis-by-Rhetoric: Reading the Text or the Reader's Own Projections? A Reply to Edelsky et al.1\" name=\"citation_title\" \/&gt;\n&lt;meta content=\"03\/20\/1983\" name=\"citation_date\" \/&gt;\n&lt;meta content=\"4\" name=\"citation_volume\" \/&gt;\n&lt;meta content=\"1\" name=\"citation_issue\" \/&gt;\n&lt;meta content=\"23\" name=\"citation_firstpage\" \/&gt;\n&lt;meta content=\"41\" name=\"citation_lastpage\" \/&gt;\n&lt;meta content=\"4\/1\/23\" name=\"citation_id\" \/&gt;\n&lt;meta content=\"4\/1\/23\" name=\"citation_id_from_sass_path\" \/&gt;\n&lt;meta content=\"applij;4\/1\/23\" name=\"citation_mjid\" \/&gt;\n&lt;meta content=\"10.1093\/applin\/4.1.23\" name=\"citation_doi\" \/&gt;\n&lt;meta content=\"http:\/\/0-applij.oxfordjournals.org.aupac.lib.athabascau.ca\/content\/4\/1\/23.full.pdf\" name=\"citation_pdf_url\" \/&gt;\n&lt;meta content=\"http:\/\/0-applij.oxfordjournals.org.aupac.lib.athabascau.ca\/content\/4\/1\/23\" name=\"citation_public_url\" \/&gt;\n&lt;meta name=\"citation_section\" content=\"Article\" \/&gt;\n&lt;!-- end of citation metadata --&gt;<\/pre>\n<p>An APA Style (6th Edition) formatted citation from this metadata would look like this:<\/p>\n<div class=\"csl-bib-body\">\n<div class=\"csl-entry\">Cummins, J., &amp; Swain, M. (1983). Analysis-by-Rhetoric: Reading the Text or the Reader\u2019s Own Projections? A Reply to Edelsky et al.1. <i>Applied Linguistics<\/i>, <i>4<\/i>(1), 23\u201341. http:\/\/doi.org\/10.1093\/applin\/4.1.23<\/div>\n<\/div>\n<h3>How can I add bibliographic metadata to my website or blog?<\/h3>\n<p style=\"text-align: justify;\">If you use WordPress, you&#8217;re in luck. I&#8217;ve made some modifications to my WordPress theme so that the appropriate bibliographic metadata is automatically added to the head section of each blog article.<\/p>\n<h4 style=\"text-align: justify;\">Pre-requisites<\/h4>\n<ul>\n<li style=\"text-align: justify;\">A good FTP client. <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Filezilla<\/a> is a good free and open source one. \u00a0<a href=\"https:\/\/netbeans.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Netbeans<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.adobe.com\/ca\/products\/dreamweaver.html\" target=\"_blank\" rel=\"noopener noreferrer\">Dreamweaver<\/a>\u00a0have\u00a0FTP clients built in. If you&#8217;ve never used an FTP client before, look up some beginner tutorials to learn the basics of editing remote server files.<\/li>\n<li style=\"text-align: justify;\">FTP access and login credentials to the\u00a0web server where your blog is hosted.<\/li>\n<li style=\"text-align: justify;\">A good text editor, e.g. <a href=\"https:\/\/notepad-plus-plus.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Notepad++<\/a>, <a href=\"http:\/\/notepadqq.altervista.org\/wp\/\" target=\"_blank\" rel=\"noopener noreferrer\">Notepadqq<\/a>,\u00a0<a href=\"https:\/\/wiki.gnome.org\/Apps\/Gedit\" target=\"_blank\" rel=\"noopener noreferrer\">Gedit<\/a>, <a href=\"http:\/\/www.gnu.org\/software\/emacs\/\" target=\"_blank\" rel=\"noopener noreferrer\">GNU Emacs<\/a>, etc., or an HTML integrated development environment, e.g. <a href=\"https:\/\/netbeans.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Netbeans<\/a>,\u00a0<a href=\"http:\/\/brackets.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Brackets<\/a>, or <a href=\"http:\/\/www.adobe.com\/ca\/products\/dreamweaver.html\" target=\"_blank\" rel=\"noopener noreferrer\">Dreamweaver<\/a>.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">The metadata format for blogs is a little different from academic metadata, i.e. it uses the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dublin_Core\" target=\"_blank\" rel=\"noopener noreferrer\">Dublin Core<\/a> standard, but thee principles are similar. Here&#8217;s what I did:<\/p>\n<ul>\n<li style=\"text-align: justify;\">I chose an existing WordPress core theme, <em><a href=\"https:\/\/wordpress.org\/themes\/twentytwelve\/\" target=\"_blank\" rel=\"noopener noreferrer\">twentytwelve<\/a><\/em>, (but this should work with any theme) and created a child-theme: I created a new directory in <em>\/wordpress\/wp-content\/themes\/twentytwelve-child\/\u00a0<\/em>WordPress automatically replaces files in themes with any files provided in child theme directories.<\/li>\n<li style=\"text-align: justify;\">I made a copy of the <em>header.php<\/em> file from\u00a0\/<em>twentytwelve\/ <\/em>and pasted it at\u00a0<em>\/wordpress\/wp-content\/themes\/twentytwelve-child\/header.php<\/em><\/li>\n<li style=\"text-align: justify;\">In a text editor, I opened the new\u00a0<em>header.php<\/em>\u00a0file and added the following lines of code between the PHP tags at the top of the page. This retrieves the metatdata from WordPress&#8217; database:<\/li>\n<\/ul>\n<pre>\/\/ Set post author display name\n$post_tmp = get_post($post_id);\n$user_id = $post_tmp-&gt;post_author;\n$first_name = get_the_author_meta('display_name',$user_id);\n\/\/ Set more metadata values\n$twentytwelve_data-&gt;blogname = get_bloginfo('name'); \/\/ The title of the blog\n$twentytwelve_data-&gt;language = get_bloginfo('language'); \/\/ The language the blog is in\n$twentytwelve_data-&gt;author = $first_name; \/\/'Matt Bury'; \/\/ The article author's name\n$twentytwelve_data-&gt;date = get_the_date(); \/\/ The article publish date\n$twentytwelve_data-&gt;title = get_the_title(); \/\/ The title of the article\n$twentytwelve_data-&gt;permalink = get_the_permalink(); \/\/ The permalink to the article\n$twentytwelve_data-&gt;description = substr(strip_tags($post_tmp-&gt;post_content),0,1000) . '...'; \/\/ Take 1st 1000 characters of article as description<\/pre>\n<ul>\n<li style=\"text-align: justify;\">After that, in the same <em>header.php<\/em> file, between\u00a0the &lt;head&gt; &lt;\/head&gt;\u00a0tags, I added the following lines of HTML and PHP code. This prints the metadata on the article page. Please note that metadata is not visible when you read the web page because it&#8217;s for machines, not people to read. You can view it in the page source code (<em>Ctrl + u<\/em> in Firefox and Google Chrome):<\/li>\n<\/ul>\n<pre>&lt;!-- start of citation metadata --&gt;\n&lt;meta name=\"DC.Contributor\" content=\"\" \/&gt;\n&lt;meta name=\"DC.Copyright\" content=\"\u00a9 &lt;?php echo $twentytwelve_data-&gt;author; ?&gt; &lt;?php echo $twentytwelve_data-&gt;date; ?&gt;\" \/&gt;\n&lt;meta name=\"DC.Coverage\" content=\"World\"&gt;\n&lt;meta name=\"DC.Creator\" content=\"&lt;?php echo $twentytwelve_data-&gt;author; ?&gt;\" \/&gt;\n&lt;meta name=\"DC.Date\" content=\"&lt;?php echo $twentytwelve_data-&gt;date; ?&gt;\" \/&gt;\n&lt;meta name=\"DC.Description\" content=\"&lt;?php echo $twentytwelve_data-&gt;description; ?&gt;\"&gt;\n&lt;meta name=\"DC.Format\" content=\"text\/html\" \/&gt;\n&lt;meta name=\"DC.Identifier\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\"&gt;\n&lt;meta name=\"DC.Language\" content=\"&lt;?php echo $twentytwelve_data-&gt;language; ?&gt;\" \/&gt;\n&lt;meta name=\"DC.Publisher\" content=\"&lt;?php echo $twentytwelve_data-&gt;blogname; ?&gt;\" \/&gt;\n&lt;meta name=\"DC.Rights\" content=\"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/\"&gt;\n&lt;meta name=\"DC.Source\" content=\"&lt;?php echo $twentytwelve_data-&gt;blogname; ?&gt;\"&gt;\n&lt;meta name=\"DC.Subject\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\"&gt;\n&lt;meta name=\"DC.Title\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\"&gt;\n&lt;meta name=\"DC.Type\" content=\"Text\"&gt;\n\n&lt;meta name=\"dcterms.contributor\" content=\"\" \/&gt;\n&lt;meta name=\"dcterms.copyright\" content=\"\u00a9 &lt;?php echo $twentytwelve_data-&gt;author; ?&gt; &lt;?php echo $twentytwelve_data-&gt;date; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.coverage\" content=\"World\" \/&gt;\n&lt;meta name=\"dcterms.creator\" content=\"&lt;?php echo $twentytwelve_data-&gt;author; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.date\" content=\"&lt;?php echo $twentytwelve_data-&gt;date; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.description\" content=\"&lt;?php echo $twentytwelve_data-&gt;description; ?&gt;\"&gt;\n&lt;meta name=\"dcterms.format\" content=\"text\/html\" \/&gt;\n&lt;meta name=\"dcterms.identifier\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\"&gt;\n&lt;meta name=\"dcterms.language\" content=\"&lt;?php echo $twentytwelve_data-&gt;language; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.publisher\" content=\"&lt;?php echo $twentytwelve_data-&gt;blogname; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.rights\" content=\"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/\"&gt;\n&lt;meta name=\"dcterms.source\" content=\"&lt;?php echo $twentytwelve_data-&gt;permalink; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.subject\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.title\" content=\"&lt;?php echo $twentytwelve_data-&gt;title; ?&gt;\" \/&gt;\n&lt;meta name=\"dcterms.type\" content=\"Text\" \/&gt;\n&lt;!-- end of citation metadata --&gt;<\/pre>\n<p style=\"text-align: justify;\">Please note that I put the Dublin Core metadata twice in two slightly different formats for maximum compatibility with search engines and bibliography managers.<\/p>\n<h3 style=\"text-align: justify;\">What about comprehensive academic bibliography metadata?<\/h3>\n<p style=\"text-align: justify;\">You&#8217;ll probably have noticed that the metadata I&#8217;ve included in my article pages, while sufficient for web page citations, doesn&#8217;t contain the same degree of detail as academic bibliography data (see first metadata snippet above), e.g. journal titles, ISSN&#8217;s, ISBN&#8217;s, etc.. As far as I know, there isn&#8217;t yet a way of storing that data in standard WordPress and so it more than likely needs a specialist plugin so authors can explicitly enter it to be stored and printed on the corresponding article pages. Would anyone like to develop one?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open Access\u00a0publishing is gaining popularity and, at the same time, increasing numbers of academics are uploading their papers on their personal websites, faculty pages, and blogs. This is great news for people who don&#8217;t have the luxury of an institution to pay for their access to the usually pay-walled research databases. Along with this positive&hellip; <a class=\"more-link\" href=\"https:\/\/matbury.com\/wordpress\/index.php\/2015\/07\/13\/adding-bibliography-metadata-to-your-web-pages\/\">Continue reading <span class=\"screen-reader-text\">Adding bibliography metadata to your web pages<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/3579"}],"collection":[{"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=3579"}],"version-history":[{"count":0,"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/3579\/revisions"}],"wp:attachment":[{"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=3579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=3579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matbury.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=3579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}