This website is built using Docusaurus 2.
Follow these steps to test the site with either a local development server, or by statically generating the site.
- make sure yarn is installed
- Install packages
$ yarn
- Run a local development server
$ yarn start
- Generate static content (this is how the site is built for production)
$ yarn build
- After this you can test the local build with:
yarn serve
- After this you can test the local build with:
If you're doing development on a VM there are a few steps to take to test your changes:
- Set your firewall of your VM to allow access to port
3000
. These commands only have to be run once for the lifetime of the VM, or until you reconfigure your firewall settings.# firewall-cmd --permanent --add-port=3000/tcp
# firewall-cmd --reload
- As noted above, build and start your web server after your proposed changes are complete:
$ yarn build
$ yarn serve
- On the host machine of your VM, open a web browser and connect to the IP of your VM:
http://#.#.#.#:3000
- Note,
http
and NOThttps
, and#.#.#.#
is your VM's TCP/IP address, such as10.0.0.1
- The site is set to automatically deploy when code is pushed to the main branch
- See `.github/workflows/static.yml
- Important: prior to merging to main, run
yarn build
locally
Text and Images
- Most page data is stored in
static/data/<page-name>
- It is set up so that you can use markdown in the strings for much of the content.
- If the markdown syntax renders, it needs to be passed into the
Markdown
component (incomponents/utilities/
)
- If the markdown syntax renders, it needs to be passed into the
- It is set up so that you can use markdown in the strings for much of the content.
- files like
static/data/globa.ts
,static/data/testimonials.ts
, andstatic/data/meetings.ts
are meant to make it easier for people with limited coding experience to be able to quickly update specific and regularly changing content.- note: the
papaparse
library has been added for switching to.csv
files in the future.
- note: the
- Fat arrow notation for sections that only appear on the particular page
- These sections are organized in an exported function at the end of the file
- Large sections
- some content takes up a lot of space and may be useful elsewhere or temporary, they can be found in
src/components/content/
- Components in this directory should be self sufficient for data (but it's not necessary of course)
- some content takes up a lot of space and may be useful elsewhere or temporary, they can be found in
src/components/content
: Self-sufficient components, large page content components, temporary componentssrc/components/layout
: Headers, grids, and any other sections that organize contentsrc/components/shapes
: SVG components such as the wave bordersrc/components/ui
: Reusable components, little to no data by default, presentationalsrc/components/utilities
: Buttons, links, and other small reusable elements
- a bunch of base types are found in
typs.d.ts
- these are primarily for props. Kept minimal by design and then extended when needed (primarily with style props)
- Podman and Podman Desktop color themes are added in
tailwind.config.js
- A custom radial gradient has also been added to
tailwind.config.js
(it uses the same breakpoints as other tailwind gradients) - changes to the default styles are in
src/assets/css/main.css
in the following order:- imports
- docusaurus root colors
- docusarus component style changes
- font configuration
- default fonts are set inside
@layer base{}
inmain.css
using tailwind's @apply syntax
- Run the following command to upgrade docusaurus
yarn up @docusaurus/core@latest @docusaurus/preset-classic@latest
- note that the docusaurus site says to use
upgrade
but it's actuallyup
when using yarn - to upgrade tailwind or other packages, similarly use the command:
yarn up <package-name>
- Icon Library: Iconify
- Icones for web based icon library overview
- Iconify Intellisense vscode extension
- CSS Framework: Tailwind (see
tailwind.config.js
,assets/css/main.css
) - Code Formatting: Prettier (see
.prettierrc
,.prettierignore
) - Linting: Eslint (see
.eslintrc
,.eslintignore
) - Rendering markdown from js strings: react markdown parser
- Use the custom ` component for any markdown strings
- This component wraps the markdown parser in
<BrowserOnly>{() => <ReactMarkdown />}</BrowserOnly>
and handles the lazy loading and imports, reducing the amount of code needed on each instance.
- This component wraps the markdown parser in
- Use the custom ` component for any markdown strings
- Rendering html from wordpress: html-react-parser
- Use this to render any injected html to avoid XSS