Files
overleaf-cep/services/web/modules/zotero/index.mjs
T
yu-i-i 9afab5ade1 Zotero: improve integration and reference import
- use OAuth instead of tokens
  - add an integration card
  - improve error handling
  - add BibLaTeX format support
  - fix indexing of linked .bib files on creation
2026-09-22 02:41:43 +02:00

27 lines
700 B
JavaScript

import Settings from '@overleaf/settings'
import ZoteroRouter from './app/src/ZoteroRouter.mjs'
let ZoteroModule = {}
if (Settings.enabledLinkedFileTypes?.includes('zotero')) {
const { default: ZoteroLinkedFileAgent } = await import(
'./app/src/ZoteroLinkedFileAgent.mjs'
)
const siteUrl = Settings.siteUrl.replace(/\/+$/, '') || 'http://localhost'
Settings.zotero = {
clientKey: process.env.ZOTERO_CLIENT_KEY,
clientSecret: process.env.ZOTERO_CLIENT_SECRET,
callbackURL: `${siteUrl}/user/zotero/oauth/callback`,
},
ZoteroModule = {
router: ZoteroRouter,
linkedFileAgents: {
zotero: () => ZoteroLinkedFileAgent,
},
}
}
export default ZoteroModule