-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85a5601
commit 4e754c7
Showing
10 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
layout: singlepage-overview | ||
title: New features for Scaladoc | ||
--- | ||
|
||
New Scala version brings us completely new Scaladoc rewritten from scratch. | ||
In this article you can find highlights of new features that are or will be introduced to Scaladoc. | ||
For general reference, visit [Scaladoc manual](https://dotty.epfl.ch/docs/usage/scaladoc/) | ||
|
||
## Markdown syntax | ||
|
||
The biggest change introduced in new Scaladoc is change of default language for styling docstring. So far it has been Wikidoc syntax. | ||
New Scaladoc can parse legacy `Wikidoc` syntax, however Markdown has been chosen for primary language for formatting comments. | ||
To switch back to `Wikidoc` one can pass global flag before running `doc` task or can define it for specific comment via `@syntax wiki` directive. | ||
|
||
For more information how to use full power of docstings, check out [Scaladoc docstrings][scaladoc-docstrings] | ||
|
||
|
||
## Static site | ||
|
||
Scaladoc brings easy way for creating static sites for both documentation and blog posts in the similar way as Jekyll does. | ||
Thanks to that feature you can store your documentation along-side with Scaladoc API docs output in a very convenient way. | ||
|
||
For more info about how to configure static site documentation check out [Static documentation][static-documentation] chapter | ||
|
||
![](../resources/images/scala3/scaladoc/static-site.png) | ||
|
||
## Blog posts | ||
|
||
Blog posts are a specific type of static site. To find more information about them look at the dedicated page for [Built-in blog][built-in-blog] | ||
|
||
![](../resources/images/scala3/scaladoc/blog-post.png) | ||
|
||
## Social links | ||
|
||
Scaladoc provides an easy way to configure your social media links e. g. twitter or gitter. For more information look at the subsection of | ||
[Scaladoc settings][social-links] chapter. | ||
|
||
![](../resources/images/scala3/scaladoc/social-links.png) | ||
|
||
## Snippets compiler | ||
|
||
One of the experimental features of Scaladoc will be snippets compiler. This tool will allow you to compile snippets that you attach to your docstring | ||
to check that they actually behave as intended, e. g. compile or throw some exception. The feature is very similar to `tut` or `mdoc` tools, | ||
but will be shipped with Scaladoc out of the box for easy setup. Making snippets interactive, e. g. user could edit them and compile in the browser is taken into account, though it is not in scope yet. | ||
|
||
For more information you can follow this [thread](https://contributors.scala-lang.org/t/snippet-validation-in-scaladoc-for-scala-3/4976) | ||
|
||
![](../resources/images/scala3/scaladoc/snippet-compiler2.gif) | ||
![](../resources/images/scala3/scaladoc/snippet-compiler1.gif) | ||
|
||
## Type-signature browsing | ||
|
||
Haskell programmers are probably familiar with Hoogle - documentation search engine that allows you browse the docs by signatures rather than symbolic | ||
names. Since many Scala developers are also functional programming fans, we decided to add similar functionality for the Scaladoc. The whole tool is based on [Inkuire](https://github.com/VirtusLab/Inkuire) which works with Kotlin and is being currently adapted to fit Scala3 type system. | ||
|
||
![](../resources/images/scala3/scaladoc/inkuire.gif) | ||
|
||
To be up-to-date with this feature you can follow this [thread](https://contributors.scala-lang.org/t/pre-sip-scaladoc-search-by-type-signature/1604/15). | ||
Note that this is very basic demo of this feature. We still don't support type lambdas, higher-kinded types and many more scala features. | ||
|
||
|
||
|
||
|
||
[scaladoc-docstrings]: {{ site.scaladocUsage }}/scaladocDocstrings.html | ||
[static-documentation]: {{ site.scaladocUsage }}/staticSite.html | ||
[built-in-blog]: {{ site.scaladocUsage }}/blog.html | ||
[social-links]: {{ site.scaladocUsage }}/settings.html#-social-links |