/
PowerSl1d3
/
blog
Обзор
Документация
Войти
/
PowerSl1d3
/
blog
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Sources/Blog/Utility/Blog+paginatedPath.swift
13 строк
429 B
PowerSl1d3
main: Initial commit
10 июн 2024, 02:49
10 июн 2024, 02:49
73d7d0f
Код
Авторство
О чём код?
import Publish extension Blog { func paginatedPath(for tag: Tag, pageIndex: Int) -> Path { guard pageIndex != 0 else { return self.path(for: tag) } return self.path(for: tag).appendingComponent("\(pageIndex + 1)") } func paginatedTagListPath(pageIndex: Int) -> Path { guard pageIndex != 0 else { return tagListPath } return tagListPath.appendingComponent("\(pageIndex + 1)") } }