scholarmarkdown 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91f2c165820d1506fffbd6efce12046cad1bfccb257377c925508a40096d985f
4
- data.tar.gz: c97b69b7409f6bb3a22af5f93fbf141188e7d3a088a48877d6081ed743be0af7
3
+ metadata.gz: 7706863395ba006040193bda58d4788efef5935494a7337be0cd604396c0f093
4
+ data.tar.gz: 8a71634b511450130b8610cdab9362d6c491b388ea2101e7ca97ea0ae219faa1
5
5
  SHA512:
6
- metadata.gz: 58e04398a9606724c7402017ae51257aee8b161cccb7a1342ebc6e802cea9397a19413354a6e68939425717e6ec7bb18f1b16d325aa4ba6e9fabd87df1c385f8
7
- data.tar.gz: 3bbe1081caeebf61a7f96bb529ccd54dcac0d8f5e06afa08bcb97399fee82188d21a728577c85ca68fee5da64a60a4aac3b8c26286b818ef5d82f72139c083a4
6
+ metadata.gz: 50953b262188dca05a48145d34c2242bf7834dc64243a81505b11c5626f82f53dd708209f1b89afe343fe5ee16beba3c90de0313cba9c43999d30cda0b417484
7
+ data.tar.gz: 0bcf49fbe70124d2e0e7fff72df236b13b379c26309d65221436fae277bb77c9dfc5ab4b1c87eaf34dd77715a3f12cd6f26f36001aadb41dc1fd7d498e1aa244
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.6.0
@@ -2,13 +2,13 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title><%= h @item[:title] %></title>
5
+ <title property="foaf:name schema:name"><%= h @item[:title].gsub(/[\n]/, ' ') %></title>
6
6
  <link rel="stylesheet" media="screen" href="styles/screen.css" />
7
7
  <link rel="stylesheet" media="print" href="styles/print.css" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1" />
9
9
  <%= @items['/styles/katex.css'].nil? ? '' : '<link rel="stylesheet" media="all" href="styles/katex.css" />' %>
10
10
  </head>
11
- <body prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ v: http://www.w3.org/2006/vcard/ns# pimspace: http://www.w3.org/ns/pim/space# cc: https://creativecommons.org/ns# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# cal: http://www.w3.org/2002/12/cal/ical# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# org: http://www.w3.org/ns/org# biblio: http://purl.org/net/biblio# bibo: http://purl.org/ontology/bibo/ book: http://purl.org/NET/book/vocab# ov: http://open.vocab.org/terms/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# dio: https://w3id.org/dio# as: https://www.w3.org/ns/activitystreams# oa: http://www.w3.org/ns/oa# ldp: http://www.w3.org/ns/ldp#" typeof="schema:CreativeWork sioc:Post prov:Entity">
11
+ <body prefix="dctypes: http://purl.org/dc/dcmitype/ pimspace: http://www.w3.org/ns/pim/space# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# biblio: http://purl.org/net/biblio# bibo: http://purl.org/ontology/bibo/ book: http://purl.org/NET/book/vocab# ov: http://open.vocab.org/terms/ doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# dio: https://w3id.org/dio# lsc: http://linkedscience.org/lsc/ns#" typeof="schema:CreativeWork sioc:Post prov:Entity lsc:Research">
12
12
  <%= yield %>
13
13
  </body>
14
14
  </html>
@@ -20,7 +20,7 @@ Nanoc::Filter.define(:scholar_citation_metadata) do |content, params|
20
20
  # Add citation meta tags at the end of the <head>
21
21
  content.gsub! %r{\<\/head\>} do |match|
22
22
  <<-HTML
23
- <meta name="citation_title" content="#{item[:title]}">
23
+ <meta name="citation_title" content="#{item[:title].gsub(/[\n]/, ' ')}">
24
24
  #{authors}
25
25
  #{additionalTags}
26
26
  </head>
@@ -1,7 +1,9 @@
1
1
  # Moves IDs on headings to their parent section
2
2
  Nanoc::Filter.define(:scholar_headerids_to_section) do |content|
3
3
  content = content.dup
4
- content.gsub! /<section>(\s*)(<h\d[^>]*)(\sid=[^\s>]+)/,
5
- '<section\3>\1\2'
4
+ content.gsub! /<section>(\s*)(<div[^>]*>)(\s*)(<h\d[^>]*)\sid="([^\s>]+)"([^>]*)>/ do |_|
5
+ match = Regexp.last_match
6
+ "<section id=\"#{match[5]}\" inlist=\"\" rel=\"schema:hasPart\" resource=\"##{match[5]}\">#{match[1]}#{match[2]}#{match[3]}#{match[4]} property=\"schema:name\"#{match[6]}>"
7
+ end
6
8
  content
7
9
  end
@@ -14,25 +14,29 @@ def section id, classes = nil
14
14
  raise "Could not find the file '" + id.to_s + "'"
15
15
  end
16
16
  <<-HTML
17
- <section markdown="block"#{section_suffix}>
17
+ <section #{section_suffix}>
18
+ <div datatype="rdf:HTML" property="schema:description" markdown="block">
18
19
  #{item.raw_content}
20
+ </div>
19
21
  </section>
20
22
  HTML
21
23
  end
22
24
 
23
25
  # Create a person block
24
- def person name, website, profile
25
- # Add person to global list of authors
26
- unless $authors
27
- $authors = []
26
+ def person name, website, profile, mainAuthor = true
27
+ if mainAuthor
28
+ # Add person to global list of authors
29
+ unless $authors
30
+ $authors = []
31
+ end
32
+ $authors.push(name)
28
33
  end
29
- $authors.push(name)
30
34
 
31
35
  if not website
32
36
  h name
33
37
  elsif not profile
34
38
  %{<a href="#{h website}">#{h name}</a>}
35
39
  else
36
- %{<a href="#{h website}" typeof="http://xmlns.com/foaf/0.1/Person" resource="#{profile}">#{h name}</a>}
40
+ %{<a rev="lsc:participatesIn" property="foaf:maker schema:creator schema:author schema:publisher" href="#{h website}" typeof="foaf:Person schema:Person" resource="#{profile}">#{h name}</a>}
37
41
  end
38
42
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: scholarmarkdown 2.5.0 ruby lib
5
+ # stub: scholarmarkdown 2.6.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scholarmarkdown".freeze
9
- s.version = "2.5.0"
9
+ s.version = "2.6.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Ruben Taelman".freeze]
14
- s.date = "2019-07-22"
14
+ s.date = "2019-08-01"
15
15
  s.email = "rubensworks@gmail.com".freeze
16
16
  s.executables = ["generate-scholarmarkdown".freeze]
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scholarmarkdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Taelman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n