Skip to content

Commit

Permalink
Merge pull request #1 from StefKors/add-docs
Browse files Browse the repository at this point in the history
Add Swift Package Index Docs
  • Loading branch information
StefKors authored Oct 27, 2023
2 parents 0d42a6b + 3a9e8ef commit 83b4d38
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [Target]
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -14,7 +14,8 @@ let package = Package(
targets: [
.target(
name: "SwiftSummarize",
exclude: ["ExampleSwiftUI.swift"]
exclude: ["ExampleSwiftUI.swift"],
resources: [.process("Documentation.docc")]
),
.testTarget(
name: "SwiftSummarizeTests",
Expand Down
23 changes: 23 additions & 0 deletions Sources/SwiftSummarize/Documentation.docc/SwiftSummarize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ``SwiftSummarize``

SwiftSummarize is the easiest way to create a summary from a String. Internally it's a simple wrapper around CoreServices [SKSummary](https://developer.apple.com/documentation/coreservices/1446229-sksummarycreatewithstring)

## Overview

**Before**
> Here's to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They're not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them. About the only thing you can't do is ignore them. Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.
**After**
> Because the people who are crazy enough to think they can change the world, are the ones who do

## Topics

### Summary struct

- ``Summary``

### String Extensions

- ``summarize(numberOfSentences: Int)``
- ``summarize(percent: CGFloat)``

0 comments on commit 83b4d38

Please sign in to comment.