title: How to minify grails view html
body: <p>The HTML spat out from a view has a lot of empty spaces and empty lines.</p>
  <p>What and where do I need to type to make grails not to generate the empty spaces or empty lines?</p>
  <p>Thanks!</p>
  <p>Just for example. I have an empty domain.  And then use generate-all to create all the controller and view.  This is the HTML spat out from the index.gsp.  If you use your mouse to highlight the HTML, you will see a lot of empty spaces.</p>
  <pre><code>
  &lt;!doctype html&gt;
  &lt;html lang=&quot;en&quot; class=&quot;no-js&quot;&gt;
  &lt;head&gt;
      &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;/&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;/&gt;
      &lt;title&gt;
          NewGroovyClass List
      &lt;/title&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;/&gt;
      &lt;link rel=&quot;icon&quot; type=&quot;image/x-ico&quot; href=&quot;/assets/favicon.ico&quot;/&gt;
  
      &lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/bootstrap.css?compile=false&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/grails.css?compile=false&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/main.css?compile=false&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/mobile.css?compile=false&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/application.css?compile=false&quot; /&gt;
  
  
      
          &lt;meta name=&quot;layout&quot; content=&quot;main&quot;/&gt;
          
          
      
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;nav class=&quot;navbar navbar-expand-lg navbar-dark navbar-static-top&quot; role=&quot;navigation&quot;&gt;
      &lt;a class=&quot;navbar-brand&quot; href=&quot;/#&quot;&gt;&lt;img src=&quot;/assets/grails.svg&quot; alt=&quot;Grails Logo&quot;/&gt;&lt;/a&gt;
      &lt;button class=&quot;navbar-toggler&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#navbarContent&quot; aria-controls=&quot;navbarContent&quot; aria-expanded=&quot;false&quot; aria-label=&quot;Toggle navigation&quot;&gt;
          &lt;span class=&quot;navbar-toggler-icon&quot;&gt;&lt;/span&gt;
      &lt;/button&gt;
  
      &lt;div class=&quot;collapse navbar-collapse&quot; aria-expanded=&quot;false&quot; style=&quot;height: 0.8px;&quot; id=&quot;navbarContent&quot;&gt;
          &lt;ul class=&quot;nav navbar-nav ml-auto&quot;&gt;
              
          &lt;/ul&gt;
      &lt;/div&gt;
  
  &lt;/nav&gt;
  
  
          &lt;a href=&quot;#list-newGroovyClass&quot; class=&quot;skip&quot; tabindex=&quot;-1&quot;&gt;Skip to content&amp;hellip;&lt;/a&gt;
          &lt;div class=&quot;nav&quot; role=&quot;navigation&quot;&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a class=&quot;home&quot; href=&quot;/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href=&quot;/newGroovyClass/create&quot; class=&quot;create&quot;&gt;New NewGroovyClass&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;div id=&quot;list-newGroovyClass&quot; class=&quot;content scaffold-list&quot; role=&quot;main&quot;&gt;
              &lt;h1&gt;NewGroovyClass List&lt;/h1&gt;
              
              
  
              &lt;div class=&quot;pagination&quot;&gt;
                  
              &lt;/div&gt;
          &lt;/div&gt;
      
  
  &lt;div class=&quot;footer row&quot; role=&quot;contentinfo&quot;&gt;
      &lt;div class=&quot;col&quot;&gt;
          &lt;a href=&quot;http://guides.grails.org&quot; target=&quot;_blank&quot;&gt;
              &lt;img src=&quot;/assets/advancedgrails.svg&quot; alt=&quot;Grails Guides&quot; class=&quot;float-left&quot;/&gt;
          &lt;/a&gt;
          &lt;strong class=&quot;centered&quot;&gt;&lt;a href=&quot;http://guides.grails.org&quot; target=&quot;_blank&quot;&gt;Grails Guides&lt;/a&gt;&lt;/strong&gt;
          &lt;p&gt;Building your first Grails app? Looking to add security, or create a Single-Page-App? Check out the &lt;a href=&quot;http://guides.grails.org&quot; target=&quot;_blank&quot;&gt;Grails Guides&lt;/a&gt; for step-by-step tutorials.&lt;/p&gt;
  
      &lt;/div&gt;
      &lt;div class=&quot;col&quot;&gt;
          &lt;a href=&quot;http://docs.grails.org&quot; target=&quot;_blank&quot;&gt;
              &lt;img src=&quot;/assets/documentation.svg&quot; alt=&quot;Grails Documentation&quot; class=&quot;float-left&quot;/&gt;
          &lt;/a&gt;
          &lt;strong class=&quot;centered&quot;&gt;&lt;a href=&quot;http://docs.grails.org&quot; target=&quot;_blank&quot;&gt;Documentation&lt;/a&gt;&lt;/strong&gt;
          &lt;p&gt;Ready to dig in? You can find in-depth documentation for all the features of Grails in the &lt;a href=&quot;http://docs.grails.org&quot; target=&quot;_blank&quot;&gt;User Guide&lt;/a&gt;.&lt;/p&gt;
  
      &lt;/div&gt;
  
      &lt;div class=&quot;col&quot;&gt;
          &lt;a href=&quot;https://grails-slack.cfapps.io&quot; target=&quot;_blank&quot;&gt;
              &lt;img src=&quot;/assets/slack.svg&quot; alt=&quot;Grails Slack&quot; class=&quot;float-left&quot;/&gt;
          &lt;/a&gt;
          &lt;strong class=&quot;centered&quot;&gt;&lt;a href=&quot;https://grails-slack.cfapps.io&quot; target=&quot;_blank&quot;&gt;Join the Community&lt;/a&gt;&lt;/strong&gt;
          &lt;p&gt;Get feedback and share your experience with other Grails developers in the community &lt;a href=&quot;https://grails-slack.cfapps.io&quot; target=&quot;_blank&quot;&gt;Slack channel&lt;/a&gt;.&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;div id=&quot;spinner&quot; class=&quot;spinner&quot; style=&quot;display:none;&quot;&gt;
      Loading&amp;hellip;
  &lt;/div&gt;
  
  &lt;script type=&quot;text/javascript&quot; src=&quot;/assets/jquery-3.3.1.min.js?compile=false&quot; &gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;/assets/bootstrap.js?compile=false&quot; &gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;/assets/popper.min.js?compile=false&quot; &gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;/assets/application.js?compile=false&quot; &gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  </code></pre>