You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 months ago | |
---|---|---|
components | 4 months ago | |
stores | 4 months ago | |
.envrc | 4 months ago | |
.gitignore | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
flake.lock | 4 months ago | |
flake.nix | 4 months ago | |
package.json | 4 months ago | |
pnpm-lock.yaml | 4 months ago |
README.md
Slidev bibliography addons
This addons provides a Sources
and Source
component to show sources.
Setup
- Install the addon with your favorite package manager
- Install
pinia
as a dependency with your favorite package manager - Add it in your frontmatter:
addons:
- slidev-addon-bibliography
- Create a
bibliography.json
file in the root of your slidev presentation with an empty object ({}
). - Create a
setup/main.ts
file with the following contents:
import { defineAppSetup } from '@slidev/types'
import Bibliography from '../bibliography.json'
import { createPinia } from 'pinia'
const pinia = createPinia()
export default defineAppSetup(({ app }) => {
app.use(pinia)
app.provide('bibliography', Bibliography)
})
Usage
In the bibliography.json
file, add sources like this:
{
"ot": {
"url": "https://en.wikipedia.org/wiki/Operational_transformation"
},
"crdtPaper": {
"title": "Nuno Preguiça: Conflict-free Replicated Data Types: An Overview. arXiv:1806.10254, June 2018."
}
}
Each source can have a url, a title or both.
In your slides, reference a source like this:
* Something <Source item="ot"/>
It will then show up in the slide with a reference like [0]
.
On the slide where you want to include all used sources, simply add the <Sources/>
component.
It will show all sources you've used in order of appearance.
License
MIT