fastn-stack / fastn

🚧 (Alpha stage software) fastn - better way to build websites 🚧
https://fastn.com
GNU Affero General Public License v3.0
468 stars 36 forks source link

Enforce file extensions #1444

Open siddhantk232 opened 1 year ago

siddhantk232 commented 1 year ago

The sitemap works with documents with no extensions as well. This is a bug, we want the user to explicitly mention file extensions.

Current behaviour:

Below code works and assumes that the document features/design is a .ftd file.

-- fastn.sitemap:

- Design: /design/
  document: features/design

Expected behaviour:

The above code should error (and maybe suggest that the user is missing the file extension).

Correct code:

-- fastn.sitemap:

- Design: /design/
  document: features/design.ftd
amitu commented 1 year ago

A small correction in your code snippets, we do not need -- end: fastn.sitemap as fastn.sitemap does not expect "children".

siddhantk232 commented 1 year ago

A small correction in your code snippets, we do not need -- end: fastn.sitemap as fastn.sitemap does not expect "children".

Thanks! I've updated the comment :+1: