Skip to main content

Src Folder

The src/ folder contains all source code for custom React components, styles, pages, and theme files used in the RMC Software Documentation project.


Components

Contains all custom React components used throughout the documentation site.
Examples include:

  • Bibliography.js
  • Citation.js
  • CitationFootnote.js
  • DocumentMetadata.js
  • Equation.js
  • Figure.js
  • NavContainer.js
  • TableAcronyms.js
  • ...and more

Additional details for React components can be found in the React Components section of this guide.

danger

Do not create, modify, or delete any components in this folder. Contact a site administrator if you need to create or modify a component.


Contexts

Contains React context files for state management and sharing data (such as ReportIdContext.js).


CSS

The RMC Software Documentation site primarily uses Tailwind CSS for styling. Styling for individual pages and React components is specified using inline utility classes.

tip

This Tailwind CSS Cheat Sheet provides useful mapping between Vanilla CSS classes and their Tailwind CSS counter-utility classes

There are some instances where global CSS files are more efficient, such as styles that are applied sitewide or affect multiple components. This folder houses those global style sheets.

  • custom.css: Contains global styles for the entire site.
  • equation.css: Contains global styles for equations.
  • tables.css: Contains global styles for tables.
danger

Do not create, modify, or delete the styling for the website or React components. Contact a site administrator to request changes.


Data

This folder holds a JSON file generated during the site build process for the RMC Typical Event Tree Database document.

Pages

Custom web pages such as the website home page, hubs, sub-hubs, and index pages.

These pages serve as entry points for different sections of the documentation site.

  • index.js: The home page for the RMC Software Documentation website.
  • Other pages correspond to specific hubs or sub-hubs, providing navigation and content organization.
info

These pages will continue to grow, and new pages will be added, as the site expands.


Theme

Custom theme-related files for Docusaurus, allowing you to override or extend the default theme.

Two themes have been overridden to provide custom functionality:

  • DocItem: This theme is used to apply a 'DRAFT' watermark to documentation pages marked as draft.
  • SearchBar: This theme is used to apply a custom search bar component that integrates with Algolia search.

draftDocs.js

Aggregates all document entries from each navigation/category file and exports an array (draftDocs) containing the base paths of all documents marked as draft: true.

Used by DocItem theme component to determine if a documentation page should display a DRAFT watermark.


reportIdMap.js

This auto-generated file exports a mapping of documentation base paths (including version) to unique report IDs.

danger

Do not edit this file manually; it is regenerated as needed by scripts.


For more details on available React components and their usage, see the React Components section of the Documentation Guide.