forked from fediversity/fediversity
		
	stricter type for articles
This commit is contained in:
		
							parent
							
								
									829a796f16
								
							
						
					
					
						commit
						e38960661c
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -49,7 +49,10 @@ in
 | 
			
		|||
        head = ''
 | 
			
		||||
          <title>${page.title}</title>
 | 
			
		||||
          <meta name="description" content="${page.description}" />
 | 
			
		||||
          <meta name="author" content="${with lib; if isList page.author then join ", " page.author else page.author}" />
 | 
			
		||||
          ${with lib; join "\n" (map
 | 
			
		||||
          (author: ''<meta name="author" content="${author}" />'')
 | 
			
		||||
          (if isList page.author then page.author else [page.author]))
 | 
			
		||||
          }
 | 
			
		||||
        '';
 | 
			
		||||
        body = ''
 | 
			
		||||
          ${templates.nav { menu = { menu = config.menus.main; }; }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -95,12 +95,12 @@ in
 | 
			
		|||
        };
 | 
			
		||||
        date = mkOption {
 | 
			
		||||
          description = "Publication date";
 | 
			
		||||
          type = with types; nullOr str;
 | 
			
		||||
          type = with types; str;
 | 
			
		||||
          default = null;
 | 
			
		||||
        };
 | 
			
		||||
        author = mkOption {
 | 
			
		||||
          description = "Page author";
 | 
			
		||||
          type = with types; nullOr (either str (listOf str));
 | 
			
		||||
          type = with types; either str (nonEmptyListOf str);
 | 
			
		||||
          default = null;
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue