Original address: Http://docs.orchardproject.net/Documentation/Working-with-Orchard-in-WebMatrix
Recently want to learn to understand orchard, but did not find the relevant Chinese documents, only English documents. So I decided to translate it to make it easier to read later.
Reprint please indicate the original author and source.
My English proficiency is limited, the error is welcome to point out in order to amend.
let Orchard work under the WebMatrix .
WebMatrix, Microsoft's one-stop web development tool makes it easier than ever to create, edit, and publish your Web site. WebMatrix includes embedded Web services (IIS Express), as well as an easy-to-use editor like Orchard to customize the site application. When you use the Web Platform installer to install orchard, you can use the option to replace IIS with WebMatrix.
Install and run WebMatrix Installing and launching WebMatrix
Download and run Microsoft Web Platform Installer, click Installafter clicking the Add button for Microsoft WebMatrix .
Run WebMatrix when the license agreement is accepted when the installation is complete.
use WebMatrix to create a orchard-based Web site
To create a orchard-based Web site using WebMatrix, click App Galleryon the WebMatrix launch page.
Drag the scroll bar down to find and select the Orchard CMSand enter a name for the folder your site uses (Translator Note: Site name in the figure). For example, if you enter a site name of "Orchard CMS", the folder "Documents/my Websites/orchard CMS" will be created. Click next to proceed to the next step.
Click I Accept to receive the End User License agreement.
A new subfolder, "Orchard CMS" will be added to the "My Websites" folder. Click OK. Your Orchard site will open in the Web Matrix Your Orchard and the Orchard Setup page will be launched in a new browser window.
On the Orchard Installation page, enter basic information about the site. Must be clear : Site name, user password, site database type, orchard recipe.
if you simply want to use orchard as soon as possible, we recommend that you choose SQL Compact Server database type and use Default formula (RECIP). After entering all the necessary information, click Finish Setup.
After clicking the button, orchard will open the site homepage in the browser window after the site initialization is complete. You will automatically log in with the user information you just set up (the Admin user is just setting up). At that point, clicking Dashboard will take you to the Orchard Dashboard page where you can change some of the site configurations.
Running your website from Web Matrix
At any point in time, you can run your website from WebMatrix by selecting the project node and clicking Run.
working with Files
You can use WebMatrix to edit the files in your Orchard installation. WebMatrix provides a simple editor this includes colorization for HTML, CSS, JavaScript, and code files.
Although WebMatrix does not provide a build system for compiling code files, Orchard itself provides dynamic compilation F or code files when they is edited. For more information, see Orchard Dynamic compilation.
You can change the editor WebMatrix uses by following these instructions.
As an example, you could find it helpful to use the XML editor (which provides colorization) on the Placement.info file. Must change the setting for . Info files in the WebMatrix filefiletypes.xml (which can Found in the following locations):
32-bit machines: C:\Program Files\Microsoft WebMatrix\config\filetypes.xml64-bit machines: C:\Program Files (x86)\Microsoft WebMatrix\config\filetypes.xml
1) Add the. info file extension to the list of XML file types:
<FileType extension=".info;.config;.csproj;.vbproj;.resx;.settings;.sitemap;.user;.wsdl;.browser;.xaml;.xml;.xoml;.xsd;.xsl;.xslt;.mxml;.dbml;.wstemplate"> <OpenAs>XML</OpenAs> <TabColor>Yellow</TabColor> <Icon>XMLFileIcon</Icon> <EmitUtf8BomByDefault>True</EmitUtf8BomByDefault> <Description>An XML File</Description></FileType>
2) Remove the. info file extension from the list of Text file types:
<FileType extension=".ashx;.export;.po;.blogtemplate;.yml;.yaml;.manifest;.pl;.json;.csv"> <OpenAs>Text</OpenAs> <TabColor>Gray</TabColor> <Icon>DefaultFileIcon</Icon> <EmitUtf8BomByDefault>False</EmitUtf8BomByDefault> <Description>Unknown file type</Description></FileType>
3) Restart WebMatrix to apply the change.
working with the Database
If you selected SQL Server Compact for the database option in Orchard Setup, you can open theorchard.sdf< /c2> database in WebMatrix by selecting Databases.
Once The Database window is opened, you can view the contents of a table by selecting the table in the Explorer pane.
(If you were already in the Databases workspace, you might need to right-click the Orchard node and then click refresh in order to display the database and tables.)
Publishing Your Web Site
When your ' re ready to upload the local copy of your website to the Internet, click the Publish button in the WEBMA Trix Ribbon.
The first time you publish, the publish Your Site dialog box is displayed.
to publish a website, you must has an account with a web hosting provide R. If you don't have one yet, you can select either Get Started with Windows Azure or find Windows Web Hosting . If you select Windows Azure, you'll have the option of creating your website as either an azure website or azure Web Rol E. For instructions in working with Azure see?????
After your ' ve set up an account with a hosting provider, the provider would typically send you an email with your user name, Server name, and other information. To save your extra step of entering this information manually, the provider might send as a "profile XML" file (named With the. Publishsettings extension) that contains this information. You can use these settings by selectingImport Publish profiles and then selecting the file provided by your hoster . Otherwise, you can enter the settings manually.
After your ' ve published your site, you might want to make changes to it and republish it. When you subsequently select Publish, WebMatrix would list the local files that has been changed since the last T IME The local site was published. At this point, you can select which files, want to upload to the remote Stie and select Continue or Cancel.
Once you has published your website, you can view the files in the remote site by opening theremote View.
More information on using WebMatrix to publish websites can is found here.
Orchard Official document Translation (iv) Let orchard work under the WebMatrix