-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make package listing suffix configurable and the URL configurable #29
base: main
Are you sure you want to change the base?
Conversation
The previous implementation meant it wasnt allowed to be set
private string _currentListingUrl; | ||
[Parameter("Path to existing index.json file, typically https://{owner}.github.io/{repo}/index.json")] | ||
string CurrentListingUrl => | ||
$"https://{GitHubActions.RepositoryOwner}.github.io/{GitHubActions.Repository.Split('/')[1]}/{PackageListingPublishFilename}"; | ||
public string CurrentListingUrl | ||
{ | ||
get => _currentListingUrl ?? | ||
$"https://{GitHubActions.RepositoryOwner}.github.io/{GitHubActions.Repository.Split('/')[1]}/{PackageListingPublishFilename}"; | ||
|
||
set => _currentListingUrl = value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just meant to be used by passing parameters to the nuke
Target call directly, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, its aadditional parameter you can see used here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, I would actually like to switch it back to being determined entirely at runtime, but I cant seem to find a way currently to get the actual domain setup of the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about just keeping it simple and grabbing the location in the javascript and tacking index.json to the end?
const packageUrl = `${window.location.host}${window.locationpathname}/index.json`;
not the most elegant but would probably get the job done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, i see the listing url is needed at build time after the first deployment now
ive been using this in prod for like, over a year now |
This allows adding a suffix to the package listing, and allows setting the listing url directly instead of it being generated from the repository name, which allows for custom domains to be used