diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7a655a4..eafd7c1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,7 +18,7 @@ jobs: go-version: "1.23" - name: Build - run: go build -v ./.. + run: go build -v . - name: Upload a Build Artifact uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 0ad3909..2789e4c 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ yarn-error.log # Build Artifacts result* catApi + +# Production Config +config.yml diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 34ee96b..0000000 --- a/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -server: - port: "3000" diff --git a/example.config.yml b/example.config.yml new file mode 100644 index 0000000..c861b6b --- /dev/null +++ b/example.config.yml @@ -0,0 +1,6 @@ +server: + port: "3000" + +site: + title: "Cat Gallery" + header: "Cat Gallery" diff --git a/main.go b/main.go index 592de8f..81b76ba 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,8 @@ import ( var images []string var logger = logrus.New() +var title string +var header string var port string // Cache for image list, it should expire every 10 minutes @@ -35,7 +37,7 @@ var tmpl = template.Must(template.New("index").Parse(` - Image Gallery + {{.Title}} -

Image Gallery

+

{{.Header}}