Skip to content

Commit 4b9c871

Browse files
authored
Add images and Tables to Blog Posts (nmelhado#146)
* TODO: support tables and header formatting, revise comments * TODO: support tables and headers, add warning about new env variable * added tables, TODO: revise READMEs and add warnings * revise READMEs TODO: add warnings * upgrade sveltekit -- BREAKING * fix roster order bug * remove timeouts, upgrade last API endpoints * add blog console log if missing new ENV variable * enable SSR * fix manager link * fix other manager link
1 parent 2fd86ae commit 4b9c871

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3099
-1857
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
.DS_Store
22
node_modules
33
/.svelte-kit
4+
/.vercel
45
/package
56
.env
67
static/smui-dark.css
78
static/smui.css
89
build
10+
.vercel_build_output

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.0.0] - 2022-09-18
6+
7+
### Changed
8+
9+
- Upgraded Vite and SvelteKit [(issue #149)](https://github.com/nmelhado/league-page/issues/149)
10+
- **This may be a breaking change. It required a very significant rewrite**
11+
12+
### Fixed
13+
14+
- Blog being anabled crashing pages [(issue #141)](https://github.com/nmelhado/league-page/issues/141)
15+
- Support images and tables in blogs [(issue #140)](https://github.com/nmelhado/league-page/issues/140)
16+
- **This is a breaking change for previous blog integrations as it now requires an additional API key!!**
17+
- Follow the README or [TRAINING_WHEELS](https://github.com/nmelhado/league-page/blob/master/TRAINING_WHEELS.md#iii-add-a-blog) guide to add the additional key and re-enable your blog
18+
- Roster ID mismatch [(issue #155)](https://github.com/nmelhado/league-page/issues/155)
19+
520
## [1.3.4] - 2022-07-09
621

722
### Fixed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Generate a custom league page for your Sleeper fantasy football league in just a
8282
- For local development add a `.env` file to the root of your project and add the following variables
8383
- `VITE_CONTENTFUL_ACCESS_TOKEN` with the corresponding value obtained from contenful
8484
- `VITE_CONTENTFUL_SPACE` with your space ID, obtained from contenful
85+
- Create a Content Delivery / Preview API key
86+
- For local development add the following variable to your `.env` file
87+
- `VITE_CONTENTFUL_CLIENT_ACCESS_TOKEN` with the `Content Delivery API - access token` from contenful
8588
- To add the variables for production, go to your project settings and add the corresponding keys (using the same names as above) to the environment variables section
8689
- For more detailed instructions, follow the [Training Wheels blog instructions](https://github.com/nmelhado/league-page/blob/master/TRAINING_WHEELS.md#iii-add-a-blog)
8790
- Finally, set `enableBlog` to true in `src/lib/utils/leagueInfo.js`

TRAINING_WHEELS.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,25 @@ Generate a custom league page for your Sleeper fantasy football league in just a
192192
![Space ID](https://storage.googleapis.com/nfl-player-data/getSpaceID.jpg)
193193
- Create a Content Management API key and copy down the value
194194
![API key settings](https://storage.googleapis.com/nfl-player-data/apiKeySettings.jpg)
195-
![add API key](https://storage.googleapis.com/nfl-player-data/addApiKey.jpg)
195+
![add Content Management API key](https://storage.googleapis.com/nfl-player-data/addApiKey.jpg)
196196
![API key](https://storage.googleapis.com/nfl-player-data/generatePersonalToken.jpg)
197197
![API key](https://storage.googleapis.com/nfl-player-data/generate.jpg)
198198
![API key](https://storage.googleapis.com/nfl-player-data/copyPersonalToken.jpg)
199+
- Create a Content Delivery / Preview API key and copy down the `Content Delivery API - access token` value
200+
![API key settings](https://storage.googleapis.com/nfl-player-data/apiKeySettings.jpg)
201+
![add Content Delivery / Preview API API key](https://storage.googleapis.com/nfl-player-data/content-delivery-step-1-min.jpg)
202+
![Copy](https://storage.googleapis.com/nfl-player-data/content-delivery-step-2-min.jpg)
199203
- Now, go back to Vercel go to your project settings
200204
![project settings](https://storage.googleapis.com/nfl-player-data/projectSettings.jpg)
201205
- Go to the environment variables section
202206
![environment variables](https://storage.googleapis.com/nfl-player-data/envVariables.jpg)
203207
- Add the values using the following names
204208
- name: `VITE_CONTENTFUL_SPACE` value: `Space ID (from contentful)`
205209
- name: `VITE_CONTENTFUL_ACCESS_TOKEN` value: `Content Management API - access token (from contentful)`
210+
- name: `VITE_CONTENTFUL_CLIENT_ACCESS_TOKEN` value: `Content Delivery API - access token (from contentful)`
206211
![contentful space](https://storage.googleapis.com/nfl-player-data/contentfulSpace.jpg)
207212
![contentful API token](https://storage.googleapis.com/nfl-player-data/contentfulAPIKey.jpg)
213+
![contentful delivery API token](https://storage.googleapis.com/nfl-player-data/vercel%20step%203-min.jpg)
208214
- Go back to GitHub and scroll back up to the top of `/src/lib/utils/leagueInfo.js`
209215
- Click the edit button and set `enableBlog` to true
210216
- Scroll down and click `Commit changes`
@@ -236,6 +242,7 @@ Generate a custom league page for your Sleeper fantasy football league in just a
236242
## V. Wrapping up
237243

238244
- That's it. You've built out your own league website!
245+
- If you want to replace the league page logo with your league's own logo, replece `static/badge.png` with your own 120px x 120px png file (using the same name)
239246
- If you want to delve further, you can also edit your league constitution page `/src/routes/constitution/index.svelte`
240247
- This page is primarily HTML, so you can edit this in a similar way to how you edited the homepage
241248
- If you and your league like League Page, please consider <b><a href="https://www.buymeacoffee.com/nmelhado" target="_blank">donating</a></b> (and encouraging your league-mates to too!)

0 commit comments

Comments
 (0)