Using GitHub
Small changes on github.com, and how Switchboard and GitHub keep each other in sync.
Did you choose to keep your website on GitHub too when you created it? Then GitHub has a private copy of all your files. Only you (and whoever you invite) can see it.
#How they work together
Switchboard and GitHub keep each other up to date automatically, in both directions:
Your computer ──"publish it"──→ Switchboard ──copy──→ GitHub
↑ │
└────── change ────────┘
on github.com- When you publish from your computer, we put the same version on GitHub.
- When you change something on github.com, we fetch it and publish it automatically.
Your computer only ever talks to Switchboard. So you don't need a GitHub password in your terminal.
#Editing text on github.com
Handy for a quick typo, when you don't have a computer with your AI at hand.
- Open your website on GitHub. In the dashboard your website has a link to GitHub.
- Open the file with the texts. All the texts of your website are in one file:
src/lib/content.ts. If your website has afrontendfolder, it'sfrontend/src/lib/content.ts. Click the folders and then the file to open it. - Click the pencil (Edit this file) at the top right.
- Change the text. Only change text between quotes (
'…'or"…") and leave the quotes themselves alone. Need a'in your text (as in we're)? Type’(a curly apostrophe) instead, otherwise the file gets confused. - Click Commit changes, type a short description and click Commit changes again.
- Wait a few minutes. Switchboard publishes the change automatically. You'll see it under Publishes.
#"Changes were made elsewhere"
Did you change something on GitHub and on your computer at the same time, without fetching the latest version first? Then the two versions can clash. You'll see a message like:
Changes were just made elsewhere.or:
Changes were made elsewhere (for example on another computer or on GitHub),
so your changes were not saved yet.Don't worry: nothing is lost. Tell your AI: "Fetch the latest version, merge the changes and publish again."
If a clashing change comes from GitHub, we don't publish it automatically. The dashboard shows a notice with an explanation.
#Letting someone else help
On GitHub you can invite a developer or colleague: open your project on GitHub and go to Settings → Collaborators. Whatever they change on GitHub, we publish automatically.