-
Notifications
You must be signed in to change notification settings - Fork 123
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
Implement --baseUrl
option for the deploy command
#2250
Comments
baseUrl
when deploying from a git repositorybaseUrl
when deploying from a git repository
Do you mean To a GitHub repository? (GitHub pages specifically?) Asking because having a git repository does not mean you are using a hosting service where |
baseUrl
when deploying from a git repositorybaseUrl
from a git repository when deploying
Right, that wasn't clear - I meant "generating From what I can tell, the |
I see, I think we should not implement this in that case for a few reasons:
@damithc probably has a more informed opinion here as he's probably configured many more static sites. |
Compared to the effort that goes into creating the site content, the effort needed to set the baseUrl in site.json is negligible. So, this feature might not matter to serious or long-term users. But it might make a more notable difference (especially, on the 'ease of use' front) to a new user trying out a toy website to see how MarkBind works. Still, we need to compare the cost of maintaining the extra code of this feature to the benefit. |
I see, in that case we can forgo the proposed automatic I realize that we have no I'll change the issue to reflect this 👍 EDIT: To add on, when implementing the Suppose that we implement a
This is a potential use case, and doing this should not overwrite the |
baseUrl
from a git repository when deploying--baseUrl
option for the deploy command
Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
#534 and #2218
What is the area that this feature belongs to?
Author Usability, CLI
Is your feature request related to a problem? Please describe.
We can consider implementing a
--baseUrl
option for thedeploy
command (same as the--baseUrl
option for thebuild
command).We want this because a custom
baseUrl
is necessary for the GitHub and Netlify deployments to work. Here,baseUrl
must be set as the repository name, as per User Guide - Deploying the Site section.This implementation will make the deployment process with a custom
baseUrl
more straightforward.Describe the solution you'd like
There is a
--baseUrl
option available for thebuild
command.The
deploy
command currently runs thebuild
command before deploying (changes introduced in #2218), but does not have access to this feature. We can introduce this option to thedeploy
command similar to how it is done for thebuild
command.As always, suggestions for / criticisms of the idea are welcome!
Details on previous issue
Currently, when deploying a MarkBind site from a git repository, the user will runmarkbind init
(with or without--convert
as needed) to initialize the MarkBind site, and runmarkbind deploy
to generate and deploy the site to GitHub pages. However, the user must also specify thebaseUrl
property insite.json
to be the name of the git repository for the deployment to be successful without issues, as the deployment will default to an emptybaseUrl
property. This behavior is documented here as a necessary step.From a user's standpoint, if they are doing a quick deployment from a git repository to a MarkBind site, adding thebaseUrl
property is a bit of a hassle. Note that this is the same level of convenience as not needing to callmarkbind build
before deployment, since the user can simply use the--baseUrl
property, and once #2249 has been resolved, this can be done with thedeploy
command itself. Essentially, this is a non-urgent, nice-to-have feature.Hence, I would like to discuss the possibility and feasibility of extracting the name of the git repository, potentially from the directory name or from the.git
subdirectory, in order to use it as the defaultbaseUrl
if we can detect that it is a git repository.On one hand, this will be useful since:- The deployment steps will only consist ofmarkbind
commands:markbind init
and thenmarkbind deploy
(#2218 has mademarkbind build
an optional step).- User will not have to remember to specify thebaseUrl
for straightforward deployments.- Most users will likely be converting from an existing git repository to MarkBind.On the other hand, this could also be considered too much hassle compared to the benefits it offers.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: