Support for HTML READMEs (README.html) #109580
Replies: 11 comments 39 replies
-
If you prefer using plain HTML for your documentation and READMEs but need to host them on GitLab, there are a few options you can consider: Convert HTML to Markdown: You can use tools or online converters to convert your HTML documents to Markdown format. This would allow you to maintain your content in HTML locally but publish it on GitLab in Markdown format. There are various tools available that can help with this conversion process. Use GitLab Pages: GitLab Pages allows you to host static websites directly from your GitLab repository. You can create a static HTML website and host it using GitLab Pages. This way, you can write your documentation in HTML and have it rendered as a website hosted on GitLab. Embed HTML in Markdown: Although GitLab primarily supports Markdown for README files, you can still embed HTML within Markdown files. This can be done using HTML tags within Markdown syntax. While this may not be ideal for complex HTML documents, it could be a workaround for simpler HTML content within Markdown files. Browser Extension or Viewer: You can use a browser extension or viewer that allows you to preview Markdown files with embedded HTML directly in your browser. This would enable you to iterate on your documentation locally without needing to push changes to the repository each time. Choose the option that best fits your workflow and preferences for maintaining HTML documentation on GitLab. |
Beta Was this translation helpful? Give feedback.
-
Hi! Sorry, I meant Github, not Gitlab— copy-paste mistake, because I asked the same of Gitlab people 😅 The options you suggested are valid, but still, having native support is much better. And there's a precedent for multiple README formats already: Github supports Org Mode READMEs in parallel to .md ones. So why not add another format—the one that's already there in .md inline HTML—but with its own semantic file type? |
Beta Was this translation helpful? Give feedback.
-
Why? 🤨 |
Beta Was this translation helpful? Give feedback.
-
Use GitHub Pages: If your project has a corresponding GitHub Pages site, you can create a separate HTML file for your documentation and host it there. You can then link to this HTML documentation from your README. Preview Changes Locally: Instead of relying solely on GitHub's rendering, you can set up a local development environment to preview your changes before pushing them to the repository. This way, you can iterate on your documentation more quickly and efficiently. Consider Markdown Alternatives: While Markdown is the default format for README files on GitHub, there are some Markdown flavors that support more advanced features, such as HTML blocks or inline HTML. You could explore using these alternatives to see if they better suit your needs. Provide Clear Instructions: In your README, you can include clear instructions for users on how to view or interact with your HTML documentation. This could involve providing links to hosted documentation, instructions for previewing locally, or suggestions for tools that better support HTML. Submit Feedback to GitHub: If you believe that native support for HTML READMEs would be beneficial, you can submit feedback or feature requests to GitHub. While there's no guarantee that they'll implement this feature, expressing your needs and concerns can help drive future improvements to the platform. By exploring these options and possibly combining them, you may be able to mitigate some of the challenges you're facing with using HTML in README files on GitHub. |
Beta Was this translation helpful? Give feedback.
-
I was unable to find where to submit feedback, thus I asked about HTML READMEs here. Any possibility you can point me to the right place? |
Beta Was this translation helpful? Give feedback.
-
@aartaka, a question for how to accomplish this exists at StackOverflow. It might be worth following. |
Beta Was this translation helpful? Give feedback.
-
No, this is not a spam. My original text was copy-pasted from Gitlab issue tracker, thus the confusion 🙈
|
Beta Was this translation helpful? Give feedback.
-
To address the problem of using HTML in GitHub README files effectively, here are some potential solutions: 1.Use Markdown with Inline HTML: While GitHub primarily supports .md files for README, it allows inline HTML. You can structure your HTML content within a Markdown file for better compatibility. If you run into issues where GitHub is interpreting some lines as Markdown, try wrapping your HTML content in code blocks or using HTML comments () to prevent conflicts. 2.Convert HTML to Markdown: If you're working primarily with HTML, consider using an HTML-to-Markdown converter tool. This will allow you to maintain the visual structure of your content while converting it into a format that GitHub handles natively. Tools like Pandoc or specific browser extensions can assist with this conversion process. 3.Use a GitHub Pages site: If your documentation requires more advanced HTML or CSS that Markdown can't support, consider setting up a GitHub Pages site. This will allow you to create full HTML pages that are hosted directly on GitHub, giving you complete control over the rendering of your content without the limitations of a Markdown file. 4.Pre-Render HTML Locally: To reduce the feedback loop, you can pre-render your HTML files locally before pushing them to GitHub. Use a static site generator or an HTML preview tool to see how your content will look before uploading it to your repository. By implementing one or more of these approaches, you can streamline your workflow and ensure that your HTML content renders correctly on GitHub. |
Beta Was this translation helpful? Give feedback.
-
Must extend request to any file. Can view only HTML - source code. Meanwhile, you may copy HTML into
|
Beta Was this translation helpful? Give feedback.
-
No. If lacks header of HTTP, rather downloads. If header claims to be HTML, then renders. Try it. I can help.
You fail to mention what is source.
No. Relevant what you store, and see.
Word except removes contradiction.
No. Does pass through much original HTML.
I do not dare.
Thank you, Demeanour.
Other types of files do not need separate requests. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
Hi y'all.
I'm using HTML for most of my docs and content, including READMEs. The problem is: GitHub only supports .md files with inline HTML, which is not friendly to most HTML tools out there. Browsers open .md files as plain text, GitHub itself interprets some lines as Markdown instead of HTML content, and the feedback loop for iterating on documentation is too long:
Would be nice to have plain HTML READMEs so that all the tooling works with them natively.
EDIT: Gitlab -> Github
Beta Was this translation helpful? Give feedback.
All reactions