mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 04:06:36 +00:00 
			
		
		
		
	Add some scripts for faster workflow
This commit is contained in:
		
							parent
							
								
									e6db609303
								
							
						
					
					
						commit
						d23d5f6c61
					
				
					 3 changed files with 29 additions and 0 deletions
				
			
		
							
								
								
									
										14
									
								
								scripts/build.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								scripts/build.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					source ./scripts/common.sh
 | 
				
			||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rm -rf "$STATIC_BUILD"
 | 
				
			||||||
 | 
					rm -rf "$OUTPUT_DIR"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/img" "$STATIC_BUILD/img"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/js" "$STATIC_BUILD/js"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/css" "$STATIC_BUILD/css"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/scss" "$STATIC_BUILD/scss"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hugo -vDEF --gc $@
 | 
				
			||||||
							
								
								
									
										8
									
								
								scripts/common.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								scripts/common.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BASEDIR="$PWD"
 | 
				
			||||||
 | 
					OUTPUT_DIR="$BASEDIR/public"
 | 
				
			||||||
 | 
					STATIC_SRC="$BASEDIR/static/src"
 | 
				
			||||||
 | 
					STATIC_BUILD="$BASEDIR/static/build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[ -f "$BASEDIR/.env" ]] && export $(cat "$BASEDIR/.env" | xargs)
 | 
				
			||||||
							
								
								
									
										7
									
								
								scripts/server.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								scripts/server.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					source ./scripts/common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					./scripts/build.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hugo server --noHTTPCache --disableFastRender --gc
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue