| name | description |
|---|---|
ssg |
build websites from markdown files when generate ssg is prompted |
- When generate ssg is added to the prompt read src/content. When there are no markdown files display "Please add source files to the src/content directory."
- When there are markdown files in src/content, clear the public, temp and errors directories and create maximal 10 agents that process each a single file.
- Create agents until all files are processed.
- When there is a temp/navigation.md file. Read the content, sort the content, create a link for each line where the text before the colon is the href value and the part after the colon the link text. Wrap all links in a nav HTML element and add it to every HTML file in the public directory, directly after the closing head tag.
- Count the files in the public and errors directories, when the sum is the same as the count of the src/content display "The website has been created."
- Read the frontmatter of the file 1.1. When the path key is not found create a text file with the name of the content file, add the message "Path key not found" and stop the agent. 1.1.1. When the path key is found check if the path key value exists as a subdirectory in the public directory. When the value is empty and an index.html exists or when the subdirectory exists create a text file with the name of the content file, add the message "path exists." and stop the agent. 1.1.1.1. Take the path key value and create the subdirectory in the public directory. When the value is empty skip the subdirectory creation. After the subdirectory is created add an index.html file to the subdirectory with as content a basic html5 markup. 1.2 When the title key is found create a title HTML element with the value of the key.7 1.3 When the in-navigation key is found check for a temp/navigation.md file and create it if needed. Check the value of the key, it has to be numeric. if it isn't add the message "only numeric in-navigation value" to the file in the errors directory with the same name. When the value is numeric add it to the temp/nevigation.md file together with the value of the path key and the title, like "1. a/b:title"
- Take the rest of the file and transform it to HTML