Skip to content

Commit e00c7fb

Browse files
authored
Packages page (#344)
The page provides a streamlined entry to exploring the Swift package ecosystem. It has common categories of packages, as well as categories of interest. When you select a category, it provides a sample of some widely-used packages for that category, with information to help you explore further. It’s a great way to get a sense of the variety of packages available for Swift. In addition to finding common categories of packages, you can also browse new and interesting work from across the Swift package ecosystem with the Community Showcase
1 parent af6d5dd commit e00c7fb

File tree

17 files changed

+839
-12
lines changed

17 files changed

+839
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ xcuserdata
1010
# Built site content.
1111
/_site
1212

13-
# Jekyll metadata
13+
# Temporary Jekyll files
1414
.jekyll-metadata
15+
.jekyll-cache
1516

1617
# Asset Cache
1718
.asset-cache

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Swift.org
33
description: "Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns."
44
timezone: America/Lower_Princes
55
exclude: ["README.md", "config.ru", "Gemfile", "Gemfile.lock", "Procfile", "vendor"]
6-
safe: true
6+
safe: false
77
future: true
88

99
kramdown:

_data/navigation.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
name: snapshots
3838
- title: Installing Swift
3939
name: installing-swift
40+
- title: Packages
41+
url: /packages/
42+
sections:
43+
- title: Package Ecosystem
44+
name: package-ecosystem
45+
- title: Create Your Own
46+
name: create-your-own
47+
- title: Advanced Search
48+
name: advanced-search
4049
- title: Platform Support
4150
url: /platform-support/
4251
sections:

_data/packages/packages.yml

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

_plugins/package-categories.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module Jekyll
2+
class PackageCategoriesGenerator < Generator
3+
def generate(site)
4+
# Generate one file per category for the Packages sub-pages
5+
site.data.dig('packages', 'packages', 'categories').each do |category|
6+
category_page = PageWithoutAFile.new(site, site.source, "packages", "#{category['slug']}.md")
7+
category_page.data = {
8+
# Front matter
9+
'layout' => 'page',
10+
'title' => category['name']
11+
}
12+
category_page.content = "{% include_relative _package-list.html category_slug=\"#{category['slug']}\" %}"
13+
site.pages << category_page
14+
end
15+
end
16+
end
17+
end

assets/images/icon-external-color.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/icon-external.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/icon-swift-color.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/icon-swift.svg

Lines changed: 1 addition & 9 deletions
Loading

assets/images/landing-page/box.svg

Lines changed: 13 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)