Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/getting-started/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ let fileMiddleware = FileMiddleware(
app.middleware.use(fileMiddleware)
```

If running from Xcode please set the project schema run option working directory.
See [here](https://docs.vapor.codes/getting-started/xcode/#custom-working-directory) for more information.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use an 'local' link to another markdown file, not an absolute link. The current link doesn't work with localization

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 02e694e.


To see the `favicon.ico` in action prepare a route in `/Sources/App/routes.swift` like this:

```swift
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree that the current docs are pretty unhelpful. I think it might be better to change the existing favicon.ico example to be a different type of file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The favicon.ico icon is always added at some point in a process of building a full-feature website. It think it should stay.

import Vapor

func routes(_ app: Application) throws {
app.get { req async in
Response(
status: .ok,
headers: ["Content-Type": "text/html"],
body:
"""
<html>
<head>
<link rel="shortcut icon" href="/favicon.ico">
</head>
<body>
It works!
</body>
</html>
"""
)
}
}
```

Comment on lines +38 to +41
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would present this note like this:

Suggested change
If running from Xcode please set the project schema run option working directory.
See [here](xcode.md#custom-working-directory) for more information.
!!! info
If running from Xcode please set the project schema run option working directory.
See [here](xcode.md#custom-working-directory) for more information.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wieczorek1990 Also check this. 😉

## Sources

This folder contains all of the Swift source files for your project.
Expand Down