Skip to content

cal-itp/calitp.org

Repository files navigation

calitp.org

A brief explainer website for the California Integrated Travel Project (Cal-ITP) https://calitp.org.

Deployed via Netlify Netlify Status

Development

This is a Jekyll static site. We include a Dev Container configuration to help with local testing and development.

  1. Open the repository directory in VS Code
  2. Ctrl/Cmd+Shift+P to bring up the Command Palette
  3. Start typing devcontainers to filter the command list
  4. Enter or select Rebuild and Reopen in Container to start from scratch
  5. Enter or select Reopen in Container to reopen the last devcontainer used

Once inside the devcontainer, you have the manually start the site:

  1. Ctrl/Cmd+Shift+P to bring up the Command Palette
  2. Enter Tasks: Run Task
  3. Enter or select Jekyll: Build and Serve Locally

The site is now running on http://127.0.0.1; check the VS Code Ports tab for the exact port. You may also see a notification appear indicating the port and prompting you to open it in your browser. Auto rebuild/reload will be active and will watch the site files for changes.

Analytics

Site analytics is tracked by Google Analytics, version 4. Ask an administrator to grant you access.

Resources and Press content routing

The Resources and Press sections are each a collection of items that may either (a) render their content on a calitp.org page or (b) reference an different URL.

Resources

The Resources index lists all items within the _resources folder. Jekyll generates a standard content page for each of these items, but if an item's front matter has an asset property, then the listing on the Resources index will link to whatever the value of that asset property is. Otherwise, it links to the standard Jekyll content page.

Resource pages that are generated by Jekyll for external assets are rendered with <meta name="robots" content="noindex"> to prevent search engines from indexing them, and they redirect to the URL in their asset proprty.

Adding new resources

We have a semi-automated way of handling resource requests that come in via GitHub Issues, using a Python script combined with the gh command:

gh issue view <issue num> --json body | python .github/scripts/resource-template.py

We have a GitHub Actions workflow that runs this script against all new issues and will automatically open a PR to add the requested resource, if the issue in fact appears to be a resource request and it is said to be approved. If an issue is opened initially for a resource that is not yet approved, the PR can be created automatically once the resource has been approved by going to the workflow's page and using the Run workflow button.

Press

The Press index lists all items within the _press folder. Jekyll generates a standard content page for each of these items, but if an item's front matter has an external property, then the listing on the Press index will link to whatever the value of that external property is. Otherwise, it links to the standard Jekyll content page.

Press pages that are generated by Jekyll for external articles are rendered with <meta name="robots" content="noindex"> to prevent search engines from indexing them, and they redirect to the URL in their external proprty.

License

Content (including graphics, images, video, documents, and text) in this repository is licensed under CC-BY 4.0.

The source code in this repository used to format and display the content is licensed under GPL-3.0.