diff --git a/netlify.toml b/netlify.toml index 2a5b2a8..6ca55b2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -23,4 +23,9 @@ # If it should show more verbose logs (optional, default = true) debug = true # Relative path to source directory in case you use Hugo's "--s" option - srcdir = "exampleSite" \ No newline at end of file + srcdir = "exampleSite" + +[[redirects]] + from = "/admin/*" + to = "/admin/index.html" + status = 200 diff --git a/static/admin/config.yaml b/static/admin/config.yaml new file mode 100644 index 0000000..320b9ab --- /dev/null +++ b/static/admin/config.yaml @@ -0,0 +1,17 @@ +backend: + name: git-gateway + branch: master # or main if you're using a different default branch + +media_folder: "static/images/uploads" # Media files will be stored here +public_folder: "/images/uploads" + +collections: + - name: "blog" + label: "Blog" + folder: "content/blog" + create: true + slug: "{{year}}-{{month}}-{{day}}-{{slug}}" + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Date", name: "date", widget: "datetime" } + - { label: "Body", name: "body", widget: "markdown" } diff --git a/static/admin/index.html b/static/admin/index.html new file mode 100644 index 0000000..cc8acbe --- /dev/null +++ b/static/admin/index.html @@ -0,0 +1,22 @@ + + + + + Content Manager + + + + + + +