gemini index
This commit is contained in:
		
							parent
							
								
									9353b63496
								
							
						
					
					
						commit
						b5129139f5
					
				
							
								
								
									
										15
									
								
								make.sh
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								make.sh
									
									
									
									
									
								
							@ -1,5 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
# global
 | 
			
		||||
@ -14,7 +13,10 @@ htmlIndexTmpl=/home/vilmibm/blog/index.tmpl.html
 | 
			
		||||
htmlIndex=/home/vilmibm/public_html/blog/index.html
 | 
			
		||||
 | 
			
		||||
gopherPath=/home/vilmibm/public_gopher/blog
 | 
			
		||||
gopherIndex="${gopherPath}/gophermap"
 | 
			
		||||
 | 
			
		||||
geminiPath=/home/vilmibm/public_gemini/blog
 | 
			
		||||
geminiIndex="${geminiPath}/index.gmi"
 | 
			
		||||
 | 
			
		||||
cd $postDir > /dev/null
 | 
			
		||||
 | 
			
		||||
@ -30,10 +32,13 @@ cp $htmlIndexTmpl $htmlIndex
 | 
			
		||||
rm ${gopherPath}/*
 | 
			
		||||
 | 
			
		||||
# Initialize blog gophermap
 | 
			
		||||
gopherIndex="${gopherPath}/gophermap"
 | 
			
		||||
echo "!the phlog of vilmibm as it were" > $gopherIndex
 | 
			
		||||
echo >> $gopherIndex
 | 
			
		||||
 | 
			
		||||
# Initialize blog index for gemini
 | 
			
		||||
echo "the gemblog of vilmibm as it were" > $geminiIndex
 | 
			
		||||
echo >> $geminiIndex
 | 
			
		||||
 | 
			
		||||
for p in $(ls *.md)
 | 
			
		||||
do
 | 
			
		||||
  pubdate=$($g "pubdate:" $p | $sed 's/pubdate: //')
 | 
			
		||||
@ -58,14 +63,14 @@ do
 | 
			
		||||
    echo "_published ${pubdate}_" >> $gopherPostPath
 | 
			
		||||
    $g -v "pubdate:" $p | $g -v "title:" | $g -v "slug:" >> $gopherPostPath
 | 
			
		||||
 | 
			
		||||
    # TODO index for gemini
 | 
			
		||||
 | 
			
		||||
    # Gemini
 | 
			
		||||
    echo "=> gemini://tilde.town/~vilmibm/blog/${slug}.gmi ${title}" >> $geminiIndex
 | 
			
		||||
    geminiPostPath="${geminiPath}/${slug}.gmi"
 | 
			
		||||
    echo "# ${title}" > $geminiPostPath
 | 
			
		||||
    echo >> $geminiPostPath
 | 
			
		||||
    echo "_published ${pubdate}_" >> $geminiPostPath
 | 
			
		||||
    $g -v "pubdate:" $p | $g -v "title:" | $g -v "slug:" >> $geminiPostPath
 | 
			
		||||
  fi
 | 
			
		||||
  echo "</body></html>" >> $htmlIndex
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo "</body></html>" >> $htmlIndex
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user