--- layout: multipage-overview title: Built-in blog partof: scala3-scaladoc languages: ["ru"] num: 5 previous-page: static-site next-page: site-versioning --- Scaladoc allows you to include a simple blog in your documentation. For now, it provides only basic features. In the future, we plan to include more advanced features like tagging or author pages. Blog is treated a little differently than regular static sites. This article will help you set up your own blog. ## Proper directory setup All your blogposts must be put under `_blog/_posts` directory. ``` ├── _blog │ ├── _posts │ │ └── 2016-12-05-implicit-function-types.md │ └── index.html ``` Scaladoc loads blog if the `_blog` directory exists. ## Naming convention All the blogpost filenames should start with date in numeric format matching `YYYY-MM-DD`. Example name is `2015-10-23-dotty-compiler-bootstraps.md`. ## Page metadata The blog pages in scaladoc support [Yaml Frontmatter](https://assemble.io/docs/YAML-front-matter.html) which allows you to specify different values which will be used for metadata in your page. Here are the possible fields: ``` --- layout: author: title: subTitle: <Subtitle of the page> date: <Date of the creation of the page>, e.g. 2016-12-05 authorImg: <Link to the author's image> --- <Content of your page> ``` You can also find more details about the front matter on the [Jekyll documentation site](https://jekyllrb.com/docs/front-matter/). ## Syntax of the content Keep in mind that the writing of your blog is done with Markdown. You can find more information about the syntax in [Markdown Guide](https://www.markdownguide.org/basic-syntax/). ## Blog configuration When creating your blog, Scaladoc also allows you to configure it. In order to modify the default settings of the blog documentation, users need to create a file named `blog.yml` in the **root directory of the blog**. The file should contain the parameters that the user wants to change. For example, if a user wants to change the input directory to "my_posts", the output directory to "my_docs", and temporarily hide the blog, they can create a file with the following content: ``` input: my_posts output: my_docs hidden: true ``` ### Parameters: `input`: specifies the directory containing markdown files for the blog posts (default: "_posts" in "docs"). `output`: specifies the folder where HTML pages will be generated (default: "blog" in "target/docs"). `hidden`: allows users to temporarily hide the blog (default: "false"). To change these settings, create a file with the parameters and save it in the blog's root directory. The next time the blog is built, the new settings will be used.