Skip to content

Add new siteName parameter, upgrade deps and some housekeeping#35

Merged
chenjiahan merged 1 commit intorstackjs:mainfrom
binarykitchen:feature/add_site_name
Jan 16, 2026
Merged

Add new siteName parameter, upgrade deps and some housekeeping#35
chenjiahan merged 1 commit intorstackjs:mainfrom
binarykitchen:feature/add_site_name

Conversation

@binarykitchen
Copy link
Contributor

This to address #33

jobs:
publish:
runs-on: ubuntu-latest
environment: npm
Copy link
Member

Choose a reason for hiding this comment

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

Why was the 'environment' field removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's invalid, not supported.

Copy link
Member

Choose a reason for hiding this comment

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

I’m not sure where you got this information, but this change would break our release workflow.

https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/deploy-to-environment#using-an-environment-in-a-workflow

Copy link
Member

Choose a reason for hiding this comment

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

In any case, please don’t modify our release workflow without providing some context or explanation. Without that, this PR can come across as suspicious and may raise unnecessary concerns.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

https://www.schemastore.org/github-workflow.json is not official and can be wrong.

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Sorry about that. Reverted.

src/index.ts Outdated
locale?: string;
determiner?: 'a' | 'an' | 'the' | 'auto' | '';
description?: string;
site_name?: string;
Copy link
Member

Choose a reason for hiding this comment

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

How about using camelCase instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of this code further down:

        BASIC_KEYS.forEach((key) => {
          const val = options[key];
          if (val !== undefined) {
            Object.assign(meta, getMeta(`og:${key}`, val));
          }
        });

It would require a rewrite, which I find too risky.

Copy link
Member

Choose a reason for hiding this comment

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

I still prefer to use camelCase in our public API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I will rename and rewrite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, added a small toSnakeCase function so that siteName becomes site_name

@binarykitchen binarykitchen changed the title Add new site_name parameter, upgrade deps and some housekeeping Add new siteName parameter, upgrade deps and some housekeeping Jan 16, 2026
Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! ❤️

@chenjiahan chenjiahan merged commit ca5f614 into rstackjs:main Jan 16, 2026
2 checks passed
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