yamllinter.html.twig 864 B

12345678910111213141516171819202122
  1. {% if result %}
  2. <div class="alert warning"><strong>YAML Linting:</strong> Found <strong>{{ result|length }}</strong> linting errors</div>
  3. <table>
  4. {% for path, error in result %}
  5. {% set page_path = base_path ~ (path|pathinfo).dirname %}
  6. {% set page = grav.pages.get(page_path) %}
  7. <tr>
  8. <td><i class="fa fa-file-text-o"></i>
  9. {% if page.url %}
  10. <a href="{{ base_url ~ '/pages' ~ page.route }}/mode:expert">{{ page.route }}</a>
  11. {% else %}
  12. {{ path }}
  13. {% endif %}
  14. </td>
  15. <td class="double">{{ error }}</td>
  16. </tr>
  17. {% endfor %}
  18. </table>
  19. {% else %}
  20. <div class="alert info"><strong>YAML Linting:</strong> No errors found.</div>
  21. {% endif %}