-
Clone this Gatsby site.
git clone [email protected]:CivicActions/FE-knowledgebase.git
-
Start developing.
Navigate into your new site’s directory and start it up.
cd FE-Knowledgebase/ npm install gatsby develop
-
Open the source code and start editing!
Your site is now running at http://localhost:8000
Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.
Open the
FE-Knowledgebase
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time!
The FE Knowledge-base is a repository for our Front-End best practices and development tools. It can be viewed here: https://civicactions.github.io/FE-knowledgebase/
It is made up of:
- This github repo
- A Component Library built with PatternLab:
- Github Repo: https://github.com/CivicActions/FE-component-library
- Component Library: https://civicactions.github.io/FE-component-library/
- A Static CMS built with Strapi: https://fe-knowledgebase-cms.herokuapp.com/
- Follow the quick start steps above to run the gatsby server.
- Make changes and commit.
- Create a feature branch your commits and push to the git repo.
git push origin
. - Create a PR against the master branch from the remote branch.
- Add a description and any testing steps and tag a dev to review your PR.
We don't have review environments yet so we need to do manual reviews in the interim.
- When tagged to review a PR, checkout the branch locally
git fetch origin git checkout -b branch-name origin/branch-name
- Run
npm install
andgatsby develop
. - Review the changes in http://localhost:8000
- If things look kosher, merge the PR on github and then proceed to the Deploy section below!
The knowledge-base is currently hosted on Github pages and requires a manual deploy process.
- Checkout your local master branch and pull in the latest changes.
git checkout master git fetch origin git pull --rebase origin master
- Deploy the site by running
When you run the deploy command, the gatsby site will be compiled for production and all contents of the public folder will be moved to the repository’s gh-pages branch.
npm install npm run deploy
Content is split into a few types, there are top level pages and recipes. There are plans to also add Projects in the future.
Top level pages are high level pages about particular frontend topics, these can contain basic descriptions and links to resources. Recipes are step by step walk throughs or tutorials on how to setup or do specific tasks.
Top level pages are built as static .mdx
files. You can see these in the pages
directory. These are edited and added in this repo.
Recipes are added in a separately hosted Strapi CMS. To contribute to recipes, contact any project maintainer for a content editor account.
- Log into the CMS with your editor account: https://fe-knowledgebase-cms.herokuapp.com/
- Create a new recipe or edit any recipe and Save.
- Run through the deployment steps above to trigger a redeployment with the latest content updates.
If you need to add a field or even a whole content type to the Strapi CMS you will need to pull down a local version of the CMS from this repo: https://github.com/CivicActions/FE-knowledgebase-Strapi
After making your changes locally, submit a pull request to get them deployed to the CMS.