diff --git a/README.md b/README.md index f2f954d..2beaa4f 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Here is a PDF embed: - You cannot use both the `_DIR` and the `_YAML` way of configuring the same entity type. E.g., if you set both `GURU_CARD_DIR` and `GURU_CARD_YAML`, then `GURU_CARD_DIR` will be ignored. - Although the ([Guru documentation](https://developer.getguru.com/docs/guru-sync-manual-api)) requires an ExternalId and ExternalUrl for most items, you can choose to omit them here for **cards** only; the action can auto-generate these properties for you. - "Synchronized" collections take a few minutes to finish; you can check their status at `https://api.getguru.com/api/v1/import/JOBID/status`, where JOBID is the "jobId" shown at the end of the `peckjon/github-to-guru@master` step in your workflow's execution log. -- Guru automatically converts Markdown to HTML, but there are some [known issues](https://github.com/peckjon/github-to-guru/issues/7) with the conversion. To preconvert Markdown files using [markdown-it](https://www.npmjs.com/package/markdown-it), set the env `GURU_CONVERT_MARKDOWN` to `true` in your workflow. +- Guru automatically converts Markdown to HTML, but there are some [known issues](https://github.com/peckjon/github-to-guru/issues/7) with the conversion. To preconvert Markdown files using [markdown-it](https://www.npmjs.com/package/markdown-it), set the env `GURU_CONVERT_MARKDOWN` to `1` in your workflow. ### Appendix: creating a synchronized collection diff --git a/index.js b/index.js index ddb24ac..ff4cdbd 100644 --- a/index.js +++ b/index.js @@ -109,7 +109,7 @@ function copyCardData(tmpCardsDir) { tmpfileBase+=`_`; } console.log(`Writing ${cardFilename.replace(/\.md$/gi,'')} to ${tmpCardsDir}/${tmpfileBase}.yaml`); - if(process.env.GURU_CONVERT_MARKDOWN) { + if(process.env.GURU_CONVERT_MARKDOWN>0) { var mdcontent = fs.readFileSync(cardFilename); mdcontent += cardFooter.replace('__CARDPATH__',encodeURIComponent(cardFilename)); fs.writeFileSync(`${tmpCardsDir}/${tmpfileBase}.html`, markdownit.render(mdcontent)) @@ -273,7 +273,7 @@ function processStandardCollection(auth) { if(process.env.GURU_CARD_DIR) { core.setFailed("GURU_CARD_DIR is only supported for EXTERNAL collections: https://developer.getguru.com/docs/guru-sync-manual-api"); return; - } else if(process.env.GURU_CONVERT_MARKDOWN) { + } else if(process.env.GURU_CONVERT_MARKDOWN>0) { core.setFailed("GURU_CONVERT_MARKDOWN is only supported for EXTERNAL collections: https://developer.getguru.com/docs/guru-sync-manual-api"); return; } else {