{"id":13951048,"url":"https://github.com/objcio/markdown-playgrounds","last_synced_at":"2025-04-05T14:08:21.059Z","repository":{"id":44470714,"uuid":"174538084","full_name":"objcio/markdown-playgrounds","owner":"objcio","description":"A Markdown Editor that can execute Swift code","archived":false,"fork":false,"pushed_at":"2020-01-10T07:04:15.000Z","size":120,"stargazers_count":577,"open_issues_count":4,"forks_count":21,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-03-29T13:11:10.519Z","etag":null,"topics":["macos","markdown","markdown-editor","swift"],"latest_commit_sha":null,"homepage":"https://talk.objc.io/collections/markdown-playgrounds","language":"Swift","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/objcio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-08T12:58:11.000Z","updated_at":"2025-02-27T15:00:18.000Z","dependencies_parsed_at":"2022-08-30T09:50:24.108Z","dependency_job_id":null,"html_url":"https://github.com/objcio/markdown-playgrounds","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objcio%2Fmarkdown-playgrounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objcio%2Fmarkdown-playgrounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objcio%2Fmarkdown-playgrounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objcio%2Fmarkdown-playgrounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objcio","download_url":"https://codeload.github.com/objcio/markdown-playgrounds/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345854,"owners_count":20924102,"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","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":["macos","markdown","markdown-editor","swift"],"created_at":"2024-08-08T06:01:12.056Z","updated_at":"2025-04-05T14:08:21.043Z","avatar_url":"https://github.com/objcio.png","language":"Swift","readme":"# 🎰 Markdown Playgrounds for Swift\n\n[![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) [![@objcio](https://img.shields.io/badge/contact-%40objcio-blue.svg?style=flat)](https://twitter.com/objcio)\n\n## What it does\n\nThis app reads and writes Markdown documents that contain Swift code. The code can be executed too! You can run individual code blocks, or all the blocks in a file.\n\nWe're using this app to update our book [Advanced Swift](https://www.objc.io/books/advanced-swift/), and while writing [blog posts](https://www.objc.io/blog/archive/). We find it very useful, and we hope you do too.\n\n## How it works\n\nThe app works by sending Swift code to a REPL instance, then reading back the results. Compared to Swift Playgrounds or Xcode's playgrounds, this is quite limiting, but it also means we can keep things simple.\n\n\u003cimg width=\"912\" alt=\"Screen Shot 2019-04-02 at 12 51 40\" src=\"https://user-images.githubusercontent.com/5382/55397985-bdfca180-5547-11e9-8820-7cf3012c6e53.png\"\u003e\n\n## Learn more\n\nWe're documenting the building of this app on [Swift Talk](https://talk.objc.io/collections/markdown-playgrounds), a weekly video series of conversational live-coding hosted by [Chris Eidhof](https://twitter.com/chriseidhof) and [Florian Kugler](https://twitter.com/floriankugler).\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://talk.objc.io/episodes/S01E145-setting-up-a-document-based-app\"\u003e\n      \u003cimg width=\"600\" alt=\"video cover\" src=\"https://i.vimeocdn.com/video/769411132.jpg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThe [first episode](https://talk.objc.io/episodes/S01E145-setting-up-a-document-based-app) previews the app, and is free to watch.\n\n- 145: [Setting Up a Document Based App](https://talk.objc.io/episodes/S01E145-setting-up-a-document-based-app) — 🆓 Public\n- 146: [Markdown Syntax Highlighting](https://talk.objc.io/episodes/S01E146-markdown-syntax-highlighting) — 🔒 Subscriber\n- 147: [Executing Swift Code](https://talk.objc.io/episodes/S01E147-executing-swift-code) — 🔒 Subscriber\n- 148: [String Handling](https://talk.objc.io/episodes/S01E148-string-handling) — 🔒 Subscriber\n\n\n## Building\n\n*Note*: currently this builds, but doesn't run from Xcode. Instead, build and run from the command line.\n\n- You need to have [cmark](https://github.com/commonmark/cmark) installed *from master* (not via homebrew). If you use the version from homebrew, you won't get proper syntax highlighting (specifically: for inline elements).\n- This project uses [Swift Package Manager](https://github.com/apple/swift-package-manager). You can either run \"swift build\" or do \"swift package generate-xcodeproj\"\n\nHere are the steps as shell commands:\n\n```sh\ngit clone https://github.com/commonmark/cmark\ncd cmark\nmkdir build\ncd build\ncmake ..\nmake\nmake test\nmake install\ncd ../..\n\n# Building this project\ngit clone https://github.com/objcio/markdown-playgrounds\ncd markdown-playgrounds\nswift build\n\n# If you want to edit this in Xcode\nswift package generate-xcodeproj\nxed .\n```\n\n## Future Direction\n\nThis project could head in a number of directions, and there are many useful features we could add. Our main goal is to keep using this for authoring Swift-heavy Markdown, which will guide our decisions when we decide on new features.\n\nTo keep things simple, we have collected a list of todos in [todo.txt](todo.txt).\n\n## License\n\nThis library is released under the MIT license. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjcio%2Fmarkdown-playgrounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjcio%2Fmarkdown-playgrounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjcio%2Fmarkdown-playgrounds/lists"}