Title: Content structure for code examples · Issue #68 · CodingTrain/thecodingtrain.com · GitHub
Open Graph Title: Content structure for code examples · Issue #68 · CodingTrain/thecodingtrain.com
X Title: Content structure for code examples · Issue #68 · CodingTrain/thecodingtrain.com
Description: Right now, we can add code examples to a video in it's corresponding JSON file: "codeExamples": [ { "title": "Random Square Design", "description": "Using the random() function to draw randomly sized squares", "image": "https://processin...
Open Graph Description: Right now, we can add code examples to a video in it's corresponding JSON file: "codeExamples": [ { "title": "Random Square Design", "description": "Using the random() function to draw randomly siz...
X Description: Right now, we can add code examples to a video in it's corresponding JSON file: "codeExamples": [ { "title": "Random Square Design", "description": "...
Opengraph URL: https://github.com/CodingTrain/thecodingtrain.com/issues/68
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Content structure for code examples","articleBody":" Right now, we can add code examples to a video in it's corresponding JSON file:\r\n ```json\r\n\"codeExamples\": [\r\n {\r\n \"title\": \"Random Square Design\",\r\n \"description\": \"Using the random() function to draw randomly sized squares\",\r\n \"image\": \"https://processing.org/static/b8793fda1d825d4d138038d97deff7a2/b2a35/GameOfLife.webp\",\r\n \"language\": \"p5js\",\r\n \"folder\": \"folderWithCode\",\r\n \"webEditor\": \"Sl8ml_Lz8\"\r\n },\r\n...\r\n]\r\n```\r\n\r\nand the setup allows a `src` folder to be added alongside this `index.json` file, where multiple folders can be sub-added and can be referenced using the `\"folder\"` property of a code example specification.\r\n\r\nTo continue with #57 and #66, we need to add the images into this whole setup. One comes to mind:\r\n\r\nWe keep a similar approach to what we have now and add the possibility of creating an `images` folder on each video folder that contains only images. All these images can be then referenced by the `index.json` file of the video, specifically by an \"image\" property of code examples. This can also help us to add images in other parts, like for thumbnails for links. \r\n\r\nSo folders for videos would be:\r\n```\r\n[videos|journeys]\r\n└─ video-slug\r\n ├─ index.json\r\n ├─ src\r\n │ ├─ code-folder-1\r\n │ └─ ...\r\n ├─ images\r\n │ ├─ image1.png\r\n │ └─ ...\r\n └─ contributions\r\n ├─ contribution-slug-1.json\r\n ├─ contribution-slug-2.json\r\n └─ ...\r\n ```\r\n \r\n and the code examples portion of `index.json` file would be:\r\n ```\r\n \"codeExamples\": [\r\n {\r\n \"title\": \"Random Square Design\",\r\n \"description\": \"Using the random() function to draw randomly sized squares\",\r\n \"image\": \"image1.png\",\r\n \"language\": \"p5js\",\r\n \"folder\": \"code-folder-1\",\r\n \"webEditor\": \"Sl8ml_Lz8\"\r\n },\r\n...\r\n]\r\n```\r\n\r\nAlso, as I'm writing this, I realize I'm not sure if every code examples would have a corresponding code folder with files. Maybe sometimes it just lives in the p5editor? ","author":{"url":"https://github.com/fdoflorenzano","@type":"Person","name":"fdoflorenzano"},"datePublished":"2022-02-14T20:10:29Z","url":"https://github.com/CodingTrain/thecodingtrain.com/issues/68"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d748a2f4-dffd-216e-a8b0-3bfd2635734f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 882C:121D2B:FFFE66:1538578:6B05148A |
| html-safe-nonce | 908c2982eed83c153f4ce16eea1dc3622e5a478717d9ad47d2621cfca9574082 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODJDOjEyMUQyQjpGRkZFNjY6MTUzODU3ODo2QjA1MTQ4QSIsInZpc2l0b3JfaWQiOiIxMjA2NDg3OTY0ODU1ODk5Mjc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 587fdbc60f7374adab293f4e31d3697812ebb5dc8eb6282ef65ebb40abe569a1 |
| hovercard-subject-tag | issue:1137785354 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/CodingTrain/thecodingtrain.com/68/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e6049158dfa99fd0123dade838773843086aaa94f543e3c22e809bc1fb51628/CodingTrain/thecodingtrain.com/issues/68 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e6049158dfa99fd0123dade838773843086aaa94f543e3c22e809bc1fb51628/CodingTrain/thecodingtrain.com/issues/68 |
| og:image:alt | Right now, we can add code examples to a video in it's corresponding JSON file: "codeExamples": [ { "title": "Random Square Design", "description": "Using the random() function to draw randomly siz... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fdoflorenzano |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/CodingTrain/thecodingtrain.com git https://github.com/CodingTrain/thecodingtrain.com.git |
| octolytics-dimension-user_id | 18553964 |
| octolytics-dimension-user_login | CodingTrain |
| octolytics-dimension-repository_id | 399865017 |
| octolytics-dimension-repository_nwo | CodingTrain/thecodingtrain.com |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 399865017 |
| octolytics-dimension-repository_network_root_nwo | CodingTrain/thecodingtrain.com |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width