Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ params:
- name: GitHub
url: https://github.com/grpc
icon: fab fa-github
externalDocs:
Swift:
quickstart: "https://swiftpackageindex.com/grpc/grpc-swift-2/tutorials/grpccore/hello-world"
basics: "https://swiftpackageindex.com/grpc/grpc-swift-2/tutorials/grpccore/route-guide"

mermaid:
enable: true
Expand Down
22 changes: 22 additions & 0 deletions content/en/docs/languages/swift/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Swift
prog_lang_home: true
src_repo: https://github.com/grpc/grpc-swift-2
content:
- learn_more:
- "[Examples]($src_repo_url/tree/main/Examples/)"
- reference:
- "[API](https://swiftpackageindex.com/grpc/grpc-swift-2/documentation)"
- "[Generated code](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/understanding-the-generated-code)"
- other:
- $src_repo_link
---

{{% docs/prog-lang-home-content %}}

### Developer stories and talks {#dev-stories}

- **Building a New gRPC Library in Swift**
<a class="o-icon" href="https://youtu.be/grG3FBau5K0"><i class="fab fa-youtube"></i></a>
A [gRPC Conf 2024 presentation](https://sched.co/1enTO)
by George Barnett, Apple,
21 changes: 16 additions & 5 deletions layouts/partials/docs/prog-lang-home.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
{{ $Lang := .Params.title | default .Params.language }}
{{ $externalLinks := index site.Params.links.externalDocs $Lang }}

<div class="row">
<div class="col-sm col-md-6 mb-4 mb-md-0">
<div class="h-100 card shadow" href="#">
<div class="card-body">
<h4 class="card-title">
<a class="" href="quickstart/">Quick start</a>
{{ if and $externalLinks $externalLinks.quickstart }}
<a class="" href="{{ $externalLinks.quickstart }}" target="_blank" rel="noopener">Quick start</a>
{{ else }}
<a class="" href="quickstart/">Quick start</a>
{{ end }}
</h4>
<p>
Run your first {{ replace $Lang " " "-" }} gRPC app in minutes!
</p>
</div>
</div>
</div>

{{ if .GetPage "basics" }}

{{ $hasExternalBasics := and $externalLinks $externalLinks.basics }}
{{ $hasLocalBasics := .GetPage "basics" }}
{{ if or $hasExternalBasics $hasLocalBasics }}
<div class="col-sm col-md-6 mb-4 mb-md-0">
<div class="h-100 card shadow">
<div class="card-body">
<h4 class="card-title">
<a class="" href="basics/">Basics tutorial</a>
{{ if $hasExternalBasics }}
<a class="" href="{{ $externalLinks.basics }}" target="_blank" rel="noopener">Basics tutorial</a>
{{ else }}
<a class="" href="basics/">Basics tutorial</a>
{{ end }}
</h4>
<p>
Learn about {{ replace $Lang " " "-" }} gRPC basics.
Expand All @@ -32,4 +43,4 @@ <h4 class="card-title">
{{ with .Content }}
<hr/>
{{ . }}
{{ end }}
{{ end }}