feat: add global bibliography support to pandoc-reader plugin#44
feat: add global bibliography support to pandoc-reader plugin#44filipaldi wants to merge 2 commits intopelican-plugins:mainfrom
Conversation
filipaldi
commented
Jul 7, 2025
- Add support for global bibliography files with configurable names
- Maintain backward compatibility with individual bibliography files
- Add PANDOC_GLOBAL_BIB_FILES setting
- Add comprehensive tests for all scenarios
- Update documentation and provide example configuration
- Add .venv and pycache to .gitignore
|
@filipaldi Thank you for your pull request. I will need to set aside some time to review it. From what I understand, the feature allows you to add a common bibliography to all your blogs or posts, which is a useful feature to have. However, how would you switch the feature off for specific blogs or posts where you do not want to add the common bibliography? |
justinmayer
left a comment
There was a problem hiding this comment.
Thank you for the submission, @filipaldi. In addition to what @nandac said, I made a comment requesting that the .gitignore additions be removed. Also, CI is reporting test/linter failures, but that appears to be due to outdated GitHub Actions that I have since updated via ddfb7e8. If you rebase your branch on current main, those CI-related issues should hopefully be resolved.
.gitignore
Outdated
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
| .Python |
There was a problem hiding this comment.
Please revert these .gitignore changes, for two reasons.
(1) These changes are not directly related to the feature being proposed, and thus in general such changes should be submitted in separate pull requests.
(2) The entries in this project’s .gitignore file should remain specific to this project, whereas entries that apply to general Python development (such as the entries added here), should be placed in your global ignore file on your local workstation. (So therefore what I said in (1) above notwithstanding, in this case please do not submit these changes in a separate pull request.)
|
That’s a good question. I suggest using the front matter of individual articles to point to the bibliography files. This would be more flexible, I guess.
… On 8 Jul 2025, at 05:12, Nandakumar Chandrasekhar ***@***.***> wrote:
@filipaldi <https://github.com/filipaldi> Thank you for your pull request. I will need to set aside some time to review it.
From what I understand, the feature allows you to add a common bibliography to all your blogs or posts, which is a useful feature to have. However, how would you switch the feature off in cases where you do not want to add the common bibliography?
|
|
@filipaldi kindly rebase your branch and make the changes requested by @justinmayer. We will then discuss any changes or improvements before we merge this feature in. |
- Add support for global bibliography files with configurable names - Maintain backward compatibility with individual bibliography files - Add PANDOC_GLOBAL_BIB_FILES setting - Add comprehensive tests for all scenarios - Update documentation and provide example configuration
|
@filipaldi: It seems the code style linters did not pass in CI. Have you followed the Plugin Development Docs to ensure that the linters pass locally? |
|
@filipaldi, I have added some preliminary review comments. Kindly also fix the linting issues when you get a chance. I like the addition of the |
| * `bibliography.bib`, `bibliography.json`, `bibliography.yaml`, `bibliography.bibtex` | ||
| * `references.bib`, `references.json`, `references.yaml`, `references.bibtex` | ||
|
|
||
| To customize the global bibliography file names, set the `PANDOC_GLOBAL_BIB_FILES` setting in your Pelican settings file: |
There was a problem hiding this comment.
I would prefer that this variable be named PANDOC_GLOBAL_BIBLIOGRAPHIES
| To customize the global bibliography file names, set the `PANDOC_GLOBAL_BIB_FILES` setting in your Pelican settings file: | ||
|
|
||
| ```python | ||
| PANDOC_GLOBAL_BIB_FILES = ["my_bib", "global_refs", "shared_bibliography"] |
There was a problem hiding this comment.
Could you please format this like this so that it follows the standard used in the rest of the README:
PANDOC_GLOBAL_BIBLIOGRAPHIES = [
"my_bib",
"global_refs",
"shared_bibliography"
]
| bib_name = ".".join([filename, extension]) | ||
| if bib_name in files: | ||
| bib_files.append(os.path.join(root, bib_name)) | ||
| for global_name in global_bib_names: |
There was a problem hiding this comment.
I am confused with this code. Could you tell me what the path to the default bibliographies is?
A centralized path for all default bibliographies would make more sense to me.
| author = {Charlie Wood}, | ||
| date = {2019-07-11}, | ||
| urldate = {2020-11-12} | ||
| } No newline at end of file |
| author = {Rafael Alves Batista and Joel Primack}, | ||
| date = {circa 2017}, | ||
| urldate = {2020-11-12} | ||
| } No newline at end of file |
| author = {Andrew Zimmerman Jones}, | ||
| date = {2019-03-02}, | ||
| urldate = {2020-11-12} | ||
| } No newline at end of file |
| author = {Davide Castelvecchi}, | ||
| date = {2016-01-05}, | ||
| urldate = {2020-11-12} | ||
| } No newline at end of file |