Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
// "Use the profile form" box for the documentation guides (forms.profile in src/data/site.ts).
// "Use the … form" box for the documentation guides (forms in src/data/site.ts).
import Button from "./ui/Button.astro";
import Icon from "./ui/Icon.astro";
import Todo from "./ui/Todo.astro";
import { forms, site } from "../data/site";

interface Props {
form: keyof typeof forms;
}

const copy = {
profile: { name: "profile form", text: "Add or update your profile, photo and projects with one form.", repo: "marc_people" },
news: { name: "news form", text: "Send a news article or a vacancy, with photos, or correct a published article.", repo: "marc_news" },
} satisfies Record<keyof typeof forms, { name: string; text: string; repo: string }>;

const { form } = Astro.props;
const href = forms[form];
const { name, text, repo } = copy[form];
const linkSubject = `${name[0].toUpperCase()}${name.slice(1)} link`;
---

<div class="form-link surface-tonal not-prose">
Expand All @@ -12,12 +26,12 @@ import { forms, site } from "../data/site";
<p class="form-link__title">No GitHub account needed</p>
<p class="mt-1 text-[0.9375rem]">
{
forms.profile ? (
"Add or update your profile, photo and projects with one form."
href ? (
text
) : (
<>
Ask the MARC website maintainers for the profile form link at{" "}
<a href={`mailto:${site.email}?subject=${encodeURIComponent("Profile form link")}`} class="text-primary underline">
Ask the MARC website maintainers for the {name} link at{" "}
<a href={`mailto:${site.email}?subject=${encodeURIComponent(linkSubject)}`} class="text-primary underline">
{site.email}
</a>
.
Expand All @@ -27,14 +41,14 @@ import { forms, site } from "../data/site";
</p>
</div>
{
forms.profile && (
<Button href={forms.profile} external icon="material-symbols:arrow-outward">
Open the profile form
href && (
<Button href={href} external icon="material-symbols:arrow-outward">
Open the {name}
</Button>
)
}
</div>
{!forms.profile && <Todo>Set forms.profile in src/data/site.ts to the form's share link (marc_people/google-form/README.md, step 7).</Todo>}
{!href && <Todo>Set forms.{form} in src/data/site.ts to the form's share link ({repo}/google-form/README.md, step 7).</Todo>}

<style>
.form-link {
Expand Down
7 changes: 4 additions & 3 deletions src/data/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,17 @@ export const contentRepos = {
website: "https://github.com/pdnMARC/pdnmarc.github.io",
};

// Google Forms used by the documentation. Set `profile` to the form's share link once it exists
// (marc_people/google-form/README.md, step 7); until then the guides ask people to contact MARC.
// Google Forms used by the documentation. Set each to the form's share link once it exists
// (google-form/README.md in marc_people and marc_news, step 7); until then the guides ask people to contact MARC.
export const forms = {
profile: "https://docs.google.com/forms/d/e/1FAIpQLSeXOCqNmVEKqgairmF4IRnbU388iqUDekWeDIOYbHRi7tNWUQ/viewform" as string | null,
news: "https://docs.google.com/forms/d/e/1FAIpQLScvU6iml7GpjHgCVHt69B5Dmy6BzSSkxaXH4P5hNbVqnMyAIQ/viewform" as string | null,
};

export const docs = [
{ href: "/docs/profiles/", label: "People profiles", icon: "material-symbols:person-outline", text: "Use the profile form, or edit on GitHub: photo, role, biography and links." },
{ href: "/docs/projects/", label: "Projects", icon: "material-symbols:science-outline", text: "Add a project, its team, cover image and description." },
{ href: "/docs/news/", label: "News & vacancies", icon: "material-symbols:newspaper", text: "Post a news article, a vacancy with a deadline, or a social feed item." },
{ href: "/docs/news/", label: "News & vacancies", icon: "material-symbols:newspaper", text: "Use the news form, or post on GitHub: articles, vacancies with a deadline, social feed items." },
{ href: "/docs/publications/", label: "Publications", icon: "material-symbols:menu-book-outline", text: "Add papers to the publications sheet and link them to projects and people." },
{ href: "/docs/site/", label: "Site pages", icon: "material-symbols:web", text: "For website maintainers: home photos, research areas, highlights and contact details." },
];
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { docs, contentRepos, site } from "../../data/site";
const where = [
{ what: "People profiles", place: "Profile form, or marc_people repository, profiles/ folder", href: contentRepos.people, guide: "/docs/profiles/" },
{ what: "Projects", place: "marc_projects repository, projects/ folder", href: contentRepos.projects, guide: "/docs/projects/" },
{ what: "News articles and vacancies", place: "marc_news repository, articles/ folder", href: contentRepos.news, guide: "/docs/news/" },
{ what: "News articles and vacancies", place: "News form, or marc_news repository, articles/ folder", href: contentRepos.news, guide: "/docs/news/" },
{ what: "Social feed items", place: "Website data Google Sheet, News tab", guide: "/docs/news/#social-feed-items" },
{ what: "Publications", place: "MARC Publications Google Sheet, one tab per project", guide: "/docs/publications/" },
{ what: "Home photos, research areas, highlights, contact details", place: "Website repository", href: contentRepos.website, guide: "/docs/site/" },
Expand Down
23 changes: 23 additions & 0 deletions src/pages/docs/news.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,37 @@ description: Post a news article, a vacancy with an application deadline, or a s
---

import Callout from "../../components/ui/Callout.astro";
import FormLink from "../../components/FormLink.astro";

The News page has two parts:

- **News articles**: full stories with their own page, written in Markdown in the
[marc_news repository](https://github.com/pdnMARC/marc_news). Vacancies are news articles too.
Send them with the **news form** (no GitHub account needed) or add them on GitHub.
- **Social feed items**: short entries that link out to a Facebook, LinkedIn or web post, added as rows
in the website data Google Sheet.

## Use the news form

<FormLink form="news" />

- **New article:** give the title, the date, a one- or two-sentence summary and the full text. Each line
of the text becomes a paragraph, and lines starting with `-` become a list.
- **Photos:** a cover photo, and optionally more photos shown under the article, with one line in
*Descriptions of the other photos* for each, in the same order. Photos are resized and their camera
and location data removed. Only send photos MARC may publish, with the agreement of anyone recognisable
in them.
- **Vacancy:** answer *Yes* and give the deadline and an application link or email address.
- **Correcting a published article:** choose *Change a published article*, paste the article's link from
the website, and fill in only what should change. New text replaces the whole text (the photos are
kept), so paste the full corrected version. The article's address never changes.

Every night at midnight (Sri Lanka time) your answers become a change request. It goes live once a MARC
maintainer approves it. If something can't be used, for example a link that doesn't match an article,
a maintainer will be in touch.

The rest of this guide is for adding articles on GitHub, and explains what each field means.

```text
marc_news/
└── articles/
Expand Down
4 changes: 2 additions & 2 deletions src/pages/docs/profiles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: Add yourself to the People page, or update your photo, role and bio
---

import Callout from "../../components/ui/Callout.astro";
import ProfileFormLink from "../../components/ProfileFormLink.astro";
import FormLink from "../../components/FormLink.astro";

Each person at MARC keeps their own profile up to date, either with the **profile form** (no GitHub
account needed) or by editing it on GitHub.

## Use the profile form

<ProfileFormLink />
<FormLink form="profile" />

The form adds a new profile or updates yours, and keeps every link intact:

Expand Down
21 changes: 12 additions & 9 deletions src/pages/docs/site.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,26 @@ A few values here point at content in the other repositories and must match it e

</Callout>

## Profile form
## Google Forms

MARC members can add or update their profile with a Google Form instead of GitHub. Every night at 00:00
Sri Lanka time, the **Profile Form Sync** workflow in marc_people and in marc_projects reads the form's
response sheet and opens pull requests:
MARC members can send profiles and news with Google Forms instead of GitHub. Every night at 00:00
Sri Lanka time, a workflow reads each form's response sheet and opens pull requests:

- in **marc_people**, one per response, with the new or updated profile and its photo;
- in **marc_projects**, adding the person to the projects they ticked.
- **Profile form:** the **Profile Form Sync** workflow opens pull requests in **marc_people** with the
new or updated profile and its photo, and in **marc_projects** adding the person to the projects they
ticked. Secret: `GOOGLE_FORM_CSV_LINK`, in both repositories. Setup:
[marc_people/google-form](https://github.com/pdnMARC/marc_people/blob/main/google-form/README.md).
- **News form:** the **News Form Sync** workflow opens pull requests in **marc_news** with the new or
corrected article and its photos. Secret: `NEWS_FORM_CSV_LINK`. Setup:
[marc_news/google-form](https://github.com/pdnMARC/marc_news/blob/main/google-form/README.md).

Responses that can't be used become an issue instead. Each pull request lists what changed, who sent it
and the validator result, with a short review checklist. **Merge** to publish or **close** to reject;
a response is never proposed twice. To process new responses straight away, run the workflow from the
repository's **Actions** tab.

Setup (the form, sharing, the `GOOGLE_FORM_CSV_LINK` secret) and maintenance are described in
[marc_people/google-form/README.md](https://github.com/pdnMARC/marc_people/blob/main/google-form/README.md).
Once the form exists, put its share link in `forms.profile` in `src/data/site.ts` so the guides show it.
The setup guides cover the form, sharing, the secret and maintenance. Once a form exists, put its share
link in `forms.profile` or `forms.news` in `src/data/site.ts` so the guides show it.

## Where things are

Expand Down
Loading