Is there a way to make the HTML format exactly as I specify in the template
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
I have looked at most of #215 #214 #194 #171 #162 and #216
Here is what I want to do:
In a template file I have this:
<html lang="en-US">
<head>
{% include head.html %}
</head>
</html>
I like this format of indentation and I want the contents of head.html to be similarly indented so the rendered HTML looks like:

In order to achieve this my head.html has to look like:
<title>{{ site.title }}</title>
<meta name="description" content="{{ site.description }}">
<meta name="keywords" content="{{ site.keywords }}">
<meta name="author" content="{{ site.author }}">
Presumably with more and more indentation for every line after the first line as the the placement of {% include head.html %} gets indented more and more.
I have tried using {%- and read this
Is there an easy way to accomplish what I want? I sort of follow why the first line in head.html has to be indented differently but this has created a pretty complicated process to get the final HTML rendered as I want.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced issues (#215, #214, #194, #171, #162, and #216) and the Liquid whitespace documentation linked in the report. The issue names no implementation file or test; work would need a defined approach for preserving indentation in included HTML and a test or documented behavior showing the rendered output matches the template structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, ruby
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100