快轉到主要內容

在Mac上安裝Umbraco CMS

·597 字·2 分鐘
Y Cheung
作者
Y Cheung
Blogger, Programer & Traveler.
目錄

安裝 dotnet SDK
#

下載並安裝 .NET 6.0 SDK (v6.0.301) https://dotnet.microsoft.com/en-us/download

安裝 Visual Studio 2022 for mac
#

下載並安裝 Visual Studio 2022 for mac (v17.0) https://visualstudio.microsoft.com/vs/mac/

安裝 Umbraco 模板包
#

打開終端輸入命令: dotnet new -i Umbraco.Templates

.net Install Umbraco Template
.net Install Umbraco Template

請求信任HTTPS開發證書
#

輸入命令: dotnet dev-certs https --trust ,如果證書未被信任,在Run website的時候MAC OS 會不斷彈窗提示請求授權。

Trusting the HTTPS development certificate
Trusting the HTTPS development certificate

建立 Umbraco 項目並運行
#

打開**「File」菜單,選擇「New Project…」** 創建新項目。

Go to File > New Project …
Go to File > New Project …

在項目模板選擇清單中選擇 「Umbraco Project」 模板後,按下 「Continue」 按鈕。

Go to Web and Console > App Section, and select Umbraco Project, navigate to the next step by clicking Continue.
Go to Web and Console > App Section, and select Umbraco Project, navigate to the next step by clicking Continue.

配置項目,如無特殊需求,這裡保留默認值即可。配置完成後按下 「Continue」 按鈕。

You are able to specify some project parameters like Target framework. The rest are optional.
You are able to specify some project parameters like Target framework. The rest are optional.

繼續配置項目,設定項目名稱、存儲路徑等,然後按下 「Create」 按鈕,這樣 Umbraco 項目就創建好了。

Solution Name 不能設置為 Umbraco, 這將導致命名空間衝突(namespace conflict)。

You will be able to give your project and solution a name. Refrain from naming your solution Umbraco, as this will cause a namespace conflict with the CMS itself. You can then click the Create button and your Umbraco Project will be ready for you.

點擊 ▶️ 按鈕運行 Umbraco CMS 網站,打開瀏覽器訪問站點 https://localhost:44330/。

管理後台登陸地址:https://localhost:44330/umbraco#/login

run project
You can now run the site like you would normally in Visual Studio.

Reference
#

相關文章

Docker 內 Laravel 8 瀏覽器測試 dusk 安裝配置指南

·488 字·1 分鐘
docker-compose.yml # 本指南運行環境系 MacBook 上的 Docker 內,相關容器配置如下: 1# docker-compose.yml 2version: '3' 3services: 4 mysql: 5 image: mariadb:10.2 6 restart: always 7 volumes: 8 - '~/Documents/Datas/laravel/mysql:/var/lib/mysql' 9 ports: 10 - '127.0.0.1:23306:3306' 11 environment: 12 MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' 13 MYSQL_DATABASE: 'puppy' 14 laravel: 15 image: ycheung/laravel-dev 16 restart: always 17 ports: 18 - '8081:80' 19 - '9001:9001' 20 volumes: 21 - '~/Documents/laravel:/var/www/html' 22 depends_on: 23 - mysql 24 - mailhog 25 mailhog: 26 image: mailhog/mailhog 27 ports: 28 - "1025:1025" 29 - "8025:8025" 30 selenium-hub: 31 image: selenium/hub 32 container_name: selenium-hub 33 ports: 34 - "4444:4444" 35 chrome: 36 image: selenium/node-chrome 37 volumes: 38 - '/dev/shm:/dev/shm' 39 depends_on: 40 - selenium-hub 41 environment: 42 - HUB_HOST=selenium-hub 43 - HUB_PORT=4444 44 - JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps= 安裝 Laravel Dusk # 1composer require --dev laravel/dusk composer install dusk 執行安裝腳本 # 執行安裝腳本,生成測試目錄 tests/Browser 和示例測試文件

Android 使用 Volley 下載文件附進度條

·801 字·2 分鐘
Volley官方文檔說: “Volley is not suitable for large download or streaming operations, since Volley holds all responses in memory during parsing. For large download operations, consider using an alternative like DownloadManager.” 這是真的,特別是內存小的手機,使用Volley下載很多文件或者單個大文件就不是很恰當了。這裡的large是相對手機內存大小而定。