Skip to content

Commit

Permalink
netlify testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnyder authored Oct 4, 2021
1 parent ca47544 commit 974be4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ <h1>Update Juncture site</h1>

<script>

const ENV = window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod') > 0 || window.location.hostname.indexOf('githubpreview') > 0 ? 'DEV' : 'PROD'
const ENV = window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod') > 0 || window.location.hostname.indexOf('githubpreview') > 0 || window.location.hostname.indexOf('netlify.app') > 0 ? 'DEV' : 'PROD'
let isJuncture = window.location.hostname.indexOf('juncture-digital.org') === 0 || ENV === 'DEV'
const junctureVersion = 'v0.5.0'
let junctureVersionHash
Expand Down Expand Up @@ -378,7 +378,7 @@ <h1>Update Juncture site</h1>
if (gaPropertyID) ga('create', gaPropertyID, 'auto')
if (siteConfig.description) setMetaDescription(siteConfig.description)
let attrsWithUrls = ['banner', 'favicon', 'logo']
if ((window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod.io') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0) && (contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture-digital') ) {
if ((window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod.io') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0 || window.location.hostname.indexOf('netlify.app') > 0) && (contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture-digital') ) {
attrsWithUrls.forEach(attr => { if (config[attr]) config[attr] = convertURL(config[attr]) })
} else {
headRef(contentSource.acct, contentSource.repo, contentSource.ref).then(headHash => {
Expand Down Expand Up @@ -673,7 +673,7 @@ <h1>Update Juncture site</h1>

async getMarkdown(path) {
// if ((window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod.io') > 0) && (contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture-digital')) {
if (window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod.io') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0) {
if (window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod.io') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0 || window.location.hostname.indexOf('netlify.app') > 0) {
let url = `${contentSource.baseUrl}${contentSource.basePath}${path}`
let resp = await fetch(url)
if (resp.ok) return await resp.text()
Expand Down Expand Up @@ -1420,7 +1420,7 @@ <h1>Update Juncture site</h1>

let ref = contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture' ? junctureVersionHash : contentSource.ref

if ((window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0) && (contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture-digital')) {
if ((window.location.hostname === 'localhost' || window.location.hostname.indexOf('gitpod') > 0 || window.location.hostname.indexOf('githubpreview.dev') > 0 || window.location.hostname.indexOf('netlify.app') > 0) && (contentSource.acct === 'jstor-labs' && contentSource.repo === 'juncture-digital')) {

componentsList = [...componentsList, ...await listComponents(
`${contentSource.baseUrl}${contentSource.isGhpSite ? contentSource.basePath : ''}`, 'custom/components')]
Expand Down

0 comments on commit 974be4e

Please sign in to comment.