{"id":30146568,"url":"https://github.com/sillyfreak/typst-bullseye","last_synced_at":"2025-10-29T02:40:14.597Z","repository":{"id":306674223,"uuid":"1026606615","full_name":"SillyFreak/typst-bullseye","owner":"SillyFreak","description":"Hit the target (HTML or paged/PDF) when styling your Typst document","archived":false,"fork":false,"pushed_at":"2025-07-26T22:34:25.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T02:12:02.919Z","etag":null,"topics":["typst","typst-package"],"latest_commit_sha":null,"homepage":"","language":"Typst","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SillyFreak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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}},"created_at":"2025-07-26T08:20:29.000Z","updated_at":"2025-07-26T22:32:20.000Z","dependencies_parsed_at":"2025-07-27T02:24:22.390Z","dependency_job_id":null,"html_url":"https://github.com/SillyFreak/typst-bullseye","commit_stats":null,"previous_names":["sillyfreak/typst-bullseye"],"tags_count":1,"template":false,"template_full_name":"SillyFreak/typst-package-template","purl":"pkg:github/SillyFreak/typst-bullseye","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SillyFreak%2Ftypst-bullseye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SillyFreak%2Ftypst-bullseye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SillyFreak%2Ftypst-bullseye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SillyFreak%2Ftypst-bullseye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SillyFreak","download_url":"https://codeload.github.com/SillyFreak/typst-bullseye/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SillyFreak%2Ftypst-bullseye/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269864153,"owners_count":24487576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":["typst","typst-package"],"created_at":"2025-08-11T09:39:23.348Z","updated_at":"2025-10-29T02:40:09.568Z","avatar_url":"https://github.com/SillyFreak.png","language":"Typst","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bullseye\n\nThis library helps you write target-dependent Typst code, particularly target-dependent content and show rules.\n\nThis package consists of two parts:\n- At the foundation, it contains a wrapper around the currently unstable Typst features for target detection and HTML output.\n- Built on top of that are a few helpful functions that allow package and document authors to easily write content and show rules that behave differently based on the target.\n\nBullseye makes sure that your code compiles even when HTML support is not enabled (e.g. in the web app or when previewing using Tinymist) _as long as_ no HTML specific content ends up in the rendered document, and automatically switches to Typst's HTML support when it is enabled.\n\n## Getting Started\n\nTo add this package to your project, use this:\n\n```typ\n#import \"@preview/bullseye:0.1.0\": *\n\n// apply styling only for non-HTML output\n#show: show-target(paged: doc =\u003e {\n  set page(height: auto)\n\n  import \"@preview/codly:1.3.0\"\n  show: codly.codly-init\n  doc\n})\n\n// apply image styling only for html output\n#show image: show-target(html: img =\u003e {\n  html.elem(\"img\", attrs: (\"src\": img.source, \"alt\": img.alt))\n})\n\n// insert content only for HTML output\n#context on-target(html: {\n  html.elem(\"a\", attrs: (href: \"#\"))[(back to top)]\n})\n```\n\n## Usage\n\nSee the [manual](docs/manual.pdf) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsillyfreak%2Ftypst-bullseye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsillyfreak%2Ftypst-bullseye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsillyfreak%2Ftypst-bullseye/lists"}