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

Link groups front-end refactor #65

Merged
merged 6 commits into from
Feb 17, 2022
Merged
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
7 changes: 7 additions & 0 deletions content-testing/content-structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@ const contentStructure = {
isFileSensitive: false,
isFolderSensitive: true,
isRequired: true
},
templates: {
folders: {},
files: {},
isFileSensitive: false,
isFolderSensitive: false,
isRequired: false
}
// talks: {
// folders: {},
Expand Down
3 changes: 2 additions & 1 deletion content-testing/file-formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const video = {
properties: {
title: { isRequired: true, type: 'string' },
url: { isRequired: true, type: 'string' },
author: { type: 'string' }
icon: { type: 'string' },
description: { type: 'string' }
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions content/guides/content-structure-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ Each video's metadata file (`video-slug/index.json`) is a JSON file. Each file h
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down Expand Up @@ -167,7 +167,11 @@ Group links are a more general abstraction for specifying related groups of link
In the case of "Videos discussed" or whatever content that lives in the Coding Train site,
instead of specifying the whole url to the resource, the URL can contain the sub-path in the site for that resource that starts with `/`.

The `"author"` property is optional, but `"title"` and `"url"` are required.
The `"description"` and `"icon"` properties are optional, but `"title"` and `"url"` are required.

For now, `"icon"` expects a short emoji string that relates to the link. In the future this may also support adding coding train characters.

`"description"` on the other hand can be a longish string that describes the link or something about it. It may also contain some HTML that will be parsed, so it may also contain anchor links related to the link. For example: `"By <a href='https://shiffman.net/' target='_blank' rel='noreferrer'> Dan Shiffman</a> and <a href='https://designsystems.international/' target='_blank' rel='noreferrer'> DSI</a>!"`.

If `"groupLinks"` isn't set, it will default to an empty array.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions content/videos/journeys/163-bezier-curves/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@
"links": [
{
"title": "Self Avoiding Walk - Coding Challenge 162",
"author": "The Coding Train",
"description": "by The Coding Train",
"url": "/journeys/162-self-avoiding-walk"
},
{
"title": "Time Table Cardioid - Coding Challenge 133",
"author": "The Coding Train",
"description": "by The Coding Train",
"url": "/journeys/133-times-tables-cardioid"
}
]
Expand Down
4 changes: 1 addition & 3 deletions content/videos/journeys/165-slide-puzzle/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@
"description": "The Fisher-Yates shuffle is an algorithm for generating a random permutation of a finite sequence"
},
{
"icon": "✏️",
"title": "copy()",
"url": "https://p5js.org/reference/#/p5/copy",
"description:": "The full details about copy() are on the p5.js reference."
"description": "The full details about copy() are on the p5.js reference."
}
]
},
Expand All @@ -57,7 +56,6 @@
{
"icon": "🎥",
"title": "Bending Time Slitscan (Challenge 164)",
"author": "The Coding Train",
"description": "This video demonstrates how to use copy() for slitscan and time displacement.",
"url": "/challenges/164-slitscan"
}
Expand Down
2 changes: 1 addition & 1 deletion content/videos/journeys/77-recursion/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"links": [
{
"title": "The Fractal Geometry of Nature",
"author": "Benoit Mandlebrot",
"description": "by Benoit Mandlebrot",
"url": "http://amzn.to/2xiVwht"
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
{
"title": "Link 1 title",
"url": "link 1 url",
"author": "author of content linked"
"description": "description of content linked"
},
{
"title": "Link 2 title",
"url": "link 2 url",
"author": "author of content linked"
"description": "description of content linked"
}
]
}
Expand Down
Loading