Skip to content

Commit

Permalink
Website: remove dependency on eips preamble entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 committed Mar 29, 2023
1 parent bec47cd commit dd3fd58
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions _layouts/eip.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
layout: default
---

{% assign eip = page.url | split: "eip-" | last | xml_escape %}

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="bi-megaphone-fill" fill="currentColor" viewBox="0 0 16 16">
<title>Alert</title>
Expand Down Expand Up @@ -47,9 +49,9 @@
</span>
<h1 class="page-heading">
{% if page.category == "ERC" %}
ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}
ERC-{{ eip }}: {{ page.title | xml_escape }}
{% elsif page.category != "ERC" %}
EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}
EIP-{{ eip }}: {{ page.title | xml_escape }}
{% endif %}
<a href="{{ page.discussions-to | uri_escape }}" class="no-underline">
<svg role="img" aria-label="Discuss" class="inline-svg" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 16 16">
Expand Down Expand Up @@ -119,7 +121,7 @@ <h2>Citation</h2>
IEEE specification for reference formatting:
https://ieee-dataport.org/sites/default/files/analysis/27/IEEE%20Citation%20Guidelines.pdf
{% endcomment %}
<p>{% include authorlist.html authors=page.author %}, "{% if page.category == "ERC" %}ERC{% else %}EIP{% endif %}-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}," <em>Ethereum Improvement Proposals</em>, no. {{ page.eip | xml_escape }}, {{ page.created | date: "%B %Y" }}. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-{{ page.eip | xml_escape }}.</p>
<p>{% include authorlist.html authors=page.author %}, "{% if page.category == "ERC" %}ERC{% else %}EIP{% endif %}-{{ eip }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}," <em>Ethereum Improvement Proposals</em>, no. {{ page.eip | xml_escape }}, {{ page.created | date: "%B %Y" }}. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-{{ page.eip | xml_escape }}.</p>
</div>
{% comment %}
Article schema specification:
Expand All @@ -130,11 +132,11 @@ <h2>Citation</h2>
"@context": "http://schema.org",
"@type": "TechArticle",
{% if page.category == "ERC" %}
"headline": "ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"headline": "ERC-{{ eip }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "ERC-{{ eip }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
{% else %}
"headline": "EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"headline": "EIP-{{ eip }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "EIP-{{ eip }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
{% endif %}
"author": "{{ page.author }}",
"dateCreated": "{{ page.created | date: "%Y-%m-%d" }}",
Expand Down

0 comments on commit dd3fd58

Please sign in to comment.