Published
Edited
Jul 27, 2020
Importers
5 stars
Insert cell
Insert cell
bibtex = FileAttachment("taser-report@3.json")
Insert cell
md`## 5. Creating in-page links

Great! You're all set. To create a link to the source use a Markdown tag with the first four letters of the author and the year like this: [Amnesty International Report](#Amne18).
`
Insert cell
Insert cell
Insert cell
taserBibliography = {
let bib = md`${bibliography.format('bibliography', {
format: 'text',
template: 'md',
prepend() {
return `* `;
}
})}`;
bib.querySelectorAll('li a:first-child').forEach(link => {
link.setAttribute('name', link.hash.substr(1));
link.removeAttribute('href');
});
return bib;
}
Insert cell
Insert cell
bibtexJson = bibtex.json()
Insert cell
bibliography = new Cite(bibtexJson)
Insert cell
Cite = {
const Cite = await require('https://bundle.run/citation-js@0.5.0-alpha.5');
Cite.plugins.config.get('@csl').templates.add('md', csl);
return Cite;
}
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more