whiskyechobravo / kerkoapp

A web application that provides a faceted search interface for bibliographies managed with Zotero.
https://whiskyechobravo.github.io/kerko/
BSD 3-Clause "New" or "Revised" License
68 stars 24 forks source link

Customized collection facets don't show up #28

Closed remillc closed 2 years ago

remillc commented 2 years ago

Given the following configs, with the KERKOAPP_COLLECTION_FACETS variable, the facets menu should display the following:

But instead it displays the default facets:

https://bibliographies.bib.umontreal.ca/remillc/bibliography/

The zoteroapp is installed using a python virtual environment and a WSGI server.

Here are the Zotero link to the group and the .env configuration file used:

Zotero group: https://www.zotero.org/groups/4833782/test-remillc-2/library

# Documentation: https://github.com/whiskyechobravo/kerkoapp#environment-variables

# Kerko variables.
SECRET_KEY=ZWehodY9u0N4LHWNrLhy
KERKO_TITLE=Test 2
KERKO_ZOTERO_API_KEY=njNkHhi4RNsu5QK1ZqdZK6Dl
KERKO_ZOTERO_LIBRARY_ID=4833782
KERKO_ZOTERO_LIBRARY_TYPE=group
KERKO_PRINT_ITEM_LINK=True
KERKO_PRINT_CITATIONS_LINK=True

KERKO_DATA_DIR=/<_path to_>/kerkoapp/data/kerko
BABEL_DEFAULT_TIMEZONE=America/Montreal
BABEL_DEFAULT_LOCALE=fr
KERKO_WHOOSH_LANGUAGE=fr

# KerkoApp variables.
FLASK_APP=kerkoapp.py
FLASK_ENV=production

# Docker container variables.
MODULE_NAME=kerkoapp

# Personnalisations
# KERKO_FACET_COLLAPSING=True
KERKOAPP_COLLECTION_FACETS=F3B5WRMF:0:Collection 1; ACRTRJ9A:1:Collection 2; EGH4IKGP:2:Collection 3; PJSLGI9L:3:Collection 4; C6W5S9LR:4:Collection 5; 39WFSHPN:5:Collection 6; PUDEPTQX:6:Collection 7; ZGMKZ8VH:7:Collection 8
LOGGING_LEVEL=DEBUG

Any help sould be appreciated!

davidlesieur commented 2 years ago

Top-level collections only serve as facet labels. I suggest that you create sub-collections under your top-level Collection 1 ... Collection 8, populate those sub-collections with items, then re-sync Kerko. After that, I'm pretty sure the facets will appear in Kerko! (Note: no need to re-clean when just adding sub-collections and not changing the Kerko configuration).

You may compare https://www.zotero.org/groups/2348869/kerko_demo/library with https://demo.kerko.whiskyechobravo.com/bibliography/ for an example.

remillc commented 2 years ago

Ok, I understand! I populated the top level collections with sub-collections and the facets appeared. Thanks!