mirror of
				https://github.com/pawroman/zola-theme-terminimal.git
				synced 2025-10-31 08:06:15 +01:00 
			
		
		
		
	Add mastodon support
This commit is contained in:
		
							parent
							
								
									a5b96f006f
								
							
						
					
					
						commit
						5b7cda04fb
					
				
					 3 changed files with 20 additions and 0 deletions
				
			
		
							
								
								
									
										12
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								README.md
									
										
									
									
									
								
							|  | @ -34,6 +34,7 @@ For more information about this fork and the differences to the original theme, | |||
| - [Features](#features) | ||||
|   - [OpenGraph](#opengraph) | ||||
|   - [Comments](#comments) | ||||
|   - [Mastodon](#mastodon) | ||||
| - [Configuration](#configuration) | ||||
|   - [Only show the post's description](#only-show-the-posts-description) | ||||
|   - [Colors](#colors) | ||||
|  | @ -173,6 +174,17 @@ See the [utterances] documentation regarding these options: | |||
| - [`label`](https://utteranc.es/#heading-mapping) | ||||
| - [`theme`](https://utteranc.es/#heading-theme) | ||||
| 
 | ||||
| ### Mastodon | ||||
| 
 | ||||
| To add Mastodon support, add the following to your `config.toml`: | ||||
| 
 | ||||
| ```toml | ||||
| [extra] | ||||
| mastodon_url = "https://hachyderm.io/@opeik" | ||||
| ``` | ||||
| 
 | ||||
| This will add headers required for [verification](https://docs.joinmastodon.org/user/profile/#verification). | ||||
| 
 | ||||
| ## Configuration | ||||
| 
 | ||||
| ### Only show the post's description | ||||
|  |  | |||
|  | @ -26,6 +26,10 @@ | |||
|         <link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") | safe }}" href="{{ config.extra.favicon | safe }}"> | ||||
|     {% endif -%} | ||||
| 
 | ||||
|     {%- if config.extra.mastodon_url %} | ||||
|         {%- block mastodon %}{{ head_macros::mastodon(config=config) }}{% endblock mastodon -%} | ||||
|     {% endif -%} | ||||
| 
 | ||||
|     {%- block extra_head %} | ||||
|     {% endblock extra_head -%} | ||||
| </head> | ||||
|  |  | |||
|  | @ -92,3 +92,7 @@ | |||
|     <meta property="twitter:domain" content="{{ config.base_url | replace(from="https://", to="") }}"> | ||||
|     <meta property="twitter:url" content="{{ permalink | safe }}"> | ||||
| {% endmacro open_graph %} | ||||
| 
 | ||||
| {% macro mastodon(config) %} | ||||
|     <link rel="me" href="{{ config.extra.mastodon_url }}" /> | ||||
| {% endmacro mastodon %} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sandro Stikić
						Sandro Stikić