code4lib / shortimer

a webapp for code4lib jobs

Home Page:http://jobs.code4lib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Job title microdata seems to have too broad a scope and is surfacing the wrong property names

sesuncedu opened this issue · comments

In jobs/templates/job.html the "title" property includes everything in the <h2> field

<article itemscope itemtype="http://schema.org/JobPosting" id="jobeditor">
    <div class="page-header">
      <h2 itemprop="title">{{ job.title }}
      {% if job.employer %}
      <br>
      <small>
        <a itemprop="hiringOrganization" href="{% url "employer" job.employer.slug %}">{{ job.employer.name }}</a>
        {% if job.location %}
        - 
        <a href="{{ job.location.freebase_url }}">
          <span itemprop="hiringOrganizationLocation">{{ job.display_location }}</span>
        </a>
        {% endif %} 
      </small>
      {% endif %}
      </h2>

This means that http://jobs.code4lib.org/job/14511/
ends up (via any23) as this

Note that the contents include everything in the h2.

Also, the property name is "http://schema.org/JobPosting/title", instead of "http://schema.org/title", because microdata.

_:node5c4eeca126ebf1f47cd0d2edfa567a5b a <http://schema.org/JobPosting> ;
    <http://schema.org/JobPosting/hiringOrganizationLocation> "Santa Clara, California" ;
    <http://schema.org/JobPosting/skills> "Computer Science" , "Content management system" , "Drupal" , "Library science" , "WordPress" ;
    <http://schema.org/JobPosting/title> """IT Digital Library Architect



        Agilent Technologies

        - 

          Santa Clara, California




      """ ;

Also, there's no hiringOrganizationLocation property; hiringOrganization should be of itemtype="http://schema.org/Organization" ; the location is a property of the organization.

I started an online edit for a pull-request, then realized the changes of me not screwing the scope up even more was about zero.