Create a custom league page for your Sleeper fantasy football league!
(Unofficial) Sleeper League Page Template
Generate a custom league page for your Sleeper fantasy football league in just a few steps
If you and your league like League Page, please consider starring the repo and donating (and encouraging your league-mates to too!)
If you've never touched a line of code, use the Training Wheels Guide instead
/src/lib/utils/leagueInfo.js
and replace your_league_id
(line 2) and your_league_name
(line 3) with your Sleeper league ID and league name. (Optionally, also fill out the dues, and dynasty fields):
/src/lib/utils/leagueInfo.js
(lines 9-14)
//
at the beginning of each line) the managers' object (lines 27 - 92), also located in /src/lib/utils/leagueInfo.js
, there should be one object for each manager. The structure may change in the future (it has already 😅). The source of truth is down at the bottom, lines 104-126 (for assistance, consult the Training Wheels guide).
/static/managers/
directory and make the sure the name matches with what was provided aboveContent model
in the top bar and create Blog Post (id: blog_post
) and Blog Comment (id: blog_comment
) content models that matches the specs below (All fields are required):
.env
file to the root of your project and add the following variables
VITE_CONTENTFUL_ACCESS_TOKEN
with the corresponding value obtained from contenfulVITE_CONTENTFUL_SPACE
with your space ID, obtained from contenful.env
file
VITE_CONTENTFUL_CLIENT_ACCESS_TOKEN
with the Content Delivery API - access token
from contenfulenableBlog
to true in src/lib/utils/leagueInfo.js
/src/routes/constitution/index.svelte
(remember to adjust the table of contents accordingly)npm install
npm run dev --
npm run dev -- --host (to test on other devices locally)
npm run docker-run