如何通过 GitHub 分享 NetLogo 模型
How to share a NetLogo model through GitHub
This really helpful question (and answer) 非常适合通过 Dropbox 中的 public 文件夹共享 NetLogo 模型。
但是,我的理解是Dropbox will no longer (though for the moment still does) support sharing HTML(以及 NetLogo 文件)这样。
上面提到的问题和答案 GitHub,特别是 "raw" HTML 文件的 URL,作为一个潜在的解决方案。 我试过了,但遇到了一些问题。
这是通过 Dropbox 托管的文件(有效):https://dl.dropboxusercontent.com/u/1190498/Virus%20on%20a%20Network%20(Hinze).html
我认为这是通过 GitHub 托管的相同(原始)文件:https://raw.githubusercontent.com/jrosen48/netlogo-models/master/Virus%20on%20a%20Network%20(Hinze).html
认为关键是呈现 HTML,我尝试将 https://htmlpreview.github.io/? 添加到通过 GitHub 托管的文件中,但无济于事。
如何通过GitHub分享NetLogo模型?
这方面的规则一直在变化,这有点令人难过,但我想我可以推荐两件事。一种是使用 NetLogo Modeling Commons. NLW versions of models uploaded there can be directly linked to,只需上传 .nlogo
文件——也就是说,您甚至不需要 "Export: HTML".
另一个选项——我认为我可能会更强烈推荐的选项是使用 GitHub Pages, which is essentially a free, basic web host. You can see here an example of a model that I uploaded to GitHub pages. The setup of the repository,这个选项非常简单;我刚刚创建了一个名为“[username].github.io”的存储库,上传了导出的 HTML 文件,然后可以从可预测的 URL.
访问它
This really helpful question (and answer) 非常适合通过 Dropbox 中的 public 文件夹共享 NetLogo 模型。
但是,我的理解是Dropbox will no longer (though for the moment still does) support sharing HTML(以及 NetLogo 文件)这样。
上面提到的问题和答案 GitHub,特别是 "raw" HTML 文件的 URL,作为一个潜在的解决方案。 我试过了,但遇到了一些问题。
这是通过 Dropbox 托管的文件(有效):https://dl.dropboxusercontent.com/u/1190498/Virus%20on%20a%20Network%20(Hinze).html
我认为这是通过 GitHub 托管的相同(原始)文件:https://raw.githubusercontent.com/jrosen48/netlogo-models/master/Virus%20on%20a%20Network%20(Hinze).html
认为关键是呈现 HTML,我尝试将 https://htmlpreview.github.io/? 添加到通过 GitHub 托管的文件中,但无济于事。
如何通过GitHub分享NetLogo模型?
这方面的规则一直在变化,这有点令人难过,但我想我可以推荐两件事。一种是使用 NetLogo Modeling Commons. NLW versions of models uploaded there can be directly linked to,只需上传 .nlogo
文件——也就是说,您甚至不需要 "Export: HTML".
另一个选项——我认为我可能会更强烈推荐的选项是使用 GitHub Pages, which is essentially a free, basic web host. You can see here an example of a model that I uploaded to GitHub pages. The setup of the repository,这个选项非常简单;我刚刚创建了一个名为“[username].github.io”的存储库,上传了导出的 HTML 文件,然后可以从可预测的 URL.
访问它