javascript 在 github 上设置演示页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10431022/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
setting up a demo page on github
提问by qwertymk
Is there a way to set up a demo page on a github project?
有没有办法在 github 项目上设置演示页面?
I see people having demo pages on google code, is there any way to also do that on github?
我看到有人在 google 代码上有演示页面,有什么办法也可以在 github 上做到这一点吗?
I only need it to do html
css
and js
nothing server sided.
我只需要它做html
css
,js
没有什么服务器端。
I'm trying to set up a multi-page ajax plugin so jsfiddle won't really help.
我正在尝试设置一个多页 ajax 插件,因此 jsfiddle 并没有真正的帮助。
采纳答案by Fabrizio Calderan
Try to look at github pagesusing custom domains: http://help.github.com/pages/
尝试使用自定义域查看github 页面:http: //help.github.com/pages/
Custom Domains
Let's say you own the domain name example.com. Furthermore, your GitHub username is “charlie” and you have published a User Page at http://charlie.github.com/. Now you'd like to load up http://example.com/in your browser and have it show the content from http://charlie.github.com/
自定义域
假设您拥有域名 example.com。此外,您的 GitHub 用户名是“charlie”,并且您已在http://charlie.github.com/ 上发布了一个用户页面。现在您想在浏览器中加载http://example.com/并让它显示来自http://charlie.github.com/的内容
回答by sha256
If your username in github is john, then you need to create a new repository named john.github.com
. you can do it in the way you created other repositories. Then commit files to that repository. If you put a index.html
file in that repository, when people go to http://john.github.com
they are supposed to see that index.html
file.
如果你在 github 中的用户名是 john,那么你需要创建一个名为john.github.com
. 您可以按照创建其他存储库的方式进行操作。然后将文件提交到该存储库。如果您将index.html
文件放入该存储库中,那么当人们访问时,http://john.github.com
他们应该会看到该index.html
文件。
So what you need to do is, create a repository named <your_username>.github.com
and put your demo files there.
所以您需要做的是,创建一个名为的存储库<your_username>.github.com
并将您的演示文件放在那里。
回答by Bikesh M
Login to your GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub. create your page(create you html css files ) and push the file to github this will create a page for you I fount a good example here http://wiki.workassis.com/how-to-create-github-page/
登录到您的 GitHub 并创建一个名为 username.github.io 的新存储库,其中 username 是您在 GitHub 上的用户名(或组织名称)。创建你的页面(创建你的 html css 文件)并将文件推送到 github 这将为你创建一个页面我在这里找到一个很好的例子http://wiki.workassis.com/how-to-create-github-page/
回答by a0180600
You can add “http://htmlpreview.github.io/?” before your "https://github.com/yourname/xxx.html". You can check the setting options to comfirm your pages have pushed.
您可以添加“ http://htmlpreview.github.io/?” 在你的“ https://github.com/yourname/xxx.html”之前。您可以检查设置选项以确认您的页面已推送。