Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Eleventy. #836

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const drafts = [
'CG-FINAL',
'CR',
'ED',
'FCGS',
'PR',
'REC',
'WD',
'latest'
];

module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy('404.html');
eleventyConfig.addPassthroughCopy('.htaccess');
eleventyConfig.addPassthroughCopy('LICENSE.md');
eleventyConfig.addPassthroughCopy('benchmarks/**/*.{jsonld,nq,md}');
eleventyConfig.addPassthroughCopy('contexts/**/*.{htaccess,html,jsonld}');
eleventyConfig.addPassthroughCopy('contexts/{event,person,place,recipe,remote-context}');
eleventyConfig.addPassthroughCopy('examples/**/*.{html,ttl,txt,json}');
eleventyConfig.addPassthroughCopy('favicon.ico');
eleventyConfig.addPassthroughCopy('fonts');
eleventyConfig.addPassthroughCopy('images/**/*.{htaccess,png,svg,xcf}');
eleventyConfig.addPassthroughCopy('ns/**/*.{html,jsonld}');
eleventyConfig.addPassthroughCopy('playground/**/*.{css,php,js}');
eleventyConfig.addPassthroughCopy('presentations');
eleventyConfig.addPassthroughCopy('schemas/**/*.json');
eleventyConfig.addPassthroughCopy('site.css');
eleventyConfig.addPassthroughCopy('spec/LICENSE.md');
for(const draft of drafts) {
eleventyConfig.addPassthroughCopy(`spec/${draft}`);
}
eleventyConfig.addPassthroughCopy('static');
eleventyConfig.addPassthroughCopy('test-suite');
eleventyConfig.addPassthroughCopy('utils');
eleventyConfig.ignores.add('CONTRIBUTING.md');
eleventyConfig.ignores.add('LICENSE.md');
eleventyConfig.ignores.add('README.md');
eleventyConfig.ignores.add('benchmarks/README.md');
eleventyConfig.ignores.add('contexts/person.html');
eleventyConfig.ignores.add('examples');
eleventyConfig.ignores.add('images/README.md');
eleventyConfig.ignores.add('minutes/**/*');
eleventyConfig.ignores.add('ns/json-ld.html');
eleventyConfig.ignores.add('playground/dev/README.md');
eleventyConfig.ignores.add('presentations');
eleventyConfig.ignores.add('scripts');
eleventyConfig.ignores.add('spec/tools');
eleventyConfig.ignores.add('spec/LICENSE.md');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ignores can be moved to .eleventyignore to make this file more sane.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with having them here? At least for now. It's a bit confusing as is due to eleventy processing various things, having to pass through others, and ignore particular files. And for drafts, that's done computationally. I thought it made more sense to keep the details in one place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the single place to look. I mostly just like data in inert places whenever possible vs. buried among API calls.

for(const draft of drafts) {
eleventyConfig.ignores.add(`spec/${draft}`);
}
eleventyConfig.ignores.add('test-suite');
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.DS_Store
node_modules
playground/jsonld.js
_site
100 changes: 100 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html
prefix="
xhv: http://www.w3.org/1999/xhtml/vocab#
xsd: http://www.w3.org/2001/XMLSchema#
rdfs: http://www.w3.org/2000/01/rdf-schema#
dc: http://purl.org/dc/terms/
vcard: http://www.w3.org/2006/vcard/ns#
v: http://rdf.data-vocabulary.org/#"
lang="en" >
<head>
<title>JSON-LD - JSON for Linking Data</title>

<!-- Meta Tags -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<!-- Style Sheets -->
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/font-awesome.css">
<style>
/** bootstrap 2.3.2 overrides **/
.alert.alert-success a {color: #3d9400; text-decoration: underline }
</style>

<link rel="shortcut icon" href="favicon.ico" />

<!-- Script tags -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-42886053-1', 'json-ld.org');
ga('send', 'pageview');
</script>
</head>

<body>
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="row-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand active" href="#"><img src="images/json-ld-data-24.png" alt="JSON-LD logo"> JSON-LD</a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="icon-folder-open"></span> Specifications <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li class="nav-header"><strong>W3C Recommendations</strong></li>
<li><a href="https://www.w3.org/TR/json-ld/">Syntax</a></li>
<li><a href="https://www.w3.org/TR/json-ld-api/">Processing Algorithms and API</a></li>
<li><a href="https://www.w3.org/TR/json-ld-framing/">Framing</a></li>
<li class="divider"></li>
<li class="nav-header"><strong>Latest Drafts</strong></li>
<li><a href="https://w3c.github.io/json-ld-syntax/">Syntax</a></li>
<li><a href="https://w3c.github.io/json-ld-api/">Processing Algorithms and API</a></li>
<li><a href="https://w3c.github.io/json-ld-framing/">Framing</a></li>
<li><a href="https://w3c.github.io/json-ld-bp/">Best Practices</a></li>
<li><a href="https://w3c.github.io/json-ld-streaming/">Streaming</a></li>
<li><a href="https://json-ld.github.io/json-ld-star/">JSON-LD-star</a></li>
<li><a href="https://w3c.github.io/json-ld-cbor/">CBOR</a></li>
<li><a href="https://github.com/w3c/json-ld-rc/">Recommended Context</a></li>
<li><a href="https://json-ld.github.io/yaml-ld/">YAML-LD</a></li>
<li><a href="/spec/">1.0 drafts (historic)</a></li>
</ul>
</li>
<li><a href="images/"><span class="icon-picture"></span> Branding</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>

<div class="container">
<h2>Page not found.</h2>
</div>

<!-- Script tags -->
<script type="text/javascript" src="static/js/bootstrap/bootstrap.js"></script>
</body>
</html>
41 changes: 23 additions & 18 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
json-ld.org
===========

Introduction
------------

.. image:: https://badges.gitter.im/json-ld/json-ld.org.svg
:alt: Join the chat at https://gitter.im/json-ld/json-ld.org
:target: https://gitter.im/json-ld/json-ld.org?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[![Join the chat at https://gitter.im/json-ld/json-ld.org](https://badges.gitter.im/json-ld/json-ld.org.svg)](https://gitter.im/json-ld/json-ld.org)

This is the source for the https://json-ld.org/ website.

JSON-LD (JavaScript Object Notation for Linking Data) is a lightweight Linked
Data format. It is easy for humans to read and write. It is easy for machines
Expand All @@ -15,21 +18,23 @@ These properties make JSON-LD an ideal Linked Data interchange language for
JavaScript environments, Web services, and unstructured databases such as
CouchDB and MongoDB.

If you are already using JSON-LD, add yourself to the `list of users`_ in our wiki.
If you are already using JSON-LD, add yourself to the [list of users][] in our wiki.


A Simple Example
----------------

A simple example of a JSON object with added semantics::

{
"@context": "https://json-ld.org/contexts/person.jsonld",
"@id": "http://dbpedia.org/resource/John_Lennon",
"name": "John Lennon",
"born": "1940-10-09",
"spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
}
```json
{
"@context": "https://json-ld.org/contexts/person.jsonld",
"@id": "http://dbpedia.org/resource/John_Lennon",
"name": "John Lennon",
"born": "1940-10-09",
"spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
}
```

The example above describes a person whose name is John Lennon. The difference
between regular JSON and JSON-LD is that the JSON-LD object above uniquely
Expand All @@ -49,15 +54,15 @@ The Specifications
If you are a developer, you may be interested in the official JSON-LD W3C
specifications:

* `JSON-LD 1.1 - A JSON-based Serialization for Linked Data`_
* `JSON-LD 1.1 Processing Algorithms and API`_
* `JSON-LD 1.1 Framing`_
* [JSON-LD 1.1 - A JSON-based Serialization for Linked Data][]
* [JSON-LD 1.1 Processing Algorithms and API][]
* [JSON-LD 1.1 Framing][]
Comment on lines +57 to +59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [JSON-LD 1.1 - A JSON-based Serialization for Linked Data][]
* [JSON-LD 1.1 Processing Algorithms and API][]
* [JSON-LD 1.1 Framing][]
* [JSON-LD 1.1 - A JSON-based Serialization for Linked Data](http://www.w3.org/TR/json-ld/)
* [JSON-LD 1.1 Processing Algorithms and API](https://www.w3.org/TR/json-ld-api/)
* [JSON-LD 1.1 Framing](https://www.w3.org/TR/json-ld-framing/)


A list of all previous specification drafts is also available.

https://json-ld.org/spec/

.. _list of users: https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD
.. _JSON-LD 1.1 - A JSON-based Serialization for Linked Data: http://www.w3.org/TR/json-ld/
.. _JSON-LD 1.1 Processing Algorithms and API: http://www.w3.org/TR/json-ld-api/
.. _JSON-LD 1.1 Framing: http://www.w3.org/TR/json-ld-framing/
[list of users]: https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD
[JSON-LD 1.1 - A JSON-based Serialization for Linked Data]: http://www.w3.org/TR/json-ld/
[JSON-LD 1.1 Processing Algorithms and API]: https://www.w3.org/TR/json-ld-api/
[JSON-LD 1.1 Framing]: https://www.w3.org/TR/json-ld-framing/
Comment on lines +65 to +68
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's intended here? Human text followed by visible URL, or human text anchored with an href? If the former, remove the [] that now surrounds the human text; if the latter, remove the : and wrap the URL in `(). I'm guessing the latter is the intent, so --

Suggested change
[list of users]: https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD
[JSON-LD 1.1 - A JSON-based Serialization for Linked Data]: http://www.w3.org/TR/json-ld/
[JSON-LD 1.1 Processing Algorithms and API]: https://www.w3.org/TR/json-ld-api/
[JSON-LD 1.1 Framing]: https://www.w3.org/TR/json-ld-framing/
[list of users](https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD)
[JSON-LD 1.1 - A JSON-based Serialization for Linked Data](http://www.w3.org/TR/json-ld/)
[JSON-LD 1.1 Processing Algorithms and API](https://www.w3.org/TR/json-ld-api/)
[JSON-LD 1.1 Framing](https://www.w3.org/TR/json-ld-framing/)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if it's the former --

Suggested change
[list of users]: https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD
[JSON-LD 1.1 - A JSON-based Serialization for Linked Data]: http://www.w3.org/TR/json-ld/
[JSON-LD 1.1 Processing Algorithms and API]: https://www.w3.org/TR/json-ld-api/
[JSON-LD 1.1 Framing]: https://www.w3.org/TR/json-ld-framing/
**list of users:** https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD
**JSON-LD 1.1 - A JSON-based Serialization for Linked Data:** http://www.w3.org/TR/json-ld/
**JSON-LD 1.1 Processing Algorithms and API:** https://www.w3.org/TR/json-ld-api/
**JSON-LD 1.1 Framing:** https://www.w3.org/TR/json-ld-framing/

Empty file removed earl.jsonld
Empty file.
4 changes: 2 additions & 2 deletions images/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/font-awesome.css">
<link rel="stylesheet" href="../common/prettify.css" type="text/css" />
<!--<link rel="stylesheet" href="../common/prettify.css" type="text/css" />-->
<link rel="shortcut icon" href="../favicon.ico" />

<!-- script tags -->
Expand Down Expand Up @@ -52,7 +52,7 @@
<a href="../playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="../learn.html"><span class="icon-book"></span> Documentation</a>
<a href="../learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="../#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<a href="playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="learn.html"><span class="icon-book"></span> Documentation</a>
<a href="learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
Expand Down Expand Up @@ -502,7 +502,7 @@ <h1 class="span12" style="text-align: center;">
video, presentations, tutorials, and documentation about JSON-LD. Assuming you
are familiar with JSON, these training materials will help you quickly
put the power of JSON-LD into your web development efforts.<br><br>
<a class="btn" href="./learn.html">Learn more about JSON-LD</a>
<a class="btn" href="./learn/">Learn more about JSON-LD</a>
</p>
</div>
<!-- End Row -->
Expand Down
18 changes: 9 additions & 9 deletions learn.html → learn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<!-- Style Sheets -->
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="static/css/bootstrap/font-awesome.css">
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="../static/css/bootstrap/font-awesome.css">
<link rel="shortcut icon" href="favicon.ico" />

<!-- Script tags -->
Expand All @@ -43,16 +43,16 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="./"><img src="images/json-ld-data-24.png" alt="JSON-LD logo"> JSON-LD</a>
<a class="brand" href="../"><img src="../images/json-ld-data-24.png" alt="JSON-LD logo"> JSON-LD</a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="playground/"><span class="icon-beer"></span> Playground</a>
<a href="../playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li class="active">
<a href="learn.html"><span class="icon-book"></span> Documentation</a>
<a href="."><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="./#developers"><span class="icon-beaker"></span> Developers</a></li>
<li><a href="../#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="icon-folder-open"></span> Specifications <b class="caret"></b>
Expand All @@ -76,7 +76,7 @@
<li><a href="/spec/">1.0 drafts (historic)</a></li>
</ul>
</li>
<li><a href="images/"><span class="icon-picture"></span> Branding</a></li>
<li><a href="../images/"><span class="icon-picture"></span> Branding</a></li>
</ul>
</div>
<!--/.nav-collapse -->
Expand Down Expand Up @@ -145,6 +145,6 @@ <h1>Blog Posts</h1>
</div> <!-- End Container -->

<!-- Script tags -->
<script type="text/javascript" src="static/js/bootstrap/bootstrap.js"></script>
<script type="text/javascript" src="../static/js/bootstrap/bootstrap.js"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "json-ld.org",
"private": true,
"description": "json-ld.org homepage",
"scripts": {
"build": "eleventy",
"serve": "eleventy --serve",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1"
davidlehn marked this conversation as resolved.
Show resolved Hide resolved
}
}
2 changes: 1 addition & 1 deletion playground/1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<a href="../../playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="../../learn.html"><span class="icon-book"></span> Documentation</a>
<a href="../../learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="../#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
Expand Down
2 changes: 1 addition & 1 deletion playground/dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<a href="../../playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="../../learn.html"><span class="icon-book"></span> Documentation</a>
<a href="../../learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="../../#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
Expand Down
2 changes: 1 addition & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<a href="../playground/"><span class="icon-beer"></span> Playground</a>
</li>
<li>
<a href="../learn.html"><span class="icon-book"></span> Documentation</a>
<a href="../learn/"><span class="icon-book"></span> Documentation</a>
</li>
<li><a href="../#developers"><span class="icon-beaker"></span> Developers</a></li>
<li class="dropdown">
Expand Down
Loading