mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-03 19:56:36 +00:00 
			
		
		
		
	Add fontawesome
This commit is contained in:
		
							parent
							
								
									21f4356ff9
								
							
						
					
					
						commit
						753f8f0e1a
					
				
					 5 changed files with 41 additions and 9 deletions
				
			
		
							
								
								
									
										17
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
					@ -8,9 +8,16 @@ This is the source code for my personal portfolio, hosted on [my website](http:/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Building the website
 | 
					## Building the website
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The website is built using [hugo](https://gohugo.io/), but you will also need `npm` for [Bootstrap SASS](https://getbootstrap.com/docs/5.0/customize/sass/).
 | 
					The website is built using [hugo](https://gohugo.io/), but you will also need `npm`.
 | 
				
			||||||
The `npm` dependencies are listed in [`package.json`](./package.json) and can be installed simply by running `npm install`.
 | 
					`npm` is necessary for the ease of version control it provides for the packages we need. These include things such as:
 | 
				
			||||||
 | 
					- [Bootstrap SASS](https://getbootstrap.com/docs/5.0/customize/sass/) 
 | 
				
			||||||
 | 
					- [Font Awesome (Free)](https://fontawesome.com/).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
After all NPM requirements are satisfied, to build the static webpage, run [`./scripts/build.sh`](./scripts/build.sh), which will create a `./public` directory.
 | 
					All `npm` dependencies are listed in [`package.json`](./package.json) and can be installed simply by running `npm install`.
 | 
				
			||||||
This directory will contain all static files and can be used as a location for the file server. You can also use [`./scripts/server.sh`](./scripts/server.sh), which
 | 
					
 | 
				
			||||||
will start the server directly with hugo. By default, this will use `http://localhost:1313`.
 | 
					After all NPM requirements are satisfied, to build the static webpage and `hugo` is installed, run [`./scripts/build.sh`](./scripts/build.sh), 
 | 
				
			||||||
 | 
					which will create a `./public` directory. This directory will contain all static files and can be used as a location for the file server. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can then use any file server of your liking to make the webpage available, if you want to stick to hugo, you can also use
 | 
				
			||||||
 | 
					[`scripts/server.sh`](./scripts/server.sh), however using this can be a bit slower than using some other tools.
 | 
				
			||||||
 | 
					If using the script, it will start the server directly with hugo on `http://localhost:1313`.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,6 +5,7 @@
 | 
				
			||||||
        <title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
 | 
					        <title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
 | 
				
			||||||
        {{ partial "style.html" "scss/style.scss" }}
 | 
					        {{ partial "style.html" "scss/style.scss" }}
 | 
				
			||||||
        {{ partial "style.html" "css/highlight.css" }}
 | 
					        {{ partial "style.html" "css/highlight.css" }}
 | 
				
			||||||
 | 
					        {{ partial "style.html" "css/font-awesome.css" }}
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
        {{ block "main" . }}{{ end }}
 | 
					        {{ block "main" . }}{{ end }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										15
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										15
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -5,9 +5,19 @@
 | 
				
			||||||
  "packages": {
 | 
					  "packages": {
 | 
				
			||||||
    "": {
 | 
					    "": {
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@fortawesome/fontawesome-free": "^5.15.4",
 | 
				
			||||||
        "bootstrap": "^5.1.0"
 | 
					        "bootstrap": "^5.1.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/@fortawesome/fontawesome-free": {
 | 
				
			||||||
 | 
					      "version": "5.15.4",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==",
 | 
				
			||||||
 | 
					      "hasInstallScript": true,
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=6"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/@popperjs/core": {
 | 
					    "node_modules/@popperjs/core": {
 | 
				
			||||||
      "version": "2.9.3",
 | 
					      "version": "2.9.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
				
			||||||
| 
						 | 
					@ -32,6 +42,11 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "@fortawesome/fontawesome-free": {
 | 
				
			||||||
 | 
					      "version": "5.15.4",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg=="
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "@popperjs/core": {
 | 
					    "@popperjs/core": {
 | 
				
			||||||
      "version": "2.9.3",
 | 
					      "version": "2.9.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "@fortawesome/fontawesome-free": "^5.15.4",
 | 
				
			||||||
    "bootstrap": "^5.1.0"
 | 
					    "bootstrap": "^5.1.0"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,11 +6,19 @@ rm -rf "$OUTPUT_DIR"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mkdir -p "$STATIC_BUILD"
 | 
					mkdir -p "$STATIC_BUILD"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cp -r "$STATIC_SRC/img" "$STATIC_BUILD/img"
 | 
					mkdir -p "$STATIC_SRC/img"
 | 
				
			||||||
cp -r "$STATIC_SRC/js" "$STATIC_BUILD/js"
 | 
					cp -r "$STATIC_SRC/img/*" "$STATIC_BUILD/img"
 | 
				
			||||||
cp -r "$STATIC_SRC/css" "$STATIC_BUILD/css"
 | 
					 | 
				
			||||||
cp -r "$STATIC_SRC/scss" "$STATIC_BUILD/scss"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p "$STATIC_SRC/js"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/js/*" "$STATIC_BUILD/js"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p "$STATIC_SRC/css"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/css/*" "$STATIC_BUILD/css"
 | 
				
			||||||
 | 
					cp -r "$BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css" "$STATIC_BUILD/css/font-awesome.css"
 | 
				
			||||||
hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
 | 
					hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p "$STATIC_SRC/scss"
 | 
				
			||||||
 | 
					cp -r "$STATIC_SRC/scss/*" "$STATIC_BUILD/scss"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hugo -vDEF --gc $@
 | 
					hugo -vDEF --gc $@
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue