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

Initialize collections #33

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Initialize collections #33

merged 4 commits into from
Mar 11, 2024

Conversation

hetd54
Copy link
Collaborator

@hetd54 hetd54 commented Feb 27, 2024

We probably want to talk about this more, but I req a review so that you can take a look at the structure.

Question for reviewers: Do we want to allow editing of general page content (like a lede and header image, for example)?

To test locally:

Open a terminal and run

npx @staticcms/proxy-server

In a separate terminal, run

npm run start

Go to http://localhost:4321/admin/index.html

@hetd54 hetd54 marked this pull request as ready for review February 27, 2024 22:12
@broarr
Copy link

broarr commented Feb 28, 2024

Question for reviewers: Do we want to allow editing of general page content (like a lede and header image, for example)?

That's an interesting question! My initial thought was no, we probably only want admins to edit the text. I think lede can be the first sentence ellipsized. I'm thinking that header images should be static, but I don't hold strong convictions here. @galenwinsor what do you think?

Copy link

@broarr broarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! How does the i18n work for static cms?

Users of our site would like to set up everything in english and then hire translators for various locales. StaticCMS requires a minimum of two locales to be declared in the i18n section of the config, so english-only would not be an option; additionally, setting any field as "i18n: true" REQUIRES translation. Removing these field declarations maintains the folder structure we need.
Copy link

github-actions bot commented Mar 4, 2024

Visit the preview URL for this PR (updated for commit 12d948f):

https://mmp-site-b1c9b--pr33-cms-collections-u3khwezm.web.app

(expires Mon, 18 Mar 2024 14:59:51 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4eb870c89e876f1812e204af417359065d2a23b1

@hetd54
Copy link
Collaborator Author

hetd54 commented Mar 4, 2024

It's easy to add/remove locales at the top of the config file:
Screenshot 2024-02-29 at 10 25 01 AM

Per collection we specify where the locale folders go:
Screenshot 2024-02-29 at 10 24 02 AM

Important: if at the field level i18n is set to true, it MUST be translated before the post can be published. We will need to go back later to set which fields to be translated.

@hetd54 hetd54 merged commit d164d12 into main Mar 11, 2024
2 checks passed
@hetd54 hetd54 deleted the cms-collections branch March 11, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants