Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Jekyll and Hugo as SSG "frequently-used frameworks" and replace with 11ty #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions content/engineering/languages-runtimes/language-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,28 @@ Looking at this same data and applying preferences from the guiding factors belo
## Frequently-used frameworks
The following are used widely at 18F:

| Purpose | Tool |
| ---- | ---- |
| CSS framework | [_More info_]({{ "/engineering/languages-runtimes/css/#frameworks" | url }}) |
| Infrastructure/configuration as code | [Terraform](https://www.terraform.io/) |
| Static site generator | [Jekyll](https://jekyllrb.com/) (with the [uswds-jekyll](https://github.com/18F/uswds-jekyll) theme) or Hugo |
<table>
<thead>
<tr>
<th>Purpose</th>
<th>Tool</th>
</tr>
</thead>
<tbody>
<tr>
<td>CSS framework</td>
<td><a href="{{ "/engineering/languages-runtimes/css/#frameworks" | url }}"><em>More info</em></a></td>
</tr>
<tr>
<td>Infrastructure/configuration as code</td>
<td><a href="https://www.terraform.io/">Terraform</a></td>
</tr>
<tr>
<td>Static site generator</td>
<td>{% include "engineering/tag-default.html" %} <a href="https://www.11ty.dev/">11ty/Eleventy</a></td>
</tr>
</tbody>
</table>
Comment on lines -40 to +61
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default tag snippet has a trailing newline, which is pretty standard (our prettier config wants it, for example). However, if you include the tag within markdown, it gets inserted into the markdown before the markdown is parsed, which means it can break markdown syntax. For example, a table row like this:

| Static site generator | {% include "tag" %} 11ty |

becomes

| Static site generator | tag
11ty |

When then renders as two table rows instead of one. The fix options are either remove the trailing newline from the tag snippets, which seems very fragile because anyone in the future who tweaks one and runs prettier would suddenly break this table, or replace the markdown table with an HTML one. I chose the latter. 😛


## Project scope
Perhaps the most important factor to weigh when considering languages is the estimated project scope. If we anticipate a large, long-standing project which will be handed off to our agency partners, we should be conservative in our language selection. These projects warrant our most standard approach, which generally translates to the selection of one of our primary languages. On the other hand, if writing a one-off script or small internal project, we have significantly more latitude to try experimental languages.
Expand Down
Loading