Skip to content

Commit

Permalink
WIP migrate site to Laika
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Apr 6, 2022
1 parent 3657ea1 commit ce873ff
Show file tree
Hide file tree
Showing 100 changed files with 201 additions and 803 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ skip these steps and jump straight to submitting a pull request.

1. [Find something that belongs in cats](#find-something-that-belongs-in-cats)
2. [Let us know you are working on it](#let-us-know-you-are-working-on-it)
3. [Build the project](#build-project)
3. [Build the project](#build-the-project)
4. [Implement your contribution](#write-code)
5. [Write tests](#write-tests)
6. [Write documentation](#contributing-documentation)
Expand All @@ -50,7 +50,7 @@ pull request. The preferred ways to do that are to either:

Things that belong in Cats generally have the following characteristics:

* Their behavior is governed by well-defined [laws](https://typelevel.org/cats/typeclasses.html#laws).
* Their behavior is governed by well-defined [laws](typeclasses.html#laws).
* They provide general abstractions.

Laws help keep types consistent, and remove ambiguity or sensitivity
Expand Down Expand Up @@ -133,7 +133,7 @@ builds:

### Write code

[See guidelines](https://typelevel.org/cats/guidelines.html).
[See guidelines](guidelines.html).

### Attributions

Expand Down Expand Up @@ -164,7 +164,7 @@ for law checking, and imports all syntax and standard instances for convenience.
rely heavily on serialization, such as `Spark`, will have strong compatibility with `Cats`.
- Note that custom serialization tests are not required for instances of type classes which come from
`algebra`, such as `Monoid`, because the `algebra` laws include a test for serialization.
- For testing your laws, it is advised to check [this guide](https://typelevel.org/cats/typeclasses/lawtesting.html).
- For testing your laws, it is advised to check [this guide](typeclasses/lawtesting.html).

### Binary compatibility

Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
Cats is a library which provides abstractions for functional programming in the [Scala programming language](https://scala-lang.org).

Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the
standard library. Cats strives to provide functional programming abstractions that are core, [binary compatible](http://typelevel.org/cats/#binary-compatibility-and-versioning), [modular](http://typelevel.org/cats/motivations#modularity), [approachable](http://typelevel.org/cats/motivations#approachability) and [efficient](http://typelevel.org//cats/motivations#efficiency). A broader goal of Cats is to provide a foundation for an [ecosystem of pure, typeful libraries](https://typelevel.org/cats/#ecosystem) to support functional programming in Scala applications.
standard library. Cats strives to provide functional programming abstractions that are core, [binary compatible](#binary-compatibility-and-versioning), [modular](motivations#modularity), [approachable](motivations#approachability) and [efficient](http://typelevel.org//cats/motivations#efficiency). A broader goal of Cats is to provide a foundation for an [ecosystem of pure, typeful libraries](#ecosystem) to support functional programming in Scala applications.

For more detail about Cats' motivations, go [here](http://typelevel.org/cats/motivations).
For more detail about Cats' motivations, go [here](motivations).

### Why "cats"?

Expand All @@ -26,7 +26,7 @@ Regardless, you do not need to know anything about category theory to use Cats.
### Code Contributors

This project exists thanks to [all the people who contribute](https://github.com/typelevel/cats/graphs/contributors). We welcome contributions to Cats and would love for you to help build
Cats. See our [contributor guide](https://typelevel.org/cats/contributing.html) for more
Cats. See our [contributor guide](contributing.html) for more
information about how you can get involved as a developer. If you are looking for something to start with, [here is a beginner friendly list](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).

### Financial Contributors
Expand All @@ -36,31 +36,31 @@ information about how you can get involved as a developer. If you are looking fo
<h4>Platinum Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/platinum-sposor-12420/checkout">Platinum sponsorship</a> starts at $950 USD/month.
<div id="platinum-sponsors">
<noscript>Platinum Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Platinum Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Gold Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/gold-sponsor-12419/checkout">Gold Sponsorship</a> starts at $420 USD/month.
<div id="gold-sponsors">
<noscript>Gold Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Gold Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Silver Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/silver-sponsor-11780/checkout">Silver Sponsorship</a> starts at $180 USD/month.
<div id="silver-sponsors">
<noscript>Silver Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Silver Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Backers</h4>
Become a <a href="https://opencollective.com/typelevel/contribute/backer-11779/checkout">Backer</a> with a recurring donation of just $5 USD/month.
<div id="backers">
<noscript>Backers appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Backers appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Other contributors</h4>
We thankfully accept <a href="https://opencollective.com/typelevel/donate">one-time and recurring</a> contributions as well.
<div id="other-contributors">
<noscript>Other contributors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Other contributors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<script src="/cats/js/sponsors.js"></script>
Expand Down Expand Up @@ -118,15 +118,15 @@ Past release notes for Cats are available in [CHANGES.md](https://github.com/typ

Links:

1. Website: [typelevel.org/cats/](https://typelevel.org/cats/)
2. ScalaDoc: [typelevel.org/cats/api/](https://typelevel.org/cats/api/)
3. Type classes: [typelevel.org/cats/typeclasses](https://typelevel.org/cats/typeclasses.html)
4. Data types: [typelevel.org/cats/datatypes.html](https://typelevel.org/cats/datatypes.html)
5. Algebra overview: [typelevel.org/cats/algebra.html](https://typelevel.org/cats/algebra.html)
6. Glossary: [typelevel.org/cats/nomenclature.html](https://typelevel.org/cats/nomenclature.html)
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](https://typelevel.org/cats/resources_for_learners.html)
8. FAQ: [typelevel.org/cats/faq.html](https://typelevel.org/cats/faq.html)
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](https://typelevel.org/cats/typelevelEcosystem.html)
1. Website: [typelevel.org/cats/]()
2. ScalaDoc: [typelevel.org/cats/api/](api/)
3. Type classes: [typelevel.org/cats/typeclasses](typeclasses.html)
4. Data types: [typelevel.org/cats/datatypes.html](datatypes.html)
5. Algebra overview: [typelevel.org/cats/algebra.html](algebra.html)
6. Glossary: [typelevel.org/cats/nomenclature.html](nomenclature.html)
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](resources_for_learners.html)
8. FAQ: [typelevel.org/cats/faq.html](faq.html)
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](typelevelEcosystem.html)

### Community

Expand Down Expand Up @@ -202,7 +202,7 @@ Here's a (non-exhaustive) list of companies that use Cats in production. Don't s
- [Code Dx](https://codedx.com/)
- [Codecentric](https://codecentric.de)
- [Colisweb](https://www.colisweb.com/)
- [CompStak](compstak.com)
- [CompStak](https://compstak.com)
- [Coya](https://coya.com/)
- [Datum Brain](https://datumbrain.com/)
- [Disney](https://disney.com/)
Expand Down Expand Up @@ -335,7 +335,7 @@ relax this to a single sign-off. More detail in the [process document](https://g

All code is available to you under the MIT license, available at
http://opensource.org/licenses/mit-license.php and also in the
[COPYING](COPYING) file. The design is informed by many other
[COPYING](https://github.com/typelevel/cats/blob/main/COPYING) file. The design is informed by many other
projects, in particular [Scalaz](https://github.com/scalaz/scalaz).

Copyright the maintainers, 2015-2022.
18 changes: 17 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ val Scala213 = "2.13.8"
val Scala3 = "3.0.2"

ThisBuild / crossScalaVersions := Seq(Scala212, Scala213, Scala3)
ThisBuild / scalaVersion := Scala213
ThisBuild / scalaVersion := Scala212

ThisBuild / tlFatalWarnings := {
githubIsWorkflowBuild.value && !tlIsScala3.value
Expand Down Expand Up @@ -361,6 +361,22 @@ lazy val binCompatTest = project
.settings(testingDependencies)
.dependsOn(core.jvm % Test)

lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(
laikaConfig ~= { _.withRawContent },
tlSiteRelatedProjects := Seq(
"Cats Effect" -> url("https://typelevel.org/cats-effect"),
"mouse" -> url("https://typelevel.org/mouse"),
"Discipline" -> url("https://github.com/typelevel/discipline")
),
libraryDependencies ++= Seq(
"org.typelevel" %%% "discipline-munit" % disciplineMunitVersion
)
)
.dependsOn(core.jvm, free.jvm, laws.jvm)

ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Typelevel"
ThisBuild / organizationHomepage := Some(url("https://typelevel.org"))
Expand Down
6 changes: 1 addition & 5 deletions docs/src/main/mdoc/algebra.md → docs/algebra.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
layout: docs
title: "Algebra Overview"
section: "algebra"
---
{% laika.title = Algebra %}

# Algebra Overview

Expand Down
10 changes: 3 additions & 7 deletions docs/src/main/mdoc/colophon.md → docs/colophon.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
layout: page
title: "Colophon"
section: "colophon"
position: 60
---
# Colophon

Cats has been made a much better project, and is a much more enjoyable
project to work on because of many of the other projects on which Cats
is built. Many of these projects have had enhancements made in order
Expand All @@ -26,4 +22,4 @@ There are other libraries that aim to foster Functional Programming in the Scala
nature to Cats, also derived from scalaz. The Structures and Cats
projects have had a healthy relationship of sharing both ideas and code.

For a full list of Cats and Typelevel related projects and libraries, take a look at [The Typelevel Ecosystem](https://typelevel.org/cats/typelevelEcosystem.html)
For a full list of Cats and Typelevel related projects and libraries, take a look at [The Typelevel Ecosystem](typelevelEcosystem.html)
1 change: 1 addition & 0 deletions docs/contributing.md
5 changes: 5 additions & 0 deletions docs/datatypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% laika.title = "Data Types" %}

@:navigationTree {
entries = [ { target = "datatypes", depth = 2 } ]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
---
layout: docs
title: "Chain"
section: "data"
source: "core/src/main/scala/cats/data/Chain.scala"
scaladoc: "#cats.data.Chain"
---

# Chain

`Chain` is a data structure that allows constant time prepending and appending.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Const"
section: "data"
source: "core/src/main/scala/cats/data/Const.scala"
scaladoc: "#cats.data.Const"
---
# Const
At first glance `Const` seems like a strange data type - it has two type parameters, yet only
stores a value of the first type. What possible use is it? As it turns out, it does
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "ContT"
section: "data"
source: "core/src/main/scala/cats/data/ContT.scala"
scaladoc: "#cats.data.ContT"
---
# ContT

A pattern that appears sometimes in functional programming is that of a function
Expand Down
1 change: 1 addition & 0 deletions docs/datatypes/directory.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
laika.title = Data Types
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Either"
section: "data"
source: "core/src/main/scala/cats/syntax/either.scala"
scaladoc: "#cats.syntax.EitherOps"
---
# Either

In day-to-day programming, it is fairly common to find ourselves writing functions that
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "EitherT"
section: "data"
source: "core/src/main/scala/cats/data/EitherT.scala"
scaladoc: "#cats.data.EitherT"
---
# EitherT

`Either` can be used for error handling in most situations. However, when
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Eval"
section: "data"
source: "core/src/main/scala/cats/Eval.scala"
scaladoc: "#cats.Eval"
---
# Eval

Eval is a data type for controlling synchronous evaluation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "FreeApplicatives"
section: "data"
source: "free/src/main/scala/cats/free/FreeApplicative.scala"
scaladoc: "#cats.free.FreeApplicative"
---
# Free Applicative

`FreeApplicative`s are similar to `Free` (monads) in that they provide a nice way to represent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
---
layout: docs
title: "FreeMonads"
section: "data"
source: "free/src/main/scala/cats/free/Free.scala"
scaladoc: "#cats.free.Free"
---

# Free Monad

## What is it?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "FunctionK"
section: "data"
source: "core/src/main/scala/cats/arrow/FunctionK.scala"
scaladoc: "#cats.arrow.FunctionK"
---
# FunctionK
A `FunctionK` transforms values from one first-order-kinded type (a type that takes a single type
parameter, such as `List` or `Option`) into another first-order-kinded type. This transformation is
Expand Down
7 changes: 0 additions & 7 deletions docs/src/main/mdoc/datatypes/id.md → docs/datatypes/id.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Id"
section: "data"
source: "core/src/main/scala/cats/package.scala"
scaladoc: "#cats.Id$"
---
# Id

The identity monad can be seen as the ambient monad that encodes the
Expand Down
7 changes: 0 additions & 7 deletions docs/src/main/mdoc/datatypes/ior.md → docs/datatypes/ior.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Ior"
section: "data"
source: "core/src/main/scala/cats/data/Ior.scala"
scaladoc: "#cats.data.Ior"
---
# Ior

`Ior` represents an inclusive-or relationship between two data types.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "IorT"
section: "data"
source: "core/src/main/scala/cats/data/IorT.scala"
scaladoc: "#cats.data.IorT"
---
# IorT

`IorT[F[_], A, B]` is a light wrapper on an `F[Ior[A, B]]`. Similar to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "Kleisli"
section: "data"
source: "core/src/main/scala/cats/data/Kleisli.scala"
scaladoc: "#cats.data.Kleisli"
---
# Kleisli
Kleisli enables composition of functions that return a monadic value, for instance an `Option[Int]`
or a `Either[String, List[Double]]`, without having functions take an `Option` or `Either` as a parameter,
Expand Down
7 changes: 0 additions & 7 deletions docs/src/main/mdoc/datatypes/nel.md → docs/datatypes/nel.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "NonEmptyList"
section: "data"
source: "core/src/main/scala/cats/data/NonEmptyList.scala"
scaladoc: "#cats.data.NonEmptyList"
---
# NonEmptyList

## Motivation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
layout: docs
title: "Nested"
section: "data"
source: "core/src/main/scala/cats/data/Nested.scala"
scaladoc: "#cats.data.Nested"
---
{% laika.title = Nested %}

# Motivation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "OneAnd"
section: "data"
source: "core/src/main/scala/cats/data/OneAnd.scala"
scaladoc: "#cats.data.OneAnd"
---
# OneAnd

The `OneAnd[F[_],A]` data type represents a single element of type `A`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
layout: docs
title: "OptionT"
section: "data"
source: "core/src/main/scala/cats/data/OptionT.scala"
scaladoc: "#cats.data.OptionT"
---
# OptionT

`OptionT[F[_], A]` is a light wrapper on an `F[Option[A]]`. Speaking technically, it is a monad transformer for `Option`, but you don't need to know what that means for it to be useful. `OptionT` can be more convenient to work with than using `F[Option[A]]` directly.
Expand Down
Loading

0 comments on commit ce873ff

Please sign in to comment.