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 Favicon To Your Publish Website Documentation #101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
31 changes: 31 additions & 0 deletions Documentation/HowTo/add-favicon-to-your-website
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Add Favicon To Your Publish Website

Favicon is an important icon for your website tab. With a favicon, your website is easy to recognize.

To add a favicon, you should add your favicon image to your `Resources` folder.

> I highly recommended your favicon dimensions is 16x16 pixel.

Step:
1. For more organized project folders, add new folder which is `Images` folder inside the `Resources` folder.

```
Resources
Images
```

2. Add your favicon images inside the `Images` folder.

```
Resources
Images
favicon.png
```
3. The final step, add the following code in the `main.swift` file.

```
struct SampleWebsite: Website {
...
var favicon: Favicon? { .init(path: "Images/favicon.png", type: "image/png") }
}
```
27 changes: 27 additions & 0 deletions Documentation/HowTo/add-images-to-your-publish-website
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Add Images To Your Publish Website

Sometimes we want adding images to our website for make our article clear.

Here are the steps to adding images.

Step:

1. Adding images in `Resources` folder.
2. To more organized, add new folder with the name `Images` and also add new folder with the title of the articel that we want to upload image there. For example, we have new article with title "Example-Article". Our folder hierarchy should like this:
```
Resources
Images
Example-Article
image.png
```
3. In our `Content` | `post`, add a new file for writing the article. So, create `example-article.md` file as we mention before that we have a new article with that title. Our folder hierarchy should like this:
```
Content
post
example-article.md
```

4. Finally, in `example-article.md` file, add a markdown syntax like this:
```
![ImageAlt](/Images/Example-Article/image.png)
```