mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 09:06:46 +09:00
enhance(citation): render citations server-side (#39373)
Replace citation-js with a Go port of ruby-cff, which GitHub uses for "Cite this repository", rendering APA and BibTeX server-side and dropping about 770KB of JS. Output matches GitHub on 1568 of 1571 real-world files, the rest are improvements over GitHub. - `CITATION.cff` wins over `CITATION.bib`, matched case-insensitively and through symlinks - `CITATION.bib` is offered as-is, without APA Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
1 parent
fb067e1115
commit
2baa5a16f8
15 files changed
+704
-361
No files matched your search
Vendored
-16
@@ -30,19 +30,3 @@ declare module 'swagger-ui-dist/swagger-ui-es-bundle.js' {
|
||||
const value = await import('swagger-ui-dist');
|
||||
export default value.SwaggerUIBundle;
|
||||
}
|
||||
|
||||
declare module '@citation-js/core' {
|
||||
export class Cite {
|
||||
constructor(data: string);
|
||||
format(format: string, options?: Record<string, any>): string;
|
||||
}
|
||||
export const plugins: {
|
||||
config: {
|
||||
get(name: string): any;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
declare module '@citation-js/plugin-software-formats' {}
|
||||
declare module '@citation-js/plugin-bibtex' {}
|
||||
declare module '@citation-js/plugin-csl' {}
|
||||
Reference in new issue
Block a user