Posts and events are two kinds of content. Content types let you make your own: a Team with names and roles, Projects with links and dates, a Menu with prices - whatever your site needs.
You make them in SpaceDash, and SpaceClub! does the rest: a page for every entry, a listing page with cards, a block to show them on any page, and a news feed.
Making a Content Type
- In SpaceDash, open Content types and click New type.
- Give it a Name (e.g.
Team) and say what one item is called (e.g.Member). Its Address is filled in for you -teammeans its pages live at/team/. - Pick an Icon, and add a Description for the top of its listing page if you like.
- Add Fields. Every entry already has a Title and a Body, so add whatever else it needs.
- Publish the change. Your new type appears in SpaceDash’s sidebar, ready for its first entry.
Field Types
| Field | Good For |
|---|---|
| Text | A short line, like a name or role |
| Long text | A few lines of plain text |
| Rich text | Formatted text with headings and links |
| Number | A price, a count, a year |
| Date | A day, picked from a calendar |
| Yes / no | A switch, like Featured |
| Image | A photo or picture |
| Link | An address on this site or another |
| Icon | One of the Bootstrap Icons |
| Choice | Pick one from a set of options |
| List of text | Several short items, like skills |
| Link to another type | Points at an entry of another type - e.g. a Project’s team members |
Name things once. A type’s address and each field’s stored name become part of your files. Change them after you’ve added entries and those entries lose track of them.
What You Get
For a type with the address team:
| What | Where |
|---|---|
| Each entry’s own page | /team/alice/ |
| A listing page with every entry as a card | /team/ |
| A news feed | /team/feed.xml |
| A block for any page | + → your type’s name, in the SpaceDash text editor |
Want your own words and blocks around the cards on the listing page? Click Make list page next to the type in SpaceDash. It becomes a normal page under Pages, with the list already in it, and Edit list page takes you back to it later.
Where It Lives
Content types are plain files, like everything else:
- The types themselves are in
src/_data/contentTypes.json. - Each entry is a Markdown file in a folder named after the type, e.g.
src/team/alice.md.
To show a type’s cards anywhere without SpaceDash:
{% set listType = "team" %}
{% set listTitle = "Our Team" %}
{% include "partials/typeList.njk" %}| Variable | Values | Default |
|---|---|---|
listType | The type’s address (required) | none |
listTitle | The heading above the cards | none |
listLimit | A number, or "all" | "all" |
listColumns | Cards per row, 1 to 6 | 3 |
Turning Them Off
Don’t need content types? Set "contentTypes": false under features in spaceclub.json. Your entries stay in src/, ready for when you turn it back on. See Features.
