I have difficulties embedding JSON flows in the node description.
1. What do I know about JSON embedding in the markdown text?
- JSON or javascript (and also other languages) code can be embedded into the README.md via triple backquotes ```
- The triple backquotes (starting and ending) must be in a single line
- I use the keyword 'javascript' at the starting to get a coloured display, e.g. when displaying a Node-RED function node contents.
- This works at least in
GitHub.com
,npmjs.com
and also in most Markdown-Editors - Example: ```javascript
- See also there:
https://github.com/windkh/node-red-contrib-telegrambot
, e.g. chapter "Sending live locations" - Remark: Coloured output does not work on flows.nodered.org (not a big problem for me)
- This works at least in
- You can generate collapsed sections via the
<details>
option- Definition: https://www.w3schools.com/TAGS/tag_details.asp
- See also there:
https://github.com/windkh/node-red-contrib-telegrambot
, e.g. see below Fig. 11
2. Beside: What do I know about image embedding in the markdown text (important for later question)?
-
Images can be embedded, e.g. via an '!'
- Example:
![echo flow](images/TelegramBotEcho.png?raw=true "Echo Flow")
- Example:
- These images can be seen in the
flows.nodered.org
, because they are embedded via this type of link:https://raw.githubusercontent.com/
- Example: This image:
https://raw.githubusercontent.com/windkh/node-red-contrib-telegrambot/master/images/TelegramBotEcho.png
is embedded Fig. 1 here:https://github.com/windkh/node-red-contrib-telegrambot
- Example: This image:
-
Important: These images can also seen on the
flows.nodered.org
pages, e.g. there:https://flows.nodered.org/node/node-red-contrib-telegrambot
3. Beside: What do I know about JSON flow examples?
- If you have a subdirectory named 'examples' in your flow, then JSON files located there are shown in the vertical tab 'examples' in the Node-RED importing dialog. This is a nice feature
- It looks like this:
- It looks like this:
4. What is a problem?
Embedding JSON files with a relative link in the .md file does only work in GitHub.com
and npmjs.com
, but not on flows.nodered.org
-
Example: See there:
https://github.com/windkh/node-red-contrib-telegrambot
, e.g. Fig. 1:
-
The flow is defined by this markdown code:
[**echo flow**](examples/echo.json)
-
Klicking the link 'echo flow' leads to a page where you can copy the flow text (e.g. for importing it via the clipboard).
-
Problem: On
flows.nodered.org
an error message occurs: 404 - Thing not found- The not found link is:
https://flows.nodered.org/node/examples/echo.json
- It could be (comparable to images):
https://raw.githubusercontent.com/windkh/node-red-contrib-telegrambot/master/examples/echo.json
- The not found link is:
-
Question: Is there a solution for that, that
flows.nodered.org
treats these flow links identical like images? Any ideas?