在 github 和要点上查看解释的 HTML,而不是 HTML 源
Viewing interpreted HTML, rather HTML source, on github and gist
我发现 What is the difference between GitHub and gist? 的答案并不令人满意,我想知道差异(部分)是否在于他们对 HTML 的处理方式。特别是,我想知道:
- 是否可以将其他人指向 github.com 上的 HTML 文件,以便他们在查看该文件时查看 HTML 页面而不是其来源?通常在 github 上,即使 URL 栏中的扩展名是
.html
,浏览器也不会解释 HTML 代码(为什么?)。
- 当在 gist.github.com 上查看 HTML 页面时,确实看到了 HTML 页面而不是其来源。这是github和gist之间区别的主要(或主要)特征吗?
Is it possible to point others to an HTML file on github.com such that when they view the file, they view the HTML page rather than its source?
仅使用 Github Pages
Normally on github, and even when the extension in the URL bar is .html, the HTML code is not interpreted by the browser (why?).
因为 Github 的目的是管理代码,而不是托管网页。
URL 没有文件扩展名。浏览器根据 Content-Type header.
决定如何处理内容
When an HTML page is viewed on gist.github.com, the HTML page is indeed seen rather than its source. Is this the main (or a main) feature of the difference between github and gist?
我测试的时候没有。
Github 本身用于托管 Git 存储库。
Gist 用于显示 ad-hoc 由 git 管理的代码示例,但没有存储库的完整接口。
我发现 What is the difference between GitHub and gist? 的答案并不令人满意,我想知道差异(部分)是否在于他们对 HTML 的处理方式。特别是,我想知道:
- 是否可以将其他人指向 github.com 上的 HTML 文件,以便他们在查看该文件时查看 HTML 页面而不是其来源?通常在 github 上,即使 URL 栏中的扩展名是
.html
,浏览器也不会解释 HTML 代码(为什么?)。 - 当在 gist.github.com 上查看 HTML 页面时,确实看到了 HTML 页面而不是其来源。这是github和gist之间区别的主要(或主要)特征吗?
Is it possible to point others to an HTML file on github.com such that when they view the file, they view the HTML page rather than its source?
仅使用 Github Pages
Normally on github, and even when the extension in the URL bar is .html, the HTML code is not interpreted by the browser (why?).
因为 Github 的目的是管理代码,而不是托管网页。
URL 没有文件扩展名。浏览器根据 Content-Type header.
决定如何处理内容When an HTML page is viewed on gist.github.com, the HTML page is indeed seen rather than its source. Is this the main (or a main) feature of the difference between github and gist?
我测试的时候没有。
Github 本身用于托管 Git 存储库。
Gist 用于显示 ad-hoc 由 git 管理的代码示例,但没有存储库的完整接口。