add hire/resume pages, contact form, security middleware, and admin improvements

This commit is contained in:
Blake Ridgway
2026-03-08 21:36:47 -05:00
parent c916186d78
commit 261745a5b7
22 changed files with 1237 additions and 72 deletions

View File

@@ -161,6 +161,28 @@ func (s *Store) Search(query string) ([]*Post, error) {
return results, nil
}
// Neighbors returns the posts immediately older and newer than slug in
// date-descending order (newer = more recent = lower index).
// Either value may be nil if slug is at the boundary.
func (s *Store) Neighbors(slug string) (older, newer *Post, err error) {
posts, err := s.All(false)
if err != nil {
return nil, nil, err
}
for i, p := range posts {
if p.Slug == slug {
if i+1 < len(posts) {
older = posts[i+1]
}
if i > 0 {
newer = posts[i-1]
}
return older, newer, nil
}
}
return nil, nil, errors.New("post not found: " + slug)
}
// AllTags returns a deduplicated list of tags across all published posts.
func (s *Store) AllTags() ([]string, error) {
posts, err := s.All(false)