Skip to content

Commit 80c2631

Browse files
committed
Describe the JSON-LD homepage in the main example.
1 parent 8162afa commit 80c2631

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.eleventy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export default async function(eleventyConfig) {
7575

7676
eleventyConfig.addWatchTarget('playground/next/index.html');
7777

78+
eleventyConfig.addGlobalData('now', () => new Date());
79+
7880
// setup development proxy to cloudflare pages function server
7981
if(process.env.ELEVENTY_RUN_MODE === 'serve') {
8082
eleventyConfig.setServerOptions({

index.liquid

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ masthead:
2323
<div class="eight wide column">
2424
<h2 class="ui centered header">A Simple Example</h2>
2525
<pre class="ui segment">{
26-
"<span style="color: rgb(255, 122, 0);">@context</span>": "<a href="https://json-ld.org/contexts/person.jsonld">https://json-ld.org/contexts/person.jsonld</a>",
27-
"<span style="color: rgb(255, 122, 0);">@id</span>": "<a href="http://dbpedia.org/resource/John_Lennon">http://dbpedia.org/resource/John_Lennon</a>",
28-
"<span style="color: rgb(255, 122, 0);">name</span>": "<span style="color: rgb(0, 148, 0);">John Lennon</span>",
29-
"<span style="color: rgb(255, 122, 0);">born</span>": "<span style="color: rgb(0, 0, 175);">1940-10-09</span>",
30-
"<span style="color: rgb(255, 122, 0);">spouse</span>": "<a href="http://dbpedia.org/resource/Cynthia_Lennon">http://dbpedia.org/resource/Cynthia_Lennon</a>"
26+
"<span style="color: rgb(255, 122, 0);">@context</span>": "<a href="https://schema.org/">https://schema.org/</a>",
27+
"<span style="color: rgb(255, 122, 0);">@id</span>": "<a href="https://json-ld.org/">https://json-ld.org/</a>",
28+
"<span style="color: rgb(255, 122, 0);">@type</span>": "<strong><a href="https://schema.org/WebPage">WebPage</a></strong>",
29+
"<span style="color: rgb(255, 122, 0);">name</span>": "<span style="color: rgb(0, 148, 0);">JSON-LD - JSON for Linked Data Web Site</span>",
30+
"<span style="color: rgb(255, 122, 0);">about</span>": "<a href="https://www.w3.org/TR/json-ld/">https://www.w3.org/TR/json-ld/</a>",
31+
"<span style="color: rgb(255, 122, 0);">copyrightYear</span>": <span style="color: rgb(0, 0, 175);">{{ now | date: '%Y' }}</span>
3132
}</pre>
3233
</div>
3334
<div class="justified four wide column">

0 commit comments

Comments
 (0)