Cloud.Museum

Source Code Swift Version

Source Code Swift 🌐

This is the full source code developed by AI.

Creating a Command Line Project in Xcode

To create a command line project in Xcode, follow these steps:

1. Open Xcode and click on "Create a new Xcode project."

2. Choose "macOS" from the available platforms.

3. Select "Command Line Tool" and click "Next."

4. Enter your project name, organization identifier, and choose "Swift" as the language.

5. Click "Next" and choose a location to save your project.

6. Click "Create" to create your command line project.

Requirements

To run this code, you will need to:

  • Create a `Markdown` folder to hold your markdown files
  • Create a `Deploy` folder, which may contain a `public` sub-folder for images and other assets
  • Create an HTML file in the `Templates` folder

Code

Here is the source code for main.swift

Templates

You need to create the templates inside the /Templates folder.

Here are the templates for the index.html (for the homepage) and pages.html (for other pages):

pages.html is slightly different and doesn't show a list of the other pages, but has a link to the homepage. Of course, all of this can be improved, such as moving the CSS inside /deploy/public/, but I wanted to keep it in a single file.



Home

last update: Apr 2, 2023