Skip to content

Commit

Permalink
Merge pull request #792 from BioSchemas/non-schema-props
Browse files Browse the repository at this point in the history
Bioschemas property web pages to prevent 404 errors on profiles
  • Loading branch information
albangaignard authored Nov 1, 2023
2 parents e4aaef8 + 8303e77 commit 22db89b
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 12 deletions.
6 changes: 4 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
---
<h1>Page not found</h1>

<p>It seems that you are trying to get to a page that does not exist. Please use the naviation bar above to navigate around the site. Some pages that you may be interest in are:</p>
<p>It seems that you are trying to get to a page that does not exist. Please use the naviation bar above to navigate
around the site. Some pages that you may be interest in are:</p>
<ul>
<li><a href="/profiles">List of profiles</a></li>
<li><a href="/types">List of types</a></li>
</ul>
<li><a href="/properties">List of properties</a></li>
</ul>
22 changes: 14 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ description: > # this means to ignore newlines until "baseurl:"
standards and reach consensus among a wide number of life sciences organizations and communities.
url: "http://bioschemas.org" # the base hostname & protocol for your site
twitter_username: Bioschemas
github_username: Bioschemas

github_username: Bioschemas

# Build settings
markdown: kramdown
Expand All @@ -16,14 +15,17 @@ sass:
style: compressed
highlighter: rouge
plugins:
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-gist
- jekyll-relative-links
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-gist
- jekyll-relative-links

# Collections
collections_dir: pages
collections:
properties:
output: true
permalink: /:collection/:path
types:
output: true
permalink: /:collection/:path
Expand Down Expand Up @@ -63,8 +65,7 @@ collections:

# Defaults
defaults:
-
scope:
- scope:
path: "pages"
type: "pages"
values:
Expand All @@ -75,6 +76,11 @@ defaults:
type: "types"
values:
layout: "default"
- scope:
path: ""
type: "properties"
values:
layout: "default"
- scope:
path: ""
type: "profiles"
Expand Down
4 changes: 3 additions & 1 deletion _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
resources</a></li>
<li><a class="dropdown-item" href="{{ '/tutorials/community/rd' | relative_url }}">Adding markup to Rare
Disease resources</a></li>
<li><a class="dropdown-item" href="{{ '/tutorials/community/biodiversity' | relative_url }}">Adding markup to Biodiversity-related resources</a></li>
<li><a class="dropdown-item" href="{{ '/tutorials/community/biodiversity' | relative_url }}">Adding markup
to Biodiversity-related resources</a></li>
</ul>
</li>
<li class="nav-item dropdown">
Expand All @@ -63,6 +64,7 @@
<ul class="dropdown-menu" aria-labelledby="btnCommunity">
<li><a class="dropdown-item" href="{{ '/profiles/' | relative_url }}">Profiles</a></li>
<li><a class="dropdown-item" href="{{ '/types/' | relative_url }}">Types</a></li>
<li><a class="dropdown-item" href="{{ '/properties/' | relative_url }}">Properties</a></li>
</ul>
</li>
<li class="nav-item dropdown">
Expand Down
42 changes: 42 additions & 0 deletions _includes/properties.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<h2>{{page.prop_name}}</h2>
<em>A Bioschemas property</em>

<h3></h3>
<p>
{{page.description}}
</p>

{% if page.expected_values_as_type or page.expected_values_as_data %}
<h4>Expected values</h4>
<ul>
{% for v in page.expected_values_as_type %}
{%- assign typeName = '/types/' | append: v %}
<li><a href="{{ typeName | relative_url }}">{{ v }}</a></li>
{% endfor %}
{% for v in page.expected_values_as_data %}
<li>
{{v}}
</li>
{% endfor %}
</ul>
{% endif %}

{% if page.used_in_profiles %}
<h4>Used on these profiles</h4>
<ul>
{% for v in page.used_in_profiles %}
{%- assign profileName = '/profiles/' | append: v %}
<li><a href="{{ profileName | relative_url }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}

{% if page.used_in_types %}
<h4>Used on these types</h4>
<ul>
{% for v in page.used_in_types %}
{%- assign typeName = '/types/' | append: v %}
<li><a href="{{ typeName | relative_url }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}
3 changes: 2 additions & 1 deletion _includes/specification-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ <h5 class="modal-title" id="exampleModalLabel">Examples for all properties</h5>
{%- for prop in props_list %}
<tr>
{%- if prop.type == "bioschemas" %}
<td class="property-column"><a href="{{prop.type_url }}" target="_blank" class="bioschema">{{prop.property}}</a></td>
{% capture url %}/properties/{{ prop.property }}{% endcapture %}
<td class="property-column"><a href={{ url | relative_url }} target="_blank" class="bioschema">{{prop.property}}</a></td>
{%- elsif prop.type == "schemas.org" or prop.type == "" %}
<td class="property-column"><a href="http://schema.org/{{prop.property}}" target="_blank" class="schemaorg">{{prop.property}}</a></td>
{%- elsif prop.type == "pending" %}
Expand Down
30 changes: 30 additions & 0 deletions pages/_properties/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: default
title: Bioschemas Properties
# redirect_from:
# - "/devTypes/"
# - "/types/drafts/"

---
<h1>Bioschemas Properties
<a target="_blank" href="mailto:[email protected]?subject=[Bioschemas] request to create a new property"
class="btn btn-primary btn-sm float-end" role="button">
Propose a new property</a>
</h1>

<p><a href="https://schema.org/">Schema.org</a> provides a vocabulary of terms that can be used to describe data on the
Internet. The Bioschemas community is extending this vocabulary to be able to describe life sciences resources.</p>

<p>Comments and discussions on the <a href="https://lists.w3.org/Archives/Public/public-bioschemas/"
itemprop="email">mailing list</a> or <a href="https://github.com/Bioschemas/specifications/issues">GitHub issue
tracker</a> are encouraged.</p>
<br />

<ul>
{% for prop in site.properties %}
{% if prop.prop_name %}
{%- assign propName = '/properties/' | append: prop.prop_name %}
<li><a href="{{ propName | relative_url }}">{{ prop.prop_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
20 changes: 20 additions & 0 deletions pages/_properties/input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
dateModified: 2023-10-06
prop_name: input
description: a property aimed at specifying the type of consumed data.

expected_values_as_type :
- FormalParameter

# expected_values_as_data :
# - text

# used_in_types:
# -

used_in_profiles:
- ComputationalTool
- ComputationalWorkflow
---

{% include properties.html %}
20 changes: 20 additions & 0 deletions pages/_properties/output.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
dateModified: 2023-10-06
prop_name: output
description: a property aimed at specifying the type of produced data.

expected_values_as_type :
- FormalParameter

# expected_values_as_data :
# - text

# used_in_types:
# -

used_in_profiles:
- ComputationalTool
- ComputationalWorkflow
---

{% include properties.html %}

0 comments on commit 22db89b

Please sign in to comment.