Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more info about favicon.ico. #897

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wieczorek1990
Copy link

So basically I am going through the docs and found a problem for novice users.

I am linking the article about Xcode working directory paths for use case when running from Xcode. (here)
I am adding the sample for testing a favicon ready website.

Thanks.

@@ -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
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
Author

Choose a reason for hiding this comment

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

Addressed in 02e694e.

@wieczorek1990
Copy link
Author

wieczorek1990 commented Sep 4, 2023 via email

@wieczorek1990
Copy link
Author

Need translations.


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

```swift
Copy link
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
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.

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

We already have a section on the FileMiddleware so we should just link to that.

I agree however that we should add the note about setting the custom working directory alongside though

@wieczorek1990
Copy link
Author

I moved the favicon sample to advanced/middleware.md.

@Joannis
Copy link
Member

Joannis commented Sep 18, 2023

@0xTim

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

I'm going to open this up to the community - personally I don't see what the extra example adds to the current image example.

We should however link the mention on FileMiddleware in the folder structure to the FileMiddleware docs page

@Joannis Joannis removed their request for review November 14, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants