Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I render HTML on GitLab?

GitLab doesn't render HTML for me, but just display the source code:

enter image description here

Background: I used sphinx to generate the HTML and tried to show the doc at GitLab.

I looked at other projects' repositories, such as pandas, sphinx. They only have .rts files in the repository, and not HTML files. I guess they generate HTML for their websites but don't upload to Git.

I don't have a website and want to show doc at GitLab. Is there a way to do that? Or do I have to generate other formats (other than HTML, e.g. PDF) instead?

like image 858
YJZ Avatar asked Apr 09 '19 14:04

YJZ


People also ask

Are GitLab pages free?

With GitLab Pages you can host your static website for free.

What GitLab feature allows you to publish static website directly from a repository in GitLab?

With GitLab Pages, you can publish static websites directly from a repository in GitLab. Use for any personal or business website.

What is my GitLab pages URL?

Your project's URL is https://gitlab.com/websites/websites.gitlab.io . Once you enable GitLab Pages for your project, your website is published under https://websites.gitlab.io . General example: On GitLab.com, a project site is always available under https://namespace.gitlab.io/project-name.


1 Answers

There is a super easy solution I found on this post:

Before:
https://gitlab.com/[user]/[repository]/raw/[branch]/[filename.ext]

After:
Development (throttled)
https://gl.githack.com/[user]/[repository]/raw/[branch]/[filename.ext]

Production (CDN)
https://glcdn.githack.com/[user]/[repository]/raw/[branch]/[filename.ext]

like image 138
j_5chneider Avatar answered Oct 18 '22 00:10

j_5chneider