{"id":49382408,"url":"https://github.com/posit-dev/quarjar","last_synced_at":"2026-04-28T06:05:11.752Z","repository":{"id":341048791,"uuid":"1160247389","full_name":"posit-dev/quarjar","owner":"posit-dev","description":"Use SkillJar API to publish Quarto/HTML lessons","archived":false,"fork":false,"pushed_at":"2026-04-15T14:22:14.000Z","size":289,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T14:34:21.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posit-dev.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T18:01:47.000Z","updated_at":"2026-04-15T14:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/posit-dev/quarjar","commit_stats":null,"previous_names":["posit-dev/quarjar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/posit-dev/quarjar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Fquarjar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Fquarjar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Fquarjar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Fquarjar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posit-dev","download_url":"https://codeload.github.com/posit-dev/quarjar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Fquarjar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32368537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-28T06:05:10.920Z","updated_at":"2026-04-28T06:05:11.725Z","avatar_url":"https://github.com/posit-dev.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quarjar\n\n**quarjar** (Quarto + SkillJar) is an R package for publishing Quarto documents as SCORM/web packages to Skilljar courses. It automates the full workflow: render → package → host → publish.\n\n\u003e **Disclaimer:** quarjar is an independent open-source project and is not affiliated with, endorsed by, or supported by SkillJar, Inc.\n\n## Installation\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"posit-dev/quarjar\")\n```\n\n## Automated Pipeline via GitHub Actions\n\nThe primary use case is a push-triggered GitHub Actions pipeline. Every time you push a change to a `.qmd` file, the workflow renders it, packages it, and publishes or updates the corresponding Skilljar lesson — no manual steps required.\n\n### Setup\n\n**1. Add the workflow to your repository:**\n\n```r\nquarjar::use_skilljar_workflow()\n```\n\n**2. Configure your `.qmd` front matter:**\n\n```yaml\n---\ntitle: \"My Lesson Title\"\nskilljar:\n  course_id: \"abc123\"       # required — files without this are skipped\n  package_title: \"...\"      # optional; defaults to title\n  lesson_order: 3           # optional; explicit position in course (first publish only)\n---\n```\n\n**3. Complete one-time repository setup:**\n\n- Enable GitHub Pages: Settings → Pages → Deploy from `gh-pages` branch\n- Add secret `SKILLJAR_API_KEY` (Settings → Secrets and variables → Actions)\n- Add secret `REPO_PAT` — a fine-grained PAT with Contents and Pages read/write\n- Set workflow permissions to \"Read and write\" (Settings → Actions → General)\n\nSee [GITHUB_ACTION_SETUP.md](examples/GITHUB_ACTION_SETUP.md) for detailed instructions.\n\n### How it works\n\n**First publish** (no `skilljar.lesson_id` in front matter):\n\n1. Renders the `.qmd` to HTML\n2. Creates a timestamped ZIP and publishes it to GitHub Pages under `skilljar-zips/`\n3. Creates a Skilljar web package from the GitHub Pages URL\n4. Creates a WEB_PACKAGE lesson in your course\n5. Commits `skilljar.lesson_id` back to `main` (tagged `[skip ci]`)\n\n**Subsequent pushes** (after `skilljar.lesson_id` is present):\n\nSteps 1–3 run identically, then the existing lesson is updated with the new web package and the old one is deleted.\n\n`skilljar.lesson_id` is never set manually — the workflow writes it back after the first successful publish. The `skilljar-zips/` subdirectory means this workflow coexists with other GitHub Pages content (pkgdown sites, etc.) without conflict.\n\nTo re-trigger a failed run, make a trivial change to the `.qmd` file (an empty commit won't work — the `paths` filter requires at least one `.qmd` among the changed files):\n\n```bash\necho \"\" \u003e\u003e my-lesson.qmd\ngit add my-lesson.qmd\ngit commit -m \"re-trigger: republish to Skilljar\"\ngit push\n```\n\n## Manual R Usage\n\nFor one-off publishing or scripted workflows outside GitHub Actions:\n\n```r\nlibrary(quarjar)\n\n# Step 1: Render a .qmd and create a ZIP package\nzip_path \u003c- generate_zip_package(\"lessons/module1.qmd\")\n\n# Step 2: Host the ZIP at a publicly accessible URL, then create a web package\npkg \u003c- create_web_package(\n  content_url = \"https://example.com/skilljar-zips/module1.zip\",\n  title = \"Module 1: Getting Started\"\n)\n\n# Note: Skilljar processes web packages asynchronously.\n# If lesson creation fails immediately, wait a moment and retry.\n\n# Step 3: Create a lesson in your course\nlesson \u003c- create_lesson_with_web_package(\n  course_id = \"abc123\",\n  lesson_title = \"Module 1: Getting Started\",\n  web_package_id = pkg$id\n)\n```\n\nLesson order is auto-detected (new lesson appended at end of course) unless you pass an explicit `order` integer. Subsequent content updates use `update_lesson()`, which replaces only the web package and leaves everything else — title, position, settings — unchanged.\n\n## Configuration\n\n**API key** — set once as an environment variable; all functions pick it up automatically:\n\n```r\nSys.setenv(SKILLJAR_API_KEY = \"your-api-key\")\n```\n\nFor the GitHub Actions workflow, use `skilljar.lesson_order` in the `.qmd` front matter:\n\n```yaml\n---\ntitle: \"Module 1\"\nskilljar:\n  course_id: \"abc123\"\n  lesson_order: 2   # sets position on first publish; ignored on updates\n---\n```\n\nIf omitted, the workflow auto-detects the next available order, same as the R functions.\n\n### Updating a lesson preserves its order\n\n`update_lesson()` sends only `content_web_package_id` in the PATCH request. The lesson's position in the course is unchanged when you update its web package content — intentionally, so republishing a lesson never moves it.\n\n```r\noptions(quarjar.base_url = \"https://api.skilljar.com\")\n```\n\n## Other Capabilities\n\n- **MODULAR lesson management** — `create_lesson_with_content()`, `publish_html_content()`: publish inline HTML content to MODULAR-type lessons (multiple content items per lesson)\n- **Web package management** — `list_web_packages()`, `get_web_package()`, `delete_web_package()`: inspect and clean up web packages\n- **Course and lesson inspection** — `get_course()`, `list_lessons()`, `get_lesson()`, `list_content_items()`\n- **Asset upload** — `upload_asset()`: upload individual files (PDFs, images, videos) as assets\n\n## License\n\nMIT License — see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposit-dev%2Fquarjar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposit-dev%2Fquarjar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposit-dev%2Fquarjar/lists"}