jgdr/content/article/int-break.md

34 lines
1.4 KiB
Markdown
Raw Normal View History

2023-07-15 17:39:16 +03:00
---
title: "How to break or debug this site 🐛 🧨⚫ "
date: "2023-07-15T17:21:32+03:00"
author: "anybody"
contributors: ["constantinos-miltiadis.md"]
draft: false
keywords:
- draft
- internal
- guide
- debug
abstract: |
Common reasons why the site breaks and would not compile, either locally or on the server.
---
2023-07-17 19:14:46 +03:00
# Break local & online version
2023-07-15 17:39:16 +03:00
2023-07-17 19:14:46 +03:00
- `print` items that point to to inexistent files (e.g. a print item with field `print: "article/inexistent-file.md" `) will break the site, and will now allow to compile. This can occur when a target file was renamed, or when a file was converted to draft. Debug by removing all files of the print directory (except `_index.md`)
- **mixing draft and non draft items** in collections (e.g. issue that `has_artices: ["article/draft.md", "article/non-draft.md"`). Debug: double check that all children of non-draft items are also non-draft.
- Messing up the header (front matter) of a Markdown file:
2023-07-15 17:39:16 +03:00
```
---
title: "How to break this site ⚫ "
date: "2023-07-15T17:21:32+03:00"
author: "anybody" <-- forgetting to close any string quote will break
contributors: ["jane-contributor.md"] <--forgetting to close any array brackets will break
draft: true
keywords:
2023-07-17 19:14:46 +03:00
- draft <-- not following this syntax/indentation will break
2023-07-15 17:39:16 +03:00
abstract: |
2023-07-17 19:14:46 +03:00
The text of your abstract. <-- not following this syntax/indentation will break
2023-07-15 17:39:16 +03:00
--- <-- removing one or more dashes will break
```