mirror of
				https://github.com/pawroman/zola-theme-terminimal.git
				synced 2025-10-31 08:06:15 +01:00 
			
		
		
		
	Merge pull request #35 from heitorPB/autoconfigure-feed-type
Automatically set link to RSS or ATOM feed
This commit is contained in:
		
						commit
						6e91e642f6
					
				
					 2 changed files with 12 additions and 1 deletions
				
			
		|  | @ -5,6 +5,12 @@ title = "Zola Terminimal theme" | |||
| # Sass compilation is required | ||||
| compile_sass = true | ||||
| 
 | ||||
| # The theme supports feeds (RSS and ATOM) | ||||
| generate_feed = true | ||||
| 
 | ||||
| # Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. | ||||
| feed_filename = "atom.xml" | ||||
| 
 | ||||
| # Optional: enable tags | ||||
| taxonomies = [ | ||||
|     {name = "tags"} | ||||
|  |  | |||
|  | @ -12,7 +12,12 @@ | |||
|     {{ head_macros::head(config=config) }} | ||||
| 
 | ||||
|     {%- if config.generate_feed %} | ||||
|         <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}"> | ||||
|         {%- 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 }}"> | ||||
|     {% endif -%} | ||||
| 
 | ||||
|     {%- if config.extra.favicon %} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Paweł Romanowski
						Paweł Romanowski