Skip to content

Commit

Permalink
Update meta tags (#2325)
Browse files Browse the repository at this point in the history
* Add Matomo tracking

* Add development instructions to README

* Add dynamic metadata for EIP pages

* Escape title strings

* Remove Matomo

* Use variables from _config.yaml in head.html

* Omit Jekyll version from header

* Also use twitter_username from _config.yml
  • Loading branch information
samajammin authored and Souptacular committed Nov 5, 2019
1 parent 2c12dfd commit 8350c1f
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,41 @@ eip_validator <INPUT_FILES>
# Automerger

The EIP repository contains an "auto merge" feature to ease the workload for EIP editors. If a change is made via a PR to a draft EIP, then the authors of the EIP can Github approve the change to have it auto-merged by the [eip-automerger](https://github.com/eip-automerger/automerger) bot.

# Local development

## Prerequisites

1. Open Terminal.

2. Check whether you have Ruby 2.1.0 or higher installed:

```
$ ruby --version
```

3. If you don't have Ruby installed, install Ruby 2.1.0 or higher.

4. Install Bundler:

```
$ gem install bundler
```

5. Install dependencies:

```
$ bundle install
```

## Build your local Jekyll site

1. Bundle assets and start the server:

```
$ bundle exec jekyll serve
```

2. Preview your local Jekyll site in your web browser at `http://localhost:4000`.

More information on Jekyll and Github pages [here](https://help.github.com/en/enterprise/2.14/user/articles/setting-up-your-github-pages-site-locally-with-jekyll).
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ description: >-
Ethereum Improvement Proposals (EIPs) describe standards for the Ethereum
platform, including core protocol specifications, client APIs, and contract
standards.
url: "http://eips.ethereum.org"
url: "https://eips.ethereum.org"
twitter_username: ethereum
github_username: ethereum
header_pages:
Expand Down
45 changes: 45 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% if page.layout == "eip" %}
<title>EIP {{ page.eip }}: {{ page.title | escape }}</title>
<meta property="og:title" content="EIP {{ page.eip }}: {{ page.title | escape }}" />
<meta
name="description"
content="Details on Ethereum Improvement Proposal {{page.eip}} (EIP {{page.eip}}): {{page.title | escape}}"
/>
<meta
property="og:description"
content="Details on Ethereum Improvement Proposal {{page.eip}} (EIP {{page.eip}}): {{page.title | escape}}"
/>
<meta name="twitter:description" content="Details on Ethereum Improvement Proposal {{page.eip}} (EIP {{page.eip}}): {{page.title | escape}}" />
{% else %}
<title>{{ page.title | escape }} | {{site.title}}</title>
<meta
property="og:title"
content="{{ page.title | escape }} | {{site.title}}"
/>
<meta name="description" content="{{site.description}}" />
<meta property="og:description" content="{{site.description}}" />
<meta name="twitter:description" content="{{site.description}}" />
{% endif %}
<meta name="generator" content="Jekyll" />
<meta property="og:locale" content="en_US" />
<link rel="canonical" href="{{site.url}}{{page.url}}" />
<meta property="og:url" content="{{site.url}}{{page.url}}" />
<meta property="og:site_name" content="{{site.title}}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@{{site.twitter_username}}" />
<script type="application/ld+json">
{
"@type": "WebSite",
"url": "{{site.url}}",
"name": "{{site.title}}",
"description": "{{site.description}}",
"@context": "https://schema.org"
}
</script>
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}" />
{%- feed_meta -%}
</head>
5 changes: 5 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---

@import "minima";

0 comments on commit 8350c1f

Please sign in to comment.