Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ“˜ Read.me – Adding content to improve F5 clarity, and project structure details #2248

Merged
merged 9 commits into from
Sep 26, 2024
88 changes: 64 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,80 @@
# Tina.io website
### Hi Legends πŸ‘‹
# <p align="center">Tina.io – the Website for [TinaCMS](https://github.com/tinacms/tinacms)</p>

Source code for the tina.io website, including the TinaCMS documentation and blog.

Source code for the [tina.io](https://tina.io) website.
Found a bug? Create a PBI and we'll look into it.

## Development

```
## 🧿 Vision

Make a wesbite to communicate the awesomeness of TinaCMS.

## πŸ› οΈ Tech Stack

Static web application built with...

- [React](https://reactjs.org/)
- [Next.js](https://nextjs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS](https://tailwindcss.com/)

- and of course... [TinaCMS](https://github.com/tinacms/tinacms)! πŸ¦™

Hosting and deployment...

- GitHub and [Vercel](https://vercel.com/)

<br>

## πŸ› οΈ Dependency Installation + Setup

We're using [pnpm](https://pnpm.io/) as the package manager for node.

```bash
cp .env.example .env
pnpm i
```

**Note**: Python is required for gyp – install [python](https://www.python.org/downloads/) and if necessary (newer python versions) the [setup tools](https://stackoverflow.com/a/77638742).

<br>

## πŸ§‘πŸ»β€πŸ’» Running the Project
```bash
pnpm dev
```
This will spin up the react/Next project locally, running on [localhost:3000](http://localhost:3000) (react app) and [localhost:4001](http://localhost:4001/graphql) (playground for testing graphql against the Tina datalayer).

## Vision
Make a wesbite to communicate the awesomeness of TinaCMS
<br>

## Tech Stack
- NextJS
- TinaCMS
- GitHub
- Markdown
## πŸ“œ Contribution Expectations

We welcome contributions to improve the Tina.io experience!

### Testing Local TinaCMS Changes
1. **Fork the Repo**: Work on your own fork to avoid conflicts.
1. **Branching**: Use `feature/your-feature-name` or `bugfix/your-bugfix-name` for changes.
1. **Using TinaCMS**: For content changes (e.g., docs), use visual editing with TinaCMS locally (e.g., http://localhost:3000/admin).
1. **Commits**: Write clear, descriptive messages. Break large changes into multiple commits.
1. **Code Quality**:
- Use Tailwind over inline CSS or styled components.
- Follow DRY principles and refactor reusable code.
- Comment on calculations or workarounds, and open issues for any technical debt.
1. **Pull Requests**:
- Reference related issues and include screenshots for UI changes.
- If no issue exists, create one and link it.
- Commit the generated `tina-lock.json` file, and rerun the project locally after merging to update it.
1. **Review Process**:
- Due to Vercel deployment issues, maintainers will recreate your changes on a new branch to test before approval.

If you have the **tinacms** repository cloned locally you can use it when running **tina.io**:
isaaclombardssw marked this conversation as resolved.
Show resolved Hide resolved
Cheers! πŸ¦™

```
TINA=../path/to/tinacms pnpm dev
```
## Not Familiar with Tina?

You can also specify which packages you want to watch:
We've put together a simple explanation of the project directory – in [_docs/Directory-Structure](_docs/Directory-Structure.md).

```
TINA=../path/to/tinacms TINA_WATCH=@tinacms/forms,react-tinacms-inline
```
This should give you an idea of how it all fits into the project.

Additionally, the Tina [docs](https://tina.io/docs/) contains the usage details for development with Tina.

> ### Warning
>
> This will only work for packages loaded by webpack. That means that environments which don't use
> webpack (i.e. SSR builds) will not use this alias.
<br>
22 changes: 22 additions & 0 deletions _docs/Definition-of-Done.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Definition Of Done

An issue in this repository can be closed (considered done) for...

### Code + Content Changes

1. Code compiles and change makes sense for the issue. All issue tasks have been ticked.
isaaclombardssw marked this conversation as resolved.
Show resolved Hide resolved
1. When the latest commit has been manually tested against a preview deployment.
1. When the code has been reviewed by a project maintainer.
isaaclombardssw marked this conversation as resolved.
Show resolved Hide resolved

1. Code has been deployed to production.
1. Any bugs or technical debt that arise from the issue have been logged in a PBI that links to this code change.
1. Issue had been closed with a closing comment added describing solution or linking changed pages.
isaaclombardssw marked this conversation as resolved.
Show resolved Hide resolved


### Other Tasks

1. All issue tasks have been ticked.

1. PO has signed off on the task.
1. Issue had been closed with a closing comment added describing solution or last status.
1. Done email has been sent (if required).
10 changes: 10 additions & 0 deletions _docs/Definition-of-Ready.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Definition Of Ready

Prior to being actioned, an issue in this repository should at minimum contain...

- Enough detail for the team (or future teams) to action
- Effort assigned (we use the [SSW recomendation](https://www.ssw.com.au/rules/estimating-do-you-know-how-to-size-user-stories-effectively/) for business and effort value estimates).

...possible efforts are 0, 1, 2, 4, 8, 16 with each point of effort corresponding to a quarter day (~2 hours). Larger tasks should be done over multiple PBIs.
- We're not using business values for this project.
- Assigned to `backlog ready` with PO approval.
50 changes: 50 additions & 0 deletions _docs/Directory-Structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# πŸ—οΈ Directory Structure

Last updated: 26/09/2024

```
.
β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ DocumentNavigation/
β”‚ β”‚ └── ... various navigation menu components for the docs
β”‚ β”œβ”€β”€ layout/
β”‚ β”‚ └── ... wrappers for site pages
β”‚ β”œβ”€β”€ blocks/
β”‚ β”‚ β”œβ”€β”€ ... Tina block-editing components and schemas
β”‚ β”‚ └── ... πŸ¦™ https://tina.io/docs/editing/blocks/ πŸ¦™
β”‚ β”œβ”€β”€ tinaMarkdownComponents/
β”‚ β”‚ β”œβ”€β”€ ... Rich-Text styling and embedded components
β”‚ β”‚ └── ... πŸ¦™ https://tina.io/docs/editing/markdown/ πŸ¦™
β”‚ β”œβ”€β”€ toc/
β”‚ β”‚ β”œβ”€β”€ ... contains docs table of contents (toc) schema
β”‚ β”‚ └── ... generated toc component from doc headings
β”‚ β”œβ”€β”€ ui/
β”‚ β”‚ └── ... re-usable utility components
β”‚ β”œβ”€β”€ styles/
β”‚ β”‚ └── ... mix of styling code, TODO: standardise this
β”‚ └── βž•
β”œβ”€β”€ content/
β”‚ └── ... πŸ¦™ πŸ¦™ πŸ¦™ (tina-managed site content)
β”œβ”€β”€ data-api/ and indices/
β”‚ └── ... related to algolia and content searching
β”œβ”€β”€ pages/
β”‚ └── ... πŸ–₯️ nextjs page router πŸ–₯️
β”œβ”€β”€ public/
β”‚ └── ... assets
β”œβ”€β”€ rss/
β”‚ └── ... rss generation (SEO or other reasons)
β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ content-auditor/
β”‚ β”‚ β”œβ”€β”€ ... local AI audit script for /content
β”‚ β”‚ └── ... πŸ¦™ https://ollama.com/ - unafilliated llama related software πŸ¦™
β”‚ └── βž•
β”œβ”€β”€ styles/ (tailwind config)
β”œβ”€β”€ tina/
β”‚ β”œβ”€β”€ collectionsSchema/
β”‚ β”‚ β”œβ”€β”€ ... Tina schema definitions (other than block templates)
β”‚ β”‚ └── ... πŸ¦™ https://tina.io/docs/reference/schema/ πŸ¦™
β”‚ └── βž•
β”œβ”€β”€ utils/
β”‚ └── ... function definitions
└── ... project config
```
2 changes: 1 addition & 1 deletion components/DocumentationNavigation/DocsHeaderNav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import data from '../../content/docs-navigation.json'
import { LinkButton } from '../ui'
import { DynamicLink } from '../ui/DynamicLink'
import data from '../../content/docs-navigation.json'

export const DocsHeaderNav = () => {
return (
Expand Down
Loading