All Projects β†’ SwiftDocOrg β†’ Swiftmarkup

SwiftDocOrg / Swiftmarkup

Licence: mit
Parses Swift documentation comments into structured entities

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftmarkup

Tui.editor
πŸžπŸ“ Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
Stars: ✭ 14,016 (+25383.64%)
Mutual labels:  documentation, commonmark
Editor.md
The open source embeddable online markdown editor (component).
Stars: ✭ 11,741 (+21247.27%)
Mutual labels:  documentation, commonmark
Symbian Archive
A small website to archive Symbian-related dev tools & doc.
Stars: ✭ 46 (-16.36%)
Mutual labels:  documentation
Parse Comments
Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
Stars: ✭ 53 (-3.64%)
Mutual labels:  documentation
Docs
The API for generating high quality images from HTML/CSS.
Stars: ✭ 49 (-10.91%)
Mutual labels:  documentation
Kraiklyn
A Hugo theme for one page documentation
Stars: ✭ 47 (-14.55%)
Mutual labels:  documentation
Documentation
Official documentation of the Themosis framework.
Stars: ✭ 51 (-7.27%)
Mutual labels:  documentation
Material Motion
Starmap and team docs
Stars: ✭ 44 (-20%)
Mutual labels:  documentation
Docs
Documentation for OpenPOWER Firmware
Stars: ✭ 54 (-1.82%)
Mutual labels:  documentation
Rdoc
colourised R docs in the terminal
Stars: ✭ 49 (-10.91%)
Mutual labels:  documentation
Arg.js
πŸ‡¦πŸ‡· πŸ›  NPM library. Validation of Argentinian bank account numbers, IDs and phone numbers
Stars: ✭ 52 (-5.45%)
Mutual labels:  documentation
Flask Apidoc
Adds ApiDoc support to Flask
Stars: ✭ 49 (-10.91%)
Mutual labels:  documentation
App
Fast and searchable Ruby docs
Stars: ✭ 47 (-14.55%)
Mutual labels:  documentation
Jsdoc Baseline
An experimental, extensible template for JSDoc.
Stars: ✭ 51 (-7.27%)
Mutual labels:  documentation
Pandora Apidoc
pandora.com API documentation
Stars: ✭ 46 (-16.36%)
Mutual labels:  documentation
Dash Docset Builder
Dash Docset Builder in PHP.
Stars: ✭ 54 (-1.82%)
Mutual labels:  documentation
Website
Website and documentation for Radix.
Stars: ✭ 45 (-18.18%)
Mutual labels:  documentation
Covenant Generator
`covgen` generates a code of conduct.
Stars: ✭ 48 (-12.73%)
Mutual labels:  documentation
42docs
Documentation on MiniLibX and 2019 curriculum projects
Stars: ✭ 51 (-7.27%)
Mutual labels:  documentation
Autoobjectdocumentation
Auto Object Documentation - JavaScript
Stars: ✭ 54 (-1.82%)
Mutual labels:  documentation

SwiftMarkup

CI Documentation

SwiftMarkup parses Swift Markup from documentation comments into structured documentation entities.

import SwiftMarkup

let markdown = #"""
Creates a new bicycle with the provided parts and specifications.

- Remark: Satisfaction guaranteed!

The word *bicycle* first appeared in English print in 1868
to describe "Bysicles and trysicles" on the
"Champs ElysΓ©es and Bois de Boulogne".

- Parameters:
   - style: The style of the bicycle
   - gearing: The gearing of the bicycle
   - handlebar: The handlebar of the bicycle
   - frameSize: The frame size of the bicycle, in centimeters

- Returns: A beautiful, brand-new bicycle,
           custom-built just for you.
"""#
let documentation = try Documentation.parse(markdown)

documentation.summary?.description // "Creates a new bicycle with the provided parts and specifications."

documentation.discussionParts.count // 2

if case .callout(let remark) = documentation.discussionParts[0] {
    _ = remark.content // "Satisfaction guaranteed\\!"
}

if case .paragraph(let paragraph) = documentation.discussionParts[1] {
    _ = paragraph.description // "The word *bicycle* first appeared in English print in 1868 [ ... ]"
}

documentation.parameters[0].name // "style"
documentation.parameters[0]?.content.description // "The style of the bicycle"

documentation.returns?.description // A beautiful, brand-new bicycle, custom-built just for you.

This package is used by swift-doc in coordination with CommonMark and SwiftSemantics to generate documentation for Swift projects.

Requirements

  • Swift 5.2+

Installation

Swift Package Manager

Add the SwiftMarkup package to your target dependencies in Package.swift:

import PackageDescription

let package = Package(
  name: "YourProject",
  dependencies: [
    .package(
        url: "https://github.com/SwiftDocOrg/SwiftMarkup",
        from: "0.3.0"
    ),
  ]
)

Then run the swift build command to build your project.

License

MIT

Contact

Mattt (@mattt)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].