Skip to content

Standards, Practices, Rules

adam breznicky edited this page Sep 10, 2019 · 1 revision

pretty visual diagram of website update workflow

pretty visual diagram of pull request workflow

  • the standard IS Team and tnris.org workflow REQUIRES all site changes to flow through "tnris.org website updates" and "pull requests" workflows as shown above. code cannot be pushed into master/production without all steps in the workflow having been completed.

  • link macros (i.e. m.link()) have been deprecated. an automated process checks the format of all links and performs the macro validation in anchor, img, etc. tags after each build without any extra developer responsibility.

  • partials can be used in the markdown files. to utilize a partial in a .md file, wrap the 'include' reference in it's own <div>. The path to the partial finds the partial template file starting at the base of the 'templates' folder. Example: <div>{% include "partials/course-cancellation.njk" %}</div> for "templates/partials/course-cancellation.njk".

  • Links must all be full path links (across the entire site). Internal site page links would be based on starting from the root domain of the site infrastructure. This means all links should start with a beginning / and path all the way to the destination file minus only index.html or the final tail /. Example: <a href="/news/2018-11-30/new-2018-east-texas-aerial-imagery-now-available">news link</a> for a link to site url 'https://tnris.org/news/2018-11-30/new-2018-east-texas-aerial-imagery-now-available'. Links to the tnris.org homepage would simply be href="/".

  • .md content files' markdown syntax cannot be used within HTML tags! this includes links, bolding, bullets, header, paragraph, etc. All characters within HTML tags within markdown (.md) files will be rendered literally and not interpreted as markdown syntax. Both markdown and html (tags) syntax can be used together within the markdown files, but the markdown syntax simply cannot be nested within the HTML tags. Example of incorrect nested syntax: <p> Check out this [link text](http://www.link.com) </p> will not convert the link text into an <a href... link.

  • proper indentation, newlines, and spacing should be used for all html syntax in respect to nested elements. this is to ensure a quality standard and human readability throughout all website files. this means no un-needed newlines, no large gaps of space, opening and closing tags should be aligned, etc.

incorrect indentation example:

<div id="container">
<img src="http://something.com">
                 <p>This is text<a href="nowhere">
        and a link
        to go somewhere else!</a><br> But don't ever be fooled,
because <a href="ugh"> not all links work.

</a>
</p>

</div>

correct indentation example:

<div id="container">
    <img src="http://something.com">
    <p>
        This is text <a href="/nowhere">and a link to go somewhere else!</a> 
        <br>
        But don't ever be fooled, because <a href="/pages/ugh"> not all links work.</a>
    </p>
</div>