当前位置:网站首页>码云,正式支持 Pages 功能,可以部署静态页面
码云,正式支持 Pages 功能,可以部署静态页面
2022-07-26 10:24:00 【唐策】
使用前须知
1、Pages 默认的根文件是 index.html
2、静态网页的样式可以自己写,也可以拿一些静态模版来修改,Pages服务本身不提供任何形式的模版,但我们后续会陆续增加例子,供大家参考使用。
3、如果你想以根目录的形式访问自己的静态网站,只需要建立一个与自己个性地址同名的项目即可,如http://git.oschina.net/ipvb 这个用户,想要创建一个自己的站点,但不想以子目录的方式访问,想以ipvb.oschina.io直接访问,那么他就可以创建一个名字为ipvb的项目http://git.oschina.net/ipvb/ipvb 部署完成后,就可以以http://ipvb.oschina.io 进行访问了。
4、支持 Jekyll
已经有 Pages 项目如何部署到码云的 Pages
以 jQuery-File-Upload 项目为例,项目地址:https://github.com/blueimp/jQuery-File-Upload
它在 Github 上的 Pages 地址是:https://blueimp.github.io/jQuery-File-Upload/
如果想把它转移到码云 Pages,只需要登录你的码云账户,点击右上角的+号,选择新建项目 
然后点击创建,项目会在后台自动导入,导入成功后,点击菜单栏的Pages 
这里我们默认的Pages服务分支是osc-pages,但是你也已选择自己静态页面所在的分支,这里jQuery-File-Upload项目的静态页面分支是gh-pages,选择gh-pages并点击启动服务。 
至此,静态网页已经部署成功,访问提供的地址:http://silentboy.oschina.io/jQuery-File-Upload/ 即可查看到jQuery-File-Upload项目的静态官网。 
一个小白的Pages搭建之旅
A.新建项目 test_pages 
点击创建完成项目的创建
B.添加文件 index.html (注意名称是index.html哦!)
点击新建文件 
文件名输入index.html,内容就是简单的html 
点击提交,将文件提交到仓库
C.选择pages服务

D.选择需要部署的分支,这里选择Master启动服务。
E.访问生成的网站地址,即可以查看你部署的静态页面啦!
发挥自己的想象力,做个自己的博客,做个项目的官网,做个介绍自己的页面吧,觉得不好看可以自己添加一些样式,或者找一些静态网页的模版,快去试试吧!
Pages进阶,使用Jekyll生成自己的静态网页
Jekyll 究竟是什么?
Jekyll 是一个简单的博客形态的静态站点生产机器。它有一个模版目录,其中包含原始文本格式的文档,通过 Markdown (或者 Textile) 以及 Liquid 转化成一个完整的可发布的静态网站,你可以发布在任何你喜爱的服务器上。Jekyll 也可以运行在 码云Pages上,也就是说,你可以使用码云的服务来搭建你的项目页面、博客或者网站,而且是完全免费的。
比如您看到的这篇新闻就是Markdown语法所编写,我把它放到刚刚小白的测试项目内的一个文件,http://git.oschina.net/silentboy/test_pages/raw/master/intro.md ,在文件的顶部制定了它的访问链接是pages_intro,在提交之后,码云会自动帮你部署,就可以通过 http://silentboy.oschina.io/test_pages/pages_intro/ 进行访问了,怎么样,是不是很酷?
赶快去试试吧! -> https://git.oschina.net
另附Jekyll 使用文档:http://jekyll.bootcss.com/docs/home/
边栏推荐
- Netease cloud UI imitation -- & gt; sidebar
- Data communication foundation telnet remote management equipment
- [Halcon vision] array
- Use of pclint in vs2013
- PTA class a 1001
- The problem of incomplete or partial display of the last recyclerview is solved
- 【socket】三次握手是在listen中完成,accept只从完成连接的队列中拿出一个连接
- SPARK中 DS V2 push down(下推)的一些说明
- 面试第二家公司的面试题及答案(二)
- Necessary for beginners: debug breakpoint debugging skills in idea and common breakpoint skills
猜你喜欢

AirTest

AirTest

【Halcon视觉】软件编程思路

INSTALL_ FAILED_ SHARED_ USER_ Incompatible error resolution

Jpg to EPS
![[Halcon vision] image filtering](/img/7a/b95f8977f02fab644ef9fb205424e7.png)
[Halcon vision] image filtering
![[Halcon vision] programming logic](/img/1a/b6daac946fbefd8337355dc8b7873e.png)
[Halcon vision] programming logic
![Uniapp common error [wxml file compilation error]./pages/home/home Wxml and using MySQL front provided by phpstudy to establish an independent MySQL database and a detailed tutorial for independent da](/img/21/5dceab9815b503f0b62d26a430d7eb.png)
Uniapp common error [wxml file compilation error]./pages/home/home Wxml and using MySQL front provided by phpstudy to establish an independent MySQL database and a detailed tutorial for independent da

【Halcon视觉】图像滤波

Map key not configured and uniapp routing configuration and jump are reported by the uniapp < map >< /map > component
随机推荐
Introduction to latex, EPS picture bounding box
面试第二家公司的面试题及答案(二)
Data communication foundation - layer 2 switching principle
equals与==的区别
[Halcon vision] affine transformation
Jpg to EPS
Use of pclint in vs2013
畅听,网文流量竞争的下一站?
The practice of OpenCV -- bank card number recognition
数通基础-Telnet远程管理设备
Basic usage of protobuf
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE错误解决方式
On the compilation of student management system of C language course (simple version)
【杂谈】Error loading psycopg2 module :No module named psycopg2
简单化构造函数的继承方法(一)- 组合继承
How to write a million reading article
What is wrong about the description of function templates (how to solve link format errors)
SQL Server 2008 server engine failed to start?
Employee information management system based on Web
软件打不开了