-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 02e694e.
Will do.
W dniu pon., 4.09.2023 o 16:58 Joannis Orlandos ***@***.***>
napisał(a):
… ***@***.**** requested changes on this pull request.
------------------------------
In docs/getting-started/folder-structure.md
<#897 (comment)>:
> @@ -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.
You need to use an 'local' link to another markdown file, not an absolute
link. The current link doesn't work with localization
—
Reply to this email directly, view it on GitHub
<#897 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMRLK4VLLS6NT4LQYMWXPLXYXT77ANCNFSM6AAAAAA4KRPLJU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Need translations. |
|
||
To see the `favicon.ico` in action prepare a route in `/Sources/App/routes.swift` like this: | ||
|
||
```swift |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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
I moved the favicon sample to |
There was a problem hiding this 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
If running from Xcode please set the project schema run option working directory. | ||
See [here](xcode.md#custom-working-directory) for more information. | ||
|
||
|
There was a problem hiding this comment.
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:
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. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wieczorek1990 Also check this. 😉
Personally I don't think that the example code adds much. This can be the same for favicon, styles, javascript, images or any other file saved in the |
Every professional modern website has a favicon.
W dniu pt., 13 gru 2024 o 16:45 Ale Mohamad ⌘ ***@***.***>
napisał(a):
… Personally I don't think that the example code adds much. This can be the
same for favicon, styles, javascript, images or any other file saved in the
/public folder.
—
Reply to this email directly, view it on GitHub
<#897 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMRLK7GUM7RPKKUFD3VGCL2FL6KRAVCNFSM6AAAAABTSHVBUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBRG4ZTINZXGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sure! But I don't think there should be an example of this in the docs. Maybe another way to raise awareness that there should be one is to provide a default favicon in the base project, instead of adding an example that applies to any file stored in the public folder. |
Maybe we need more separated pages where we explain how to add favicon,
CSS, HTML, JS files. People search and they should find recipes when they
ask.
W dniu pt., 13 gru 2024 o 16:56 Ale Mohamad ⌘ ***@***.***>
napisał(a):
… Every professional modern website has a favicon.
Sure! But I don't think there should be an example of this in the docs.
Maybe another way to raise awareness that there should be one is to
provide a default favicon in the base project, instead of adding an example
that applies to any file stored in the public folder.
—
Reply to this email directly, view it on GitHub
<#897 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMRLK36P42FKQNYJHPWXDD2FL7TTAVCNFSM6AAAAABTSHVBUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBRG42TINJYGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I understand what you mean. For this there's the Leaf documentation in the Folder Structure section. Maybe we could name this in that section, but as far as I understand Leaf doesn't have a custom tag to reference resources in the public folder. What do you think about this approach? |
Yeah, this table of contents feature will do.
W dniu pt., 13 gru 2024 o 17:16 Ale Mohamad ⌘ ***@***.***>
napisał(a):
… Maybe we need more separated pages where we explain how to add favicon,
CSS, HTML, JS files. People search and they should find recipes when they
ask.
I understand what you mean. For this there's the Leaf documentation in the Folder
Structure
<https://docs.vapor.codes/leaf/getting-started/#folder-structure>
section. Maybe we could name this in that section, but as far as I
understand Leaf doesn't have a custom tag to reference resources in the
public folder.
What do you think about this approach?
—
Reply to this email directly, view it on GitHub
<#897 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMRLK7IVCL3NXBVCZNKWYD2FMB47AVCNFSM6AAAAABTSHVBUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBRG44TCNBZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.