about summary refs log tree commit diff
path: root/themes/researcher/layouts/shortcodes/projectFetch.html
blob: e9439943c321e52e1f06cf7fb25623ff587d181d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div id="fetched-markdown"></div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js" type="text/javascript"></script>

<script>

fetch({{ .Get "readmeURL" }}).then((response) => response.text()).then((data) => {
        console.log(data);
        const converter = new showdown.Converter();
        const html      = converter.makeHtml(data);
        document.getElementById('fetched-markdown').innerHTML = html;
});
</script>

-----

This information was fetched from [{{ .Get "projectName" }}'s]({{ .Get "projectURL" }}) [README]({{ .Get "readmeURL" }}).