Skip to content

Commit

Permalink
[SHIP] Config changes to support migration to AWS Amplify for hosting (
Browse files Browse the repository at this point in the history
…#15)

* Changed Jekyll site path and removed GitHub Deploy Action

* Change site.github.url Jekyll Key to site.amplify_url

* changed amplify_url for merge to main
  • Loading branch information
jachan authored Apr 23, 2024
1 parent 5f3d4d8 commit 5d7c7d4
Show file tree
Hide file tree
Showing 109 changed files with 254 additions and 320 deletions.
64 changes: 0 additions & 64 deletions .github/workflows/jekyll.yml

This file was deleted.

5 changes: 2 additions & 3 deletions _config.dev.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github:
url: http://localhost:4000
repository_url: https://github.com/newjersey/taxation-mef-viewer
amplify_url: http://localhost:4000
repository_url: https://github.com/newjersey/taxation-mef-viewer
5 changes: 2 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ exclude: [
]

repository: newjersey/taxation-mef-viewer
github:
url: https://newjersey.github.io/taxation-mef-viewer
repository_url: https://github.com/newjersey/taxation-mef-viewer
amplify_url: https://main.d213b2tcid8n28.amplifyapp.com
repository_url: https://github.com/newjersey/taxation-mef-viewer
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<title>IRS e-File Transformation</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.0/es6-promise.auto.min.js"></script>
<script src="{{ site.github.url }}/js/wgxpath.install.js"></script>
<script src="{{ site.github.url }}/js/polyfills.js"></script>
<script src="{{ site.github.url }}/js/index.js"></script>
<script src="{{ site.amplify_url }}/js/wgxpath.install.js"></script>
<script src="{{ site.amplify_url }}/js/polyfills.js"></script>
<script src="{{ site.amplify_url }}/js/index.js"></script>

<link href="https://fonts.googleapis.com/css?family=Merriweather:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400i" rel="stylesheet" type="text/css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="{{ site.github.url }}/css/index.css" rel="stylesheet">
<link rel="shortcut icon" type="image/x-icon" href="{{ site.github.url }}/favicon.svg">
<link href="{{ site.amplify_url }}/css/index.css" rel="stylesheet">
<link rel="shortcut icon" type="image/x-icon" href="{{ site.amplify_url }}/favicon.svg">
</head>

<body>
Expand Down Expand Up @@ -67,16 +67,16 @@ <h2>Step 3: Select tax form to view</h2>
<div class="content-section">
<h2>Translate Raw Data Back Into a Form</h2>
<div class="demo-imgs">
<img src="{{ site.github.url }}/img/xml_snap.png">
<img src="{{ site.github.url }}/img/form_render.png">
<img src="{{ site.amplify_url }}/img/xml_snap.png">
<img src="{{ site.amplify_url }}/img/form_render.png">
</div>
<p>The IRS' Modern E-File (MEF) program uses XML files as the standard file format for tax return data.
This tool allows users to transform XML into a human-readable, printable format, using the <a
href="https://www.irs.gov/e-file-providers/modernized-e-file-mef-stylesheets">IRS' own stylesheets</a>.
</p>
</div>

<footer>Built with ♡ by the <a href="https://innovation.nj.gov/">New Jersey Office of Innovation</a>.<br />Stylesheets and code are available open-source on <a href="{{ site.github.repository_url }}">GitHub</a>.
<footer>Built with ♡ by the <a href="https://innovation.nj.gov/">New Jersey Office of Innovation</a>.<br />Stylesheets and code are available open-source on <a href="{{ site.repository_url }}">GitHub</a>.
</footer>
</body>

Expand Down
2 changes: 1 addition & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function loadFile() {
}
}

location.href = '{{ site.github.url }}/transform.html?h=' + newId;
location.href = '{{ site.amplify_url }}/transform.html?h=' + newId;
}).catch(function(err) {
$('#file-error').text(err);
console.log(err);
Expand Down
4 changes: 2 additions & 2 deletions js/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $(function() {

// Attempt to load the user-provided XML e-file
function gatherInputXML(inputFile) {
var templateFile = '{{ site.github.url}}/form_template.xml';
var templateFile = '{{ site.amplify_url}}/form_template.xml';
var templateStr = sessionStorage.getItem('template');
var inputStr = sessionStorage.getItem(inputStorageId());

Expand Down Expand Up @@ -375,7 +375,7 @@ function setNodeValue(dom, nodeName, value) {
// given the provided e-file form
function getStylesheetPath(templateDom, formId) {
var year = templateDom.getElementsByTagName('ReturnVersion')[0].textContent.match(/\d+/)[0];
return '{{ site.github.url}}/mef/Stylesheets/'+year+'/'+formId+'.xsl';
return '{{ site.amplify_url}}/mef/Stylesheets/'+year+'/'+formId+'.xsl';
}

//======================================
Expand Down
2 changes: 1 addition & 1 deletion mef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ However, the directories within the IRS package are not comprehensive. They cont

Additionally, any files containing relative links need to be updated to include Jekyll front matter and to support the hosted address of this application. Ex:
```
<xsl:param name="NonVersionedImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
```

To automate the process of importing a new tax year, the [`import_taxyear` script](/script/import_taxyear.rb) is available.
Expand Down
8 changes: 4 additions & 4 deletions mef/Stylesheets/2008/CommonPathRef.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Description: This file contains parameters that define XPaths or string values t
</xsl:choose>
</xsl:param>
<!-- Parameters that define the absolute path of files. Paths for images, javascript, and CSS stylesheet definition files are defined. -->
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<!-- The Separated parameter is used in the separated repeating data feature. -->
<xsl:param name="Separated">separated</xsl:param>
<!-- The following parameters define data that can be used to categorize the IRS forms being displayed. -->
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2008/PrintDocList.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
featureList += ",left=" + xPos;

<!-- Open new window to display print documents -->
printWindow = window.open("{{ site.github.url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);
printWindow = window.open("{{ site.amplify_url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);

<!-- Wait for new window to become 'available' before setting target for form and submitting -->
setTimeout(printDocsHelper, 100);
Expand Down Expand Up @@ -683,7 +683,7 @@ function printDocsHelper()

<!-- Checkbox to allow user to set the value for the print parameter for Accepted Returns only -->
<xsl:call-template name="displayTaxpayerSelectCkbox" />
<form action="{{ site.github.url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">
<form action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">

<input type="hidden" name="stage" value="{$Stage}" />
<input type="hidden" name="dln" value="{$DLN}" />
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2008/PrintReturnSections.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<xsl:strip-space elements="*" />

<!-- Set image path -->
<xsl:param name="ImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="ImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:variable name="TOCPathElims" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Eliminations" />
<xsl:variable name="TOCPathAdjs" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Adjustments" />
<xsl:variable name="TOCPathParent" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Parent" />
Expand Down Expand Up @@ -297,7 +297,7 @@ function init() {
<body onload="init();">

<!-- Post this form to populate the print doc list frame on the right side of the print window -->
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.github.url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<input type="hidden" name="stage" value="{/AppData/Parameters/Stage}" />
<input type="hidden" name="dln" value="{/AppData/Parameters/DLN}" />
<input type="hidden" name="dlnChanged" value="{/AppData/Parameters/DLNChanged}" />
Expand Down
8 changes: 4 additions & 4 deletions mef/Stylesheets/2009/CommonPathRef.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Description: This file contains parameters that define XPaths or string values t
</xsl:choose>
</xsl:param>
<!-- Parameters that define the absolute path of files. Paths for images, javascript, and CSS stylesheet definition files are defined. -->
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<!-- The Separated parameter is used in the separated repeating data feature. -->
<xsl:param name="Separated">separated</xsl:param>
<!-- The following parameters define data that can be used to categorize the IRS forms being displayed. -->
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2009/PrintDocList.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
featureList += ",left=" + xPos;

<!-- Open new window to display print documents -->
printWindow = window.open("{{ site.github.url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);
printWindow = window.open("{{ site.amplify_url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);

<!-- Wait for new window to become 'available' before setting target for form and submitting -->
setTimeout(printDocsHelper, 100);
Expand Down Expand Up @@ -683,7 +683,7 @@ function printDocsHelper()

<!-- Checkbox to allow user to set the value for the print parameter for Accepted Returns only -->
<xsl:call-template name="displayTaxpayerSelectCkbox" />
<form action="{{ site.github.url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">
<form action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">

<input type="hidden" name="stage" value="{$Stage}" />
<input type="hidden" name="dln" value="{$DLN}" />
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2009/PrintReturnSections.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<xsl:strip-space elements="*" />

<!-- Set image path -->
<xsl:param name="ImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="ImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:variable name="TOCPathElims" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Eliminations" />
<xsl:variable name="TOCPathAdjs" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Adjustments" />
<xsl:variable name="TOCPathParent" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Parent" />
Expand Down Expand Up @@ -297,7 +297,7 @@ function init() {
<body onload="init();">

<!-- Post this form to populate the print doc list frame on the right side of the print window -->
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.github.url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<input type="hidden" name="stage" value="{/AppData/Parameters/Stage}" />
<input type="hidden" name="dln" value="{/AppData/Parameters/DLN}" />
<input type="hidden" name="dlnChanged" value="{/AppData/Parameters/DLNChanged}" />
Expand Down
8 changes: 4 additions & 4 deletions mef/Stylesheets/2010/CommonPathRef.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Description: This file contains parameters that define XPaths or string values t
</xsl:choose>
</xsl:param>
<!-- Parameters that define the absolute path of files. Paths for images, javascript, and CSS stylesheet definition files are defined. -->
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.github.url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<xsl:param name="ScriptPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/scripts')"></xsl:value-of></xsl:param>
<xsl:param name="ImagePath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/images')"></xsl:value-of></xsl:param>
<xsl:param name="NonVersionedImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="CSSPath"><xsl:value-of select="concat('{{ site.amplify_url }}/mef/rrprd/sdi/versioned/',$TaxYear,'/styles')"></xsl:value-of></xsl:param>
<!-- The Separated parameter is used in the separated repeating data feature. -->
<xsl:param name="Separated">separated</xsl:param>
<!-- The following parameters define data that can be used to categorize the IRS forms being displayed. -->
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2010/PrintDocList.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@
featureList += ",left=" + xPos;

<!-- Open new window to display print documents -->
printWindow = window.open("{{ site.github.url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);
printWindow = window.open("{{ site.amplify_url }}/mef/rrprd/sdi/pages/templates/print_msg_content", "PrintMsgContentWindow", featureList);

<!-- Wait for new window to become 'available' before setting target for form and submitting -->
setTimeout(printDocsHelper, 100);
Expand Down Expand Up @@ -692,7 +692,7 @@ function printDocsHelper()

<!-- Checkbox to allow user to set the value for the print parameter for Accepted Returns only -->
<xsl:call-template name="displayTaxpayerSelectCkbox" />
<form action="{{ site.github.url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">
<form action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/{$docForm}" name="{$docForm}" id="{$docForm}" method="post" target="_blank">

<input type="hidden" name="stage" value="{$Stage}" />
<input type="hidden" name="dln" value="{$DLN}" />
Expand Down
4 changes: 2 additions & 2 deletions mef/Stylesheets/2010/PrintReturnSections.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<xsl:strip-space elements="*" />

<!-- Set image path -->
<xsl:param name="ImagePath">{{ site.github.url }}/mef/rrprd/common/images</xsl:param>
<xsl:param name="ImagePath">{{ site.amplify_url }}/mef/rrprd/common/images</xsl:param>
<xsl:variable name="TOCPathElims" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Eliminations" />
<xsl:variable name="TOCPathAdjs" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Adjustments" />
<xsl:variable name="TOCPathParent" select="/AppData/SubmissionReferenceAndSummary/ReturnTableOfContents/Parent" />
Expand Down Expand Up @@ -297,7 +297,7 @@ function init() {
<body onload="init();">

<!-- Post this form to populate the print doc list frame on the right side of the print window -->
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.github.url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<form id="getPrintDocListForm" name="getPrintDocListForm" action="{{ site.amplify_url }}/mef/rrprd/sdi/proxy/getPrintSubDocList" method="post" target="PrintReturnDoclist">
<input type="hidden" name="stage" value="{/AppData/Parameters/Stage}" />
<input type="hidden" name="dln" value="{/AppData/Parameters/DLN}" />
<input type="hidden" name="dlnChanged" value="{/AppData/Parameters/DLNChanged}" />
Expand Down
Loading

0 comments on commit 5d7c7d4

Please sign in to comment.