Search interface for the Queerlit database and the QLIT thesaurus.
This is suitable while developing, as the site will automatically be updated upon code changes.
- Install Node.js 16 and Yarn 3
yarn install
yarn dev
Node 16 is an old version, but it's currently used on GRIDH servers and cannot be upgraded there because the OS doesn't support newer versions.Using the same version when developing will make sure the code can be properly built on the servers when deploying.
- Install Node.js and Yarn
yarn install
yarn build
Resulting files in the dist
folder can be placed on a web server, or served locally with npx http-server dist
or similar.
This will build the optimized code as above, and then serve it locally. You need to install Docker, but not Node.js or Yarn.
Make sure to edit .env.local
(see Environment) before building, if needed.
- Install Docker
docker build -t queerlit-gui .
docker run -p 8090:80 queerlit-gui
- Visit site at http://localhost:8090/
The frontend is written in TypeScript, using the Vue 3 framework with Vite as a build toolchain. Tailwind is used for styling.
HTTP requests are made with Axios to Libris XL (libris.service.ts), the Queerlit thesaurus backend (terms.service.ts) and Library of Congress Subject Headings (lcsh.service.ts).
While developing, you may be helped by running yarn typecheck
, yarn lint
and yarn format
. See their definitions in package.json.
A few settings can be configured by setting environment variables. See Vite docs.
- Set
VITE_XLAPI_QA
to1
to use the test environment of Libris XL, libris-qa.kb.se - Set
VITE_MATOMO_URL
andVITE_MATOMO_ID
to enable stats reporting to a Matomo backend - Set
VITE_QLIT_BASE
to override the standard thesaurus backend URL (including trailing slash), e.g. if you are developing that too and want to test the frontend against it
If you are using Visual Studio Code to edit the code, these settings should enable automatic linting and formatting.
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Notable changes are logged in CHANGELOG.md. Releasing a new version means:
- Making sure changes are logged under a new version number (bump the major, minor or patch number) in
CHANGELOG.md
in thedev
branch - Update version number in
package.json
- Merging
dev
intomain
without fast-forwarding - Tagging the merge commit with the version number in the form
vX.X.X
- Pushing the branches and the tag:
git push; git push --tags