Skip to content
Snippets Groups Projects
Commit 09ea61b6 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

document how articles references works

parent b0260d81
No related branches found
No related tags found
1 merge request!23Resolve "Document zotero process"
Pipeline #114529 passed
# Content v2 Minimal Starter
# Knowledge database of information about defense systems in prokaryotes
## How to use references in the wiki pages
You can add article references by providing a doi directly in the markdown files.
There is two syntaxes that won't do exactly the same thing.
You can add the doi in the [front-matter](https://content.nuxt.com/usage/markdown#front-matter) like :
```yaml
relevantAbstracts:
- doi: 10.1016/j.mib.2005.06.006
- doi: 10.1023/A:1002027321171
```
or directly in the content of the page using:
```md
:ref{doi=10.1023/A:1002027321171}
```
In both cases, before the page is rendered, these doi are parsed, the associated metadatas are automatically fetched and displayed at the bottom of the page like:
![references](/public/readme/references.png)
When using the `:ref{doi=10.1023/A:1002027321171}` syntax, a link is added like `(Barrangou et al, 2017)`
## Article metadata source
They come from a local file [articles.json](public/articles.json). This file is automatically generated during each run of the production [deployment pipeline](/.gitlab-ci.yml) from a [Zotero collection](https://www.zotero.org/groups/5151022/mdmlab/collections/BSWL96X3) using the script [get-articles.py](/scripts/get-articles.py). If the doi is not found in this file, [crossref](https://api.crossref.org/) is used as fallback.
## How can we update the [Zotero collection](https://www.zotero.org/groups/5151022/mdmlab/collections/BSWL96X3)
Whoever belongs to the MDM Zotero group can update it.
For person external, you can create an [issue](https://gitlab.pasteur.fr/mdm-lab/wiki/-/issues/new) that list at least doi you want to add.
## Contributing
Look at the [Content documentation](https://content-v2.nuxtjs.org/) to learn more.
## Setup
### Setup
Make sure to install the dependencies:
......@@ -17,15 +54,15 @@ npm install
pnpm install
```
## Development Server
### Development Server
Start the development server on http://localhost:3000
Start the development server on <http://localhost:3000>
```bash
npm run dev
```
## Production
### Production
Build the application for production:
......
......@@ -16,7 +16,7 @@ const doiBaseUrl = ref(new URL("https://doi.org/"));
const fetchedDoi = ref(
await Promise.all(
props.items.map(async (doi) => {
const url = new URL(`/works/${doi}`, " https://api.crossref.org/").href;
const url = new URL(`/works/${doi}`, "https://api.crossref.org/").href;
const { data, error } = await useFetchVueUse<{
message: {
DOI: string;
......
public/readme/references.png

146 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment