Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnyder committed Sep 5, 2024
1 parent 76b8146 commit c340b6f
Show file tree
Hide file tree
Showing 11 changed files with 2,289 additions and 2,303 deletions.
6 changes: 1 addition & 5 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="apple-touch-icon" href="https://v3.juncture-digital.org/images/mobile-icon.png">

<script>
window.jekyll={site:{{site|jsonify}},page:{{page|jsonify}},content:{{content|jsonify}}}
window.jekyll={ site: {{site|jsonify}}, page: {{page|jsonify}}, content: {{content|jsonify}} }
window.options = `
title: Juncture
description: Website framework using Markdown, Github Pages, and custom web components.
Expand All @@ -30,13 +30,10 @@
`</script>

<main style="visibility:hidden;">{{ content }}</main>
<script src="{{ site.baseurl }}/ghp.js" type="module"></script>

<!--
<script type="module">

import { mount, getMarkdown, markdownToHtml } from '{{ site.baseurl }}/ghp.js'
let referrer = document.referrer ? new URL(document.referrer) : null

if (window.location.search.includes('source')) {
Expand All @@ -53,4 +50,3 @@
mount()
}
</script>
-->
5 changes: 1 addition & 4 deletions dev/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@

def html_from_markdown(md, baseurl, dir, name, path):
html = html_template.replace('{{ content }}', markdown.markdown(md, extensions=['extra', 'toc']))
html = html_template.replace('{{ content }}', markdown.markdown(md, extensions=['extra', 'toc']))

soup = BeautifulSoup(markdown.markdown(md, extensions=['extra', 'toc']), 'html5lib')

Expand Down Expand Up @@ -154,9 +153,8 @@ def html_from_markdown(md, baseurl, dir, name, path):
serialized_config = json.dumps(CONFIG)

html = html_template.replace('{{ content }}', CONFIG['content'])
html = re.sub(r'<script>window\.jekyll=.*>', '', html)
html = re.sub(r'window\.jekyll=.*', '', html)
html += '<script>window.jekyll=' + serialized_config + '</script>'

return html

@app.get('{path:path}')
Expand Down Expand Up @@ -229,7 +227,6 @@ async def serve(path: Optional[str] = None):
parser.add_argument('--repo', default='', help='Github repository')
parser.add_argument('--branch', default='main', help='Github branch')


args = vars(parser.parse_args())

os.environ['PORT'] = str(args['port'])
Expand Down
Loading

0 comments on commit c340b6f

Please sign in to comment.