Skip to content

tiloschroeder/html5_doctype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge

HTML5 Doctype

This extension for Sym8 (and formerly Symphony CMS) enforces a modern HTML5 doctype regardless of your XSLT output.

It updates the Sym8 / Symphony output to use the HTML5 doctype and provides additional options for modern, clean markup.

The extension replaces the XHTML syntax with basic HTML5 syntax. What it actually does is parse any HTML output after XSLT processing to swap out the first four lines of the HTML output. For example, the following XHTML doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

is replaced with an HTML5 doctype:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />

Features

  • HTML5 Doctype – ensures all pages output the <!DOCTYPE html> declaration.
  • Preferences page integration – configure extension behavior in System → Preferences.
  • HTML Minification – optionally minify the generated HTML source code.
  • Exclusions – specify HTML elements (e.g. <pre>, <code>) that should not be minified.
  • Modern empty tags – self-closing tags are output without trailing slash (e.g. <br> instead of <br />).

Notes

  • Legacy Internet Explorer conditional comments have been removed, as IE is no longer supported. 🦖
  • Preferences are stored per installation; defaults apply when no custom settings are defined.

Changelog

  • Added optional HTML minification
  • Added exclusions for specific HTML elements (e.g. <pre>, <code>)
  • Self-closing tags now output without trailing slash
  • Update the Readme file
  • Removed legacy IE conditional comments
  • Updated for Sym8 compatibility

About

This extension for Sym8 enforces a modern HTML5 doctype regardless of your XSLT output.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages