Add TODO to externalize config some day...
This commit is contained in:
		
							parent
							
								
									12e6465264
								
							
						
					
					
						commit
						5993ec498c
					
				
					 1 changed files with 2 additions and 25 deletions
				
			
		
							
								
								
									
										27
									
								
								makesite.py
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								makesite.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,30 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
# The MIT License (MIT)
 | 
			
		||||
#
 | 
			
		||||
# Copyright (c) 2018 Sunaina Pai
 | 
			
		||||
#
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining
 | 
			
		||||
# a copy of this software and associated documentation files (the
 | 
			
		||||
# "Software"), to deal in the Software without restriction, including
 | 
			
		||||
# without limitation the rights to use, copy, modify, merge, publish,
 | 
			
		||||
# distribute, sublicense, and/or sell copies of the Software, and to
 | 
			
		||||
# permit persons to whom the Software is furnished to do so, subject to
 | 
			
		||||
# the following conditions:
 | 
			
		||||
#
 | 
			
		||||
# The above copyright notice and this permission notice shall be
 | 
			
		||||
# included in all copies or substantial portions of the Software.
 | 
			
		||||
#
 | 
			
		||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 | 
			
		||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
			
		||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 | 
			
		||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 | 
			
		||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 | 
			
		||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 | 
			
		||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 | 
			
		||||
# Modifed by Yax
 | 
			
		||||
 | 
			
		||||
"""Make static website/blog with Python."""
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
| 
						 | 
				
			
			@ -168,6 +143,8 @@ def read_content(filename, params):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
def fix_relative_links(site_url, text):
 | 
			
		||||
    """Absolute links needed in RSS feed"""
 | 
			
		||||
    # TODO externalize links replacement configuration
 | 
			
		||||
    return text \
 | 
			
		||||
        .replace("src=\"/images/20", "src=\"" + site_url + "/images/20") \
 | 
			
		||||
        .replace("href=\"/20", "href=\"" + site_url + "/20")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue