mirror of
				https://github.com/adityatelange/hugo-PaperMod.git
				synced 2025-11-04 02:12:49 +01:00 
			
		
		
		
	papermod howtos: Adding Custom Favicon(s)
This commit is contained in:
		@@ -128,6 +128,52 @@ weight: 2
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Adding Custom Favicon(s)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					We support the following paths under `/static` directory
 | 
				
			||||||
 | 
					and can be added accordingly.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-   `favicon.ico`
 | 
				
			||||||
 | 
					-   `favicon-16x16.png`
 | 
				
			||||||
 | 
					-   `favicon-32x32.png`
 | 
				
			||||||
 | 
					-   `apple-touch-icon.png`
 | 
				
			||||||
 | 
					-   `safari-pinned-tab.svg`
 | 
				
			||||||
 | 
					-   `site.webmanifest`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Favicon(s) can be generated by [Favicon.io](https://favicon.io)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    and can be simply put in `/static` folder.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. Other way is to add favicon(s) NOT located in `/static` folder.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    In site config add the following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ```
 | 
				
			||||||
 | 
					    params:
 | 
				
			||||||
 | 
					    assets:
 | 
				
			||||||
 | 
					        favicon: "<link / absolute url>"
 | 
				
			||||||
 | 
					        favicon16x16:  "<link / absolute url>"
 | 
				
			||||||
 | 
					        favicon32x32:  "<link / absolute url>"
 | 
				
			||||||
 | 
					        apple_touch_icon:  "<link / absolute url>"
 | 
				
			||||||
 | 
					        safari_pinned_tab:  "<link / absolute url>"
 | 
				
			||||||
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - `absolute url` means direct links to external resource: ex. https://web.site/someimage.png
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ```
 | 
				
			||||||
 | 
					    params:
 | 
				
			||||||
 | 
					    assets:
 | 
				
			||||||
 | 
					        favicon: "/favicon.ico"
 | 
				
			||||||
 | 
					        favicon16x16:  "/favicon-16x16.png"
 | 
				
			||||||
 | 
					        favicon32x32:  "/favicon-32x32.png"
 | 
				
			||||||
 | 
					        apple_touch_icon:  "/apple-touch-icon.png"
 | 
				
			||||||
 | 
					        safari_pinned_tab:  "/safari-pinned-tab.svg"
 | 
				
			||||||
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## References
 | 
					## References
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)
 | 
					-   [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user