When you create a new Serum project by running
mix serum.new, the following
directories and files are created.
/path/to/project/ ├── serum.exs ├── pages/ │ └── index.md ├── posts/ ├── templates/ │ ├── base.html.eex │ ├── list.html.eex │ ├── page.html.eex │ └── post.html.eex ├── includes/ │ └── nav.html.eex ├── assets/ │ ├── css/ │ ├── js/ │ └── images/ ├── media/ ├── files/ └── mix.exs
This file indicates that the containing directory is a Serum project. And it contains various metadata and options which are used while Serum builds the project. See Project Definition document for more information.
This is where source files for your pages should be saved. You may create subdirectories to organize your pages hierarchically. Adding Pages to Your Website document discusses how to add new pages in your website.
Serum processes blog posts differently, compared to ordinary pages. So they should be saved into a separate directory. Read Writing Blog Posts document to learn more about blogging with Serum. It is safe to remove this directory if you are not going to write any blog post.
Templates define overall layout of your website. There are four templates you must define. Templates document describes each of them.
Includes are a special kind of templates which can be included in other
templates, includes, or pages in
.html.eex format. Read
Includes document to learn more. You can remove this
directory if your project does not have any include files.
Media files are static files which are referenced by a few pages or blog posts, such as pictures, video clips, audio files, etc. You may remove this directory if none of your pages or blog posts uses media files. Read Assets and Media document for more information.
Files or directories in this directory will be copied to the root directory of your website after Serum has successfully built your project. This is useful, for example, when you need to set favicons for your website.
A Serum project is also a Mix project. You need to keep this file in order to install and use Serum. You will also need this file to manage dependencies for your own codes.
Note that some files or directories may be created by Mix to store dependencies and build artifacts.