GitHub Action b4e6552cf8 Bump version hai 8 meses
..
docker 7e93b4ed59 remove SYS_ADMIN config and chromium-sandbox installation from pdf-converter hai 8 meses
src 998ff1ca27 Merge pull request #10174 from weseek/imprv/168827-168828/change-pdf-bulk-export-shared-html-path hai 8 meses
.env f975e96341 Revert "support: Revert pdf converter implement" hai 1 ano
.eslintignore 4fe407e62b cofigure biome for pdf-converter hai 9 meses
.gitignore f975e96341 Revert "support: Revert pdf converter implement" hai 1 ano
README.md ef3a22ca32 change BULK_EXPORT_PDF_CONVERTER_URI configuration file to .env.development.local hai 1 ano
README_JP.md ef3a22ca32 change BULK_EXPORT_PDF_CONVERTER_URI configuration file to .env.development.local hai 1 ano
nodemon.json f975e96341 Revert "support: Revert pdf converter implement" hai 1 ano
package.json b4e6552cf8 Bump version hai 8 meses
tsconfig.build.json bb302d3e15 fix non-autofixable biome lint errors hai 9 meses
tsconfig.json f234573c7f add test for PdfCtrl hai 10 meses
turbo.json f975e96341 Revert "support: Revert pdf converter implement" hai 1 ano
vitest.config.ts 4fe407e62b cofigure biome for pdf-converter hai 9 meses

README.md

日本語 🇯🇵

About this app

GROWI provides a feature that bulk exports pages in PDF format, which can be executed from the page menu. This app (PDF-Converter) is necessary to convert markdown pages to PDF during that process.

Development

Spec (only in Japanese)

/資料/内部仕様/Page Bulk Export/PDF エクスポート

Developing inside a devcontainer

  1. Open VSCode
  2. Create .devcontainer/compose.extend.yml with the same contents as .devcontainer/compose.extend.template.yml
  3. Open command palette (Windows: Ctrl + Shift + P, Mac: Cmd + Shift + P)
  4. Choose Dev Containers: Open folder in Container...
  5. Choose the root growi directory you have cloned from https://github.com/weseek/growi
    • Not the PDF-Converter directory (growi/apps/pdf-converter)
  6. Choose GROWI-PDF-Converter as the container to open
  7. Execute cd apps/pdf-converter && turbo dev:pdf-converter to start the pdf-converter app
  8. Edit files in apps/pdf-converter for development

Requesting PDF-Converter from GROWI (both running in a devcontainer)

  1. Open VSCode and open GROWI devcontainer
    • Choose GROWI-Dev for the container to open
  2. Add BULK_EXPORT_PDF_CONVERTER_URI=http://pdf-converter:3010 to apps/app/.env.development.local
  3. Open a new VSCode window and open PDF-Converter devcontainer
  4. Start both apps
  5. Request PDF bulk export from the page menu in the GROWI app
    • It might take a few minutes, depending on GROWI's configurations

Note

When creating both containers from scratch or rebuilding them, make sure to select and create GROWI-Dev first. This is necessary because GROWI-Dev uses devcontainer features for enabling node, and features is only enabled for the first container created.

PDF-Converter client library

pdf-converter-client is a client library for requesting PDF-Converter, and is used by GROWI internally. It's code is auto-generated from the PDF-Converter code.

When you update the PDF-Converter API, you should also always update the client library.

You can update the client library by one of the following ways:

  • Execute cd ${growi_root_path}/packages/pdf-converter-client && pnpm gen:client-code
  • Start GROWI app
    • Inside GROWI devcontainer (not PDF-Converter devcontainer), execute cd ${growi_root_path}/apps/app && turbo dev