This plugin helps us to solve some problems that we encounter when trying to edit content through Federalist.
When on a pull request in GitHub, it provides you with a link to the Federalist preview, even before the preview has been fully built out.
As an editor, it is hard to know where to go in the CMS to edit all the elements on a page, as different modules often come from different data sources.
The "edit-this" feature is a way to make it easier to edit the file at the source of that data or content.
In the head of your page, you'll need to insert:
<script type="text/javascript">
git_org = "GSA";
git_repo = "digitalgov.gov";
branch = "master"
</script>
If you want to make an element on the page editable, pass the relative path to the file that you want to edit, into the parent <div> that surrounds the content.
Example
<article data-edit-this="/_pages/hello-world.md">
Hello world!
</article>
In your footer, add this:
<div class="edit_tools">
<a class="editor" href="#"><i class="far fa-edit"></i></a>
</div>