The code and data behind xeiaso.net
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/lume: allow rebuilds when git is happy

Signed-off-by: Xe Iaso <me@xeiaso.net>

Xe Iaso 6de8ae1c fa4e3a34

+25 -4
+8 -2
internal/lume/lume.go
··· 4 4 "archive/zip" 5 5 "context" 6 6 "encoding/json" 7 + "errors" 7 8 "expvar" 8 9 "fmt" 9 10 "html/template" ··· 251 252 ReferenceName: plumbing.NewBranchReferenceName(f.opt.Branch), 252 253 }) 253 254 if err != nil { 254 - updateErrors.Add(1) 255 - return err 255 + switch { 256 + case errors.Is(err, git.NoErrAlreadyUpToDate): 257 + slog.Debug("already up to date") 258 + default: 259 + updateErrors.Add(1) 260 + return err 261 + } 256 262 } 257 263 258 264 err = wt.Checkout(&git.CheckoutOptions{
+15
internal/passwdmiddleware.go
··· 1 + package internal 2 + 3 + import "net/http" 4 + 5 + func PasswordMiddleware(username, password string, next http.Handler) http.Handler { 6 + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 7 + user, pass, ok := r.BasicAuth() 8 + if !ok || user != username || pass != password { 9 + http.Error(w, "Unauthorized", http.StatusUnauthorized) 10 + return 11 + } 12 + 13 + next.ServeHTTP(w, r) 14 + }) 15 + }
+2 -2
lume/src/events.jsx
··· 19 19 </div> 20 20 )} 21 21 22 - <div className="my-4 prose"> 22 + <div className="my-4 prose max-w-full"> 23 23 <p> 24 24 If you'd like me to speak at an event, please <a href="/contact">contact me</a>! I'm always looking for new opportunities to share my knowledge and experiences. I'm also available for interviews, podcasts, and other media appearances. 25 25 </p> 26 - <p>Please note that all conferences and meetups I attend require a publicly posted code of conduct.</p> 26 + <p>Please note that all conferences and meetups I speak at require a publicly posted code of conduct.</p> 27 27 </div> 28 28 </> 29 29 );