You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-15Lines changed: 25 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,36 @@ See the landing page at https://www.csharpcodingguidelines.com
5
5
6
6
## How to create the PDFs
7
7
8
-
1. From the root of the repo, run the `build.bat` script to build the HTML versions of the guidelines and cheat sheet.
9
-
2. From the `Artifacts` folder, open the `CSharpCodingGuidelines.htm` into your favorite browser and print as PDF. Use the default margins, no headers and footers, and set the scaling to 80% for A4 sheets.
10
-
3. Do the same for the `CSharpCodingGuidelinesCheatsheet.htm`, but use landscape orientation and minimum margins. A scaling of 84% should allow you to print the cheat sheet as a double-sided A4 sheet. Just make sure you disable headers and footers, and enable printing background graphics to keep the colored boxes with auxiliary information.
8
+
From the root of the repo, run:
11
9
12
-
## How to build this site
10
+
```
11
+
.\build.ps1 # Windows
12
+
./build.sh # macOS / Linux
13
+
```
13
14
14
-
### Prerequisites
15
+
This compiles all guideline rules into two PDF files in the `Artifacts` folder:
16
+
17
+
-`CSharpCodingGuidelines.pdf` — the full guidelines document
18
+
-`CSharpCodingGuidelinesCheatsheet.pdf` — the two-page cheat sheet
19
+
20
+
Pandoc is downloaded automatically on first run. [Google Chrome](https://www.google.com/chrome/) must be installed for PDF rendering.
21
+
22
+
## How to preview the site locally
15
23
16
-
* Ruby 3.1.
17
-
* An easy way to install is to use `choco install ruby`.
18
-
* Or use the **Ruby+Devkit installer** from [RubyInstaller for Windows](https://rubyinstaller.org/downloads/archives/).
19
-
* Note that you may have to reopen your command shell to get the `ruby --version` command to work,
20
-
* The `bundler`
21
-
* Run `gem install bundler` to install it. If you receive SSL-related errors while running gem install, try running `refreshenv` first.
24
+
Run the following script from the root of the repo:
22
25
23
-
### Building
26
+
```
27
+
.\launch-website.ps1 # Windows
28
+
./build.sh LaunchWebsite # macOS / Linux
29
+
```
30
+
31
+
This installs Ruby 3.3 (if not already present), runs `bundle install`, and starts the Jekyll development server at `http://localhost:4000`. The server monitors for changes when using the `--incremental` flag.
32
+
33
+
### Prerequisites
24
34
25
-
*Clone this repository
26
-
*Run `bundle install`
27
-
*Run `bundle exec jekyll serve`. To have it monitor your working directory for changes, add the `--incremental` option.
0 commit comments