Skip to content

Commit ce873ff

Browse files
committed
WIP migrate site to Laika
1 parent 3657ea1 commit ce873ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+201
-803
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ skip these steps and jump straight to submitting a pull request.
2424

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

5151
Things that belong in Cats generally have the following characteristics:
5252

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

5656
Laws help keep types consistent, and remove ambiguity or sensitivity
@@ -133,7 +133,7 @@ builds:
133133

134134
### Write code
135135

136-
[See guidelines](https://typelevel.org/cats/guidelines.html).
136+
[See guidelines](guidelines.html).
137137

138138
### Attributions
139139

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

169169
### Binary compatibility
170170

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
Cats is a library which provides abstractions for functional programming in the [Scala programming language](https://scala-lang.org).
1212

1313
Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the
14-
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.
14+
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.
1515

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

1818
### Why "cats"?
1919

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

2828
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
29-
Cats. See our [contributor guide](https://typelevel.org/cats/contributing.html) for more
29+
Cats. See our [contributor guide](contributing.html) for more
3030
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).
3131

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

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

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

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

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

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

119119
Links:
120120

121-
1. Website: [typelevel.org/cats/](https://typelevel.org/cats/)
122-
2. ScalaDoc: [typelevel.org/cats/api/](https://typelevel.org/cats/api/)
123-
3. Type classes: [typelevel.org/cats/typeclasses](https://typelevel.org/cats/typeclasses.html)
124-
4. Data types: [typelevel.org/cats/datatypes.html](https://typelevel.org/cats/datatypes.html)
125-
5. Algebra overview: [typelevel.org/cats/algebra.html](https://typelevel.org/cats/algebra.html)
126-
6. Glossary: [typelevel.org/cats/nomenclature.html](https://typelevel.org/cats/nomenclature.html)
127-
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](https://typelevel.org/cats/resources_for_learners.html)
128-
8. FAQ: [typelevel.org/cats/faq.html](https://typelevel.org/cats/faq.html)
129-
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](https://typelevel.org/cats/typelevelEcosystem.html)
121+
1. Website: [typelevel.org/cats/]()
122+
2. ScalaDoc: [typelevel.org/cats/api/](api/)
123+
3. Type classes: [typelevel.org/cats/typeclasses](typeclasses.html)
124+
4. Data types: [typelevel.org/cats/datatypes.html](datatypes.html)
125+
5. Algebra overview: [typelevel.org/cats/algebra.html](algebra.html)
126+
6. Glossary: [typelevel.org/cats/nomenclature.html](nomenclature.html)
127+
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](resources_for_learners.html)
128+
8. FAQ: [typelevel.org/cats/faq.html](faq.html)
129+
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](typelevelEcosystem.html)
130130

131131
### Community
132132

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

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

341341
Copyright the maintainers, 2015-2022.

build.sbt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ val Scala213 = "2.13.8"
2323
val Scala3 = "3.0.2"
2424

2525
ThisBuild / crossScalaVersions := Seq(Scala212, Scala213, Scala3)
26-
ThisBuild / scalaVersion := Scala213
26+
ThisBuild / scalaVersion := Scala212
2727

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

364+
lazy val docs = project
365+
.in(file("site"))
366+
.enablePlugins(TypelevelSitePlugin)
367+
.settings(
368+
laikaConfig ~= { _.withRawContent },
369+
tlSiteRelatedProjects := Seq(
370+
"Cats Effect" -> url("https://typelevel.org/cats-effect"),
371+
"mouse" -> url("https://typelevel.org/mouse"),
372+
"Discipline" -> url("https://github.com/typelevel/discipline")
373+
),
374+
libraryDependencies ++= Seq(
375+
"org.typelevel" %%% "discipline-munit" % disciplineMunitVersion
376+
)
377+
)
378+
.dependsOn(core.jvm, free.jvm, laws.jvm)
379+
364380
ThisBuild / organization := "org.typelevel"
365381
ThisBuild / organizationName := "Typelevel"
366382
ThisBuild / organizationHomepage := Some(url("https://typelevel.org"))

docs/src/main/mdoc/algebra.md renamed to docs/algebra.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
---
2-
layout: docs
3-
title: "Algebra Overview"
4-
section: "algebra"
5-
---
1+
{% laika.title = Algebra %}
62

73
# Algebra Overview
84

docs/src/main/mdoc/colophon.md renamed to docs/colophon.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
---
2-
layout: page
3-
title: "Colophon"
4-
section: "colophon"
5-
position: 60
6-
---
1+
# Colophon
2+
73
Cats has been made a much better project, and is a much more enjoyable
84
project to work on because of many of the other projects on which Cats
95
is built. Many of these projects have had enhancements made in order
@@ -26,4 +22,4 @@ There are other libraries that aim to foster Functional Programming in the Scala
2622
nature to Cats, also derived from scalaz. The Structures and Cats
2723
projects have had a healthy relationship of sharing both ideas and code.
2824

29-
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)
25+
For a full list of Cats and Typelevel related projects and libraries, take a look at [The Typelevel Ecosystem](typelevelEcosystem.html)

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

docs/datatypes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% laika.title = "Data Types" %}
2+
3+
@:navigationTree {
4+
entries = [ { target = "datatypes", depth = 2 } ]
5+
}

docs/src/main/mdoc/datatypes/chain.md renamed to docs/datatypes/chain.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
layout: docs
3-
title: "Chain"
4-
section: "data"
5-
source: "core/src/main/scala/cats/data/Chain.scala"
6-
scaladoc: "#cats.data.Chain"
7-
---
8-
91
# Chain
102

113
`Chain` is a data structure that allows constant time prepending and appending.

docs/src/main/mdoc/datatypes/const.md renamed to docs/datatypes/const.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
layout: docs
3-
title: "Const"
4-
section: "data"
5-
source: "core/src/main/scala/cats/data/Const.scala"
6-
scaladoc: "#cats.data.Const"
7-
---
81
# Const
92
At first glance `Const` seems like a strange data type - it has two type parameters, yet only
103
stores a value of the first type. What possible use is it? As it turns out, it does

docs/src/main/mdoc/datatypes/contt.md renamed to docs/datatypes/contt.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
layout: docs
3-
title: "ContT"
4-
section: "data"
5-
source: "core/src/main/scala/cats/data/ContT.scala"
6-
scaladoc: "#cats.data.ContT"
7-
---
81
# ContT
92

103
A pattern that appears sometimes in functional programming is that of a function

0 commit comments

Comments
 (0)