如何设置 baseUrl(也适用于 apostrophe-multisite)

How to set baseUrl (also for apostrophe-multisite)

我正在使用多站点模块处理撇号项目,并且由于 运行 和 npm update _urls 页面以 /baseUrl-not-set 开头。我只能在文档中找到这个:

baseUrl (GLOBAL OPTION, NOT SET FOR THIS SPECIFIC MODULE) As a convenience, req.absoluteUrl is set to the absolute URL of the current request. If the baseUrl option at the top level, not for this specific module is set to a string such as http:://mysite.com, any site-wide prefix and req.url are appended to that. Otherwise the absolute URL is constructed based on the browser's request. Setting the baseUrl global option is necessary for reasonable URLs when generating markup from a command line task.

source

所以,我不确定 baseUrl 属性 是否会添加到 app.js(记住这是一个多站点项目,因此它需要是动态的) ,或 apostrophe-globa/index.js 作为模块的根级别 属性,或在 addFields 下(所有这些我都尝试过,但无济于事)。

所以基本上自 npm updating 以来,我所有 URL 的 URL 结构目前已损坏,目前我无法进行任何部署。

在此非常感谢您的指导。

抱歉,这一天没有记录,说明现在是模块自述文件的一部分

https://github.com/apostrophecms/apostrophe-multisite/blob/master/README.md#setting-baseurl-and-naming-environments