Medium.com 上的多文件要点的单个文件
Single file of a multi-files gist on Medium.com
有谁知道将多文件要点的单个文件包含到媒体中的方法 post?
我试过这里提出的解决方案,但没有成功:
- How do I embed a single file from a GitHub gist with the new gist interface?
- Yes, we get the gist
谢谢,
M.
2017 年 11 月:这仍然不可能。
Medium API for posts refers to "Accepted markup for Medium’s Publishing API" and the markdown syntax.
None 其中包括一个 <script>
,需要 include a Gist single file
<script src="https://gist.github.com/<id>.js?file=afile" type="text/javascript" />
唯一的解决方法是生成文章内容,包含要点文件,并发布包含所有内容的构建文本。
如果要点发生变化,则意味着必须更新文章。
Phelipe Rocha mentions the article "Dealing with Code on Medium" from Egon Elbre
The least frustrating approach I’ve found was using code screenshots. Obviously, this is very annoying for readers.
我要补充:将屏幕截图与引用要点文件的 HTML link 结合起来可能是一个可接受的解决方法(尽管要点发生变化,这意味着更新屏幕截图)。
2020 - 有可能!
有一种方法 不用 使用 <script>
,但这有点棘手:
⚠️ The order matters!
- 复制 (multi-file) 要点路径。例如:
https://gist.github.com/MojtabaHs/91e34fd0e987fe7ce801936dc6ece0e8
- 将它粘贴到除 Medium 文章之外的其他地方。像一个在线文本框:
⚠️不要点击搜索或return按钮
- 将文件的查询参数附加到 URL。例如:
https://gist.github.com/MojtabaHs/91e34fd0e987fe7ce801936dc6ece0e8?file=Interface.swift
注意URL结尾的?file=Interface.swift
,对吧?
- 复制粘贴到文章中,见识神奇
使用此方法的文章:
Implement Custom Activity Indicator With The SwiftUI
必须考虑的最重要注意事项:
⚠️ 请注意,您 必须 在媒体中复制未格式化的纯文本并且 不得 编辑粘贴后的 URL它在媒体中!您可以在 google.com 等在线文本框中复制 link,然后在附加查询后,将其复制回来并粘贴到 Medium 中。
有谁知道将多文件要点的单个文件包含到媒体中的方法 post?
我试过这里提出的解决方案,但没有成功:
- How do I embed a single file from a GitHub gist with the new gist interface?
- Yes, we get the gist
谢谢, M.
2017 年 11 月:这仍然不可能。
Medium API for posts refers to "Accepted markup for Medium’s Publishing API" and the markdown syntax.
None 其中包括一个 <script>
,需要 include a Gist single file
<script src="https://gist.github.com/<id>.js?file=afile" type="text/javascript" />
唯一的解决方法是生成文章内容,包含要点文件,并发布包含所有内容的构建文本。
如果要点发生变化,则意味着必须更新文章。
Phelipe Rocha mentions
The least frustrating approach I’ve found was using code screenshots. Obviously, this is very annoying for readers.
我要补充:将屏幕截图与引用要点文件的 HTML link 结合起来可能是一个可接受的解决方法(尽管要点发生变化,这意味着更新屏幕截图)。
2020 - 有可能!
有一种方法 不用 使用 <script>
,但这有点棘手:
⚠️ The order matters!
- 复制 (multi-file) 要点路径。例如:
https://gist.github.com/MojtabaHs/91e34fd0e987fe7ce801936dc6ece0e8
- 将它粘贴到除 Medium 文章之外的其他地方。像一个在线文本框:
⚠️不要点击搜索或return按钮
- 将文件的查询参数附加到 URL。例如:
https://gist.github.com/MojtabaHs/91e34fd0e987fe7ce801936dc6ece0e8?file=Interface.swift
注意URL结尾的?file=Interface.swift
,对吧?
- 复制粘贴到文章中,见识神奇
使用此方法的文章:
Implement Custom Activity Indicator With The SwiftUI
必须考虑的最重要注意事项:
⚠️ 请注意,您 必须 在媒体中复制未格式化的纯文本并且 不得 编辑粘贴后的 URL它在媒体中!您可以在 google.com 等在线文本框中复制 link,然后在附加查询后,将其复制回来并粘贴到 Medium 中。