mirror of
				https://github.com/pawroman/zola-theme-terminimal.git
				synced 2025-10-31 08:06:15 +01:00 
			
		
		
		
	Add support for multiple atom/rss feed files
This commit is contained in:
		
							parent
							
								
									be6980def0
								
							
						
					
					
						commit
						2d6d7e6c89
					
				
					 1 changed files with 11 additions and 6 deletions
				
			
		|  | @ -14,12 +14,17 @@ | |||
|     {%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%} | ||||
| 
 | ||||
|     {%- if config.generate_feeds %} | ||||
|         {%- if "rss" in config.feed_filename %} | ||||
|             {% set feed_type = 'rss+xml' %} | ||||
|         {%- else %} | ||||
|             {% set feed_type = 'atom+xml' %} | ||||
|         {% endif -%} | ||||
|         <link rel="alternate" type="application/{{ feed_type }}" title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}"> | ||||
|         {%- for feed in config.feed_filenames %} | ||||
| 
 | ||||
|         {%- if feed is containing('atom') %} | ||||
|         <link rel="alternate" type="application/atom+xml" title="{{ config.title }} Atom Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" /> | ||||
|         {%- endif %} | ||||
| 
 | ||||
|         {%- if feed is containing('rss') %} | ||||
|         <link rel="alternate" type="application/rss+xml" title="{{ config.title }} RSS Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" /> | ||||
|         {%- endif %} | ||||
| 
 | ||||
|         {%- endfor %} | ||||
|     {% endif -%} | ||||
| 
 | ||||
|     {%- if config.extra.favicon %} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brooke
						Brooke