If you've forked the repo and set up your own thingoftheday microblog, I'd love to share it with the world!
Find me on Twitter and say hello! 👋🏼
Contentful GraphiQL Playground:
Want to build your own thingoftheday?
Follow this quick setup guide to get started in minutes!
We're going to make some small changes to some handy files in the
./setup directory, and use the Contentful CLI to import the content model and example content provided into your own Contentful space.
Step 1: Get the code
Fork this repository to your GitHub account, and clone it to your local machine using git or the GitHub CLI.
Step 2: Get Contentful
Create your Contentful account. Sign up here.
Step 3: Get credentials
- Create a new space inside your Contentful account
- Go to Settings > General Settings and make a note of the Space ID
- Go to Settings > API keys and generate an access token for the Content Delivery API
- Add your Space ID and access token to
Step 4: Install the Contentful CLI
brew install contentful-cli
npm install -g contentful-cli
yarn global add contentful-cli
Step 5: Authenticate with the CLI
contentful login in your terminal and follow the instructions in your browser.
Step 6: Run the import
Import the content model and example post to your Contentful space.
Run the following command in your terminal, ensuring you switch out SPACE_ID for your new Space ID.
cd /path/to/repo/thingoftheday/setup contentful space import --space-id SPACE_ID --content-file contentful-export.json
The terminal will do some fancy things. If all looks good - refresh Contentful in your browser and you'll find the content model and example post has been imported for you!
Step 7: Run the application
To be able to serve the JS module to the browser, you'll need to serve the files over a local http server.
Install http-server globally, and start the development server locally by running:
cd path/to/repo npx http-server
And you're done
With your http server started, your credentials file configured, and your content model imported, you'll be able to visit your very own thingoftheday microblog in your browser - all within minutes.
Generate an RSS feed of the content by hitting the following url: