A modern web interface for managing static site content. Built for GitHub Pages and Jekyll sites.
Clone the repository:
git clone https://github.com/josegonzalez/static-admin.git
cd static-admin
Install backend dependencies:
go mod download
Install frontend dependencies:
cd frontend
npm install
Create a GitHub OAuth App:
http://localhost:8080/auth/github/callbackCreate a .env file in the root directory:
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_REDIRECT_URL=http://localhost:8080/auth/github/callback
JWT_SECRET=your_jwt_secret
SESSION_SECRET=your_session_secret
Start the backend server:
go run main.go
Start the frontend development server:
cd frontend
npm run dev
Visit http://localhost:3000
We include a Dockerfile that compiles both the frontend and backend. This can be used to deploy to any Docker-compatible platform, and will respect the PORT environment variable. By default, it will run on port 5000.
To use it locally, run the following commands:
Build the docker image:
docker build -t static-admin .
Run the docker container:
docker run --rm -p 8080:8080 static-admin
Visit http://localhost:8080
Build the frontend:
cd frontend
npm run build
Generate the embedded frontend golang code:
go generate ./...
Build the backend:
go build -o static-admin main.go
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE.md for details