This is the source for iteam.se -- a headless Ghost with a Sapper frontend.
There are two different types of content in Ghost, pages and posts.
All posts are fetched and listed on the front page. Blog posts, customer cases and job postings are examples of such posts. There are also pages on the website that list only posts having a specific tag, such as the blog page that only lists blog posts!
- Blog:
Blogg
- Customer case:
Case
- Job posting:
Jobb
Pages are used for content that is only supposed to show up on a specific page. One use case is coworkers - each coworker is added as a page and tagged accordingly.
- Coworker:
Medarbetare
There is a dev environment setup on https://iteam-se.iteamdev.io and if you just pull this repo and run the sapper web, your local instance is already configured to pull content from it. You will require nvm
for this step.
cd sapper
nvm use # or nvm install
npm ci
npm run dev
# Now open http://localhost:3000
For this you will need to have docker
and docker-compose
installed.
Create a file called .env
in ./sapper
and paste the following:
GHOST_URL=http://localhost:2368
GHOST_KEY=
- Get ghost and mariadb running with
docker-compose up
- Open http://localhost:2368/ghost
- Follow the steps there to setup your account
- Open http://localhost:2368/ghost/#/settings/integrations
- Click "Add custom integration"
- After creating the integration, copy the "Content API Key"
- Paste the key after GHOST_KEY= into
./sapper/.env
cd ./sapper
npm ci
npm run dev
- Open http://localhost:3000
To deploy on the K8s cluster. Connect the VPN and then run:
skaffold run
Use kubens iteam-se
to explore the stack. You can also run skaffold run --tail
to see the logs of the deployment.