This is the site found at materialize.com.
Want to contribute? There are several ways:
The site is built using SvelteKit as the web framework, TailwindCSS as the CSS framework, Stackbit as the CMS (⚠️ Note: All content is also in this repo, Stackbit is just a UI for making changes without getting into the code), and it is deployed as static files on S3.
.stackbit
- contains the content modelling config that tells the CMS (Stackbit) how to make the content in src/content
editable in the Stackbit UIscripts
- utility scripts used during the build and deploy process.src/content
- markdown files corresponding to each page in the site.src/content/blog
- Blog posts are here!src/data
- JSON files containing structured data like employees, pricing, etc...src/routes
- JSON files containing structured data like employees, pricing, etc...static
- Everything in this directory (fonts, images, etc...) is shipped unmodified with the build to S3The content and structure of pages is defined almost completely in the frontmatter of a markdown file. Some pages like legal and privacy policy pages will also have a block of markdown below the frontmatter. Most pages on the marketing site are horizontal stacks of sections
which are also defined in the frontmatter.
Required frontmatter: See .stackbit/models/Page.ts
for the schema of frontmatter on a Page.
A blog post is made up of some YAML frontmatter (wrapped in three hyphens ---
at the beginning of the file) followed by the content in markdown.
Required frontmatter: See .stackbit/models/Post.ts
for the schema of frontmatter on a Post.
We support Github-flavored markdown, with a few additions:
:::note{.info}
Your message here.
:::
The faster we can iterate, the less time it takes to create new pages, new content, new messaging on the marketing site, the better.
A new technical contributor should be able to quickly get up-to-speed on how to work on the marketing site.
Fast CI
Editing content, whether via CMS or in repo, should be easy, intuitive and low-risk.
Everything that can be rendered server side should be rendered server side.
Render server-side:
Render client-side:
There is not a hard and fast rule that "all content must be separated out into the src/content
directory and editable via CMS, but doing so has two benefits:
On the flip side, if we go too far and try to make everything editable in a CMS, we will just end up with a complicated CMS that nobody uses and an even more complicated codebase.
This is why we are looking for the happy middle ground. Here are some examples of what to make editable and what not to:
Make it Editable:
Keep it in Code: