Skip to content

Commit f7afd2a

Browse files
committed
final feedback implementation (switched to google sheets based management)
1 parent 720ee85 commit f7afd2a

29 files changed

+703
-220
lines changed

GOOGLE_SHEETS_MIGRATION.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Google Sheets Migration - Next Steps
2+
3+
## What We've Done
4+
5+
1. **Created conversion script** (`scripts/convert-team-to-tsv.js`)
6+
- Converts team.json to TSV format
7+
- Creates two files: `team_current.tsv` and `team_alumni.tsv`
8+
- Professional career format: `"period | position || period | position"`
9+
- Education format: `"period | degree || period | degree"`
10+
11+
2. **Installed and configured astro-sheet-loader**
12+
- Added to package.json
13+
- Configured in `src/content/config.ts`
14+
- Points to sheet ID: `1Mjn0C3gjSr5Wl2ZG41X813LLhL-y47DvLeEUCmagTe8`
15+
16+
3. **Updated code to use Google Sheets**
17+
- Modified `team.astro` to use sheet collections
18+
- Modified `person/[slug].astro` for dynamic routes
19+
- Created `team-utils.ts` to parse career/education strings
20+
21+
## Next Steps for You
22+
23+
1. **Import data into Google Sheets**
24+
- Open your Google Sheet
25+
- Create two sheets: one for current team, one for alumni
26+
- Import `scripts/team_current.tsv` into the first sheet
27+
- Import `scripts/team_alumni.tsv` into the second sheet
28+
- Ensure headers match exactly (case-sensitive)
29+
30+
2. **Verify sheet settings**
31+
- Make sure the Google Sheet is publicly viewable
32+
- First sheet (gid=0) should contain current team members
33+
- Second sheet (gid=1) should contain alumni
34+
35+
3. **Test the site**
36+
- Run `pnpm dev` to test locally
37+
- Check that team page loads correctly
38+
- Verify individual team member pages work
39+
40+
4. **Clean up**
41+
- Once verified, remove `src/content/team/team.json`
42+
- Delete the conversion script if no longer needed
43+
44+
## Important Notes
45+
46+
- Team members can now update their info directly in Google Sheets
47+
- Changes will be reflected on the next build
48+
- Professional career and education use delimiter format (see above)
49+
- Keep sensitive data handling in mind if adding new fields

README.md

Lines changed: 74 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -44,100 +44,95 @@ src/
4444
pnpm install
4545
```
4646

47-
3. Start the development server:
47+
3. Set up environment variables:
48+
```bash
49+
# Create .env file
50+
echo "GH_TOKEN=your_github_personal_access_token" > .env
51+
```
52+
The `GH_TOKEN` is required for fetching GitHub team data. [Create a token here](https://github.com/settings/tokens).
53+
54+
4. Start the development server:
4855
```bash
4956
pnpm dev
5057
```
5158

52-
4. Open [http://localhost:4321](http://localhost:4321) in your browser.
59+
5. Open [http://localhost:4321](http://localhost:4321) in your browser.
5360

5461
## Content Management
5562

63+
Content is managed through Google Sheets, allowing non-technical team members to easily update information without code changes.
64+
65+
**Google Sheets Document**: [https://docs.google.com/spreadsheets/d/1Mjn0C3gjSr5Wl2ZG41X813LLhL-y47DvLeEUCmagTe8](https://docs.google.com/spreadsheets/d/1Mjn0C3gjSr5Wl2ZG41X813LLhL-y47DvLeEUCmagTe8)
66+
5667
### Team Members
5768

58-
Team member information is stored in `src/content/team/team.json`. To add or update team members, edit this file.
69+
Team information is managed in two sheets:
70+
- **current**: Current team members
71+
- **alumni**: Former team members
72+
73+
#### Professional Career & Education Format
74+
- **Professional Career**: Multiple entries separated by `" || "`, each entry format: `"period | position"`
75+
- Example: `"2024-present | Head of Research, EMBL-EBI || 2018-present | Professor at Heidelberg University"`
76+
- **Education**: Multiple entries separated by `" || "`, each entry format: `"period | degree"`
77+
- Example: `"2002-2007 | PhD in Process Engineering || 2000-2001 | Exchange student"`
5978

6079
### Publications
6180

62-
Publication are automatically downloaded from Pubmed.
81+
Publications are automatically fetched from PubMed using ORCID.
6382

6483
### Software
6584

66-
Software tool information is stored in `src/content/software/software.json`. To add or update software tools, edit this file.
67-
68-
### Partners
69-
70-
Partner information is stored in `src/content/partners/partners.json`. To add or update partner information, edit this file.
71-
72-
## Content Schemas
73-
74-
### Team Schema (`src/content/team/team.json`)
75-
```json
76-
{
77-
"current": [
78-
{
79-
"name": "string",
80-
"role": "string",
81-
"description": "string",
82-
"research_interests": "string",
83-
"professional_career": [
84-
{
85-
"period": "string",
86-
"position": "string"
87-
}
88-
],
89-
"education": [
90-
{
91-
"period": "string",
92-
"degree": "string",
93-
"institution": "string"
94-
}
95-
],
96-
"image": "string"
97-
}
98-
],
99-
"alumni": [
100-
{
101-
"name": "string",
102-
"role": "string",
103-
"description": "string",
104-
"current_position": "string"
105-
}
106-
]
107-
}
108-
```
109-
110-
### Software Schema (`src/content/software/software.json`)
111-
```json
112-
[
113-
{
114-
"name": "string",
115-
"short_description": "string",
116-
"long_description": "string",
117-
"code_repository": "string",
118-
"website": "string",
119-
"publication": "string",
120-
"image": "string",
121-
"categories": {
122-
"featured": "boolean",
123-
"tool": "boolean",
124-
"database": "boolean"
125-
}
126-
}
127-
]
128-
```
129-
130-
### Partners Schema (`src/content/partners/partners.json`)
131-
```json
132-
{
133-
"collaborators": [
134-
{
135-
"name": "string",
136-
"institution": "string"
137-
}
138-
]
139-
}
140-
```
85+
Software tools are managed in the **software** sheet. Categories should be comma-separated values (e.g., `"featured, tool"` or `"database, tool"`).
86+
87+
### Home Page Content
88+
89+
The home page content is managed through MDX files in `src/content/home_page/`:
90+
91+
- **`mission.mdx`**: The lab's mission statement displayed on the home page
92+
- **`research.mdx`**: Research areas and focus topics
93+
- **`locations.mdx`**: Lab locations and contact information
94+
95+
These files support full MDX syntax, allowing you to use React components and Markdown together. To edit, simply modify the MDX files directly.
96+
97+
### Navigation
98+
99+
The main navigation menu is configured in `src/config/navigation.ts`. To add, remove, or reorder menu items, edit this file.
100+
101+
## Google Sheets Schemas
102+
103+
### Current Team Members Sheet
104+
| Column | Description | Example |
105+
|--------|-------------|---------|
106+
| name | Full name | "Julio Saez-Rodriguez" |
107+
| role | Position/title | "Group Leader" |
108+
| description | Bio/description | "Brief biography..." |
109+
| research_interests | Research focus areas | "Systems biology..." |
110+
| professional_career | Career history (see format above) | "2024-present \| Head..." |
111+
| education | Education history (see format above) | "2002-2007 \| PhD..." |
112+
| email | Email address | "[email protected]" |
113+
| telephone | Phone number | "+49 123 456789" |
114+
| orcid | ORCID identifier | "0000-0002-8552-8976" |
115+
| image | Image filename | "person-name.jpg" |
116+
117+
### Alumni Sheet
118+
| Column | Description | Example |
119+
|--------|-------------|---------|
120+
| name | Full name | "John Doe" |
121+
| position | Position held | "Postdoc" |
122+
| duration | Time period | "2018-2024" |
123+
| linkedin | LinkedIn profile URL | "https://linkedin.com/in/..." |
124+
125+
### Software Sheet
126+
| Column | Description | Example |
127+
|--------|-------------|---------|
128+
| name | Software name | "BioCypher" |
129+
| short_description | Brief description | "A framework for..." |
130+
| long_description | Detailed description | "Extended description..." |
131+
| code_repository | GitHub/GitLab URL | "https://github.com/..." |
132+
| website | Project website | "https://biocypher.org" |
133+
| publication | Publication URL | "https://doi.org/..." |
134+
| image | Image filename | "biocypher.png" |
135+
| categories | Comma-separated categories | "featured, tool" |
141136

142137
## Building for Production
143138

File renamed without changes.

0 commit comments

Comments
 (0)