mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 09:09:25 +08:00 
			
		
		
		
	Revert PR #436
Using Statiq processes for tailwind commands This reverts commitadb600c430. This reverts commitab83e41051.
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -41,7 +41,9 @@ jobs: | ||||
|         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|       run: | | ||||
|         cd docs | ||||
|         npm i | ||||
|         dotnet run --configuration Release | ||||
|         npm run build | ||||
|  | ||||
|     - name: Archive doc generation | ||||
|       uses: actions/upload-artifact@v2 | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/docs.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/docs.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -44,5 +44,7 @@ jobs: | ||||
|         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|       run: | | ||||
|         cd docs | ||||
|         npm i | ||||
|         dotnet run --configuration Release | ||||
|         npm run build | ||||
|         dotnet run -- deploy | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Statiq.Web" Version="1.0.0-beta.27" /> | ||||
|     <PackageReference Include="Statiq.Web" Version="1.0.0-beta.26" /> | ||||
|     <PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   | ||||
| @@ -22,14 +22,6 @@ namespace Docs | ||||
|                 .AddShortcode("Alert", typeof(AlertShortcode)) | ||||
|                 .AddShortcode("AsciiCast", typeof(AsciiCastShortcode)) | ||||
|                 .AddPipelines() | ||||
|                 .AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install") | ||||
|                 { | ||||
|                     LogErrors = false | ||||
|                 }) | ||||
|                 .AddProcess(ProcessTiming.AfterExecution, _ => new ProcessLauncher("npm", "run build:tailwind") | ||||
|                 { | ||||
|                     LogErrors = false | ||||
|                 }) | ||||
|                 .RunAsync(); | ||||
|  | ||||
|         private static Config<string> ConfigureEditLink() | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| # Documentation | ||||
|  | ||||
| To start contributing to the [Spectre.Console](https://github.com/spectreconsole/spectre.console) documentation, you will need the [.NET Core SDK](https://dot.net) 5.0.202 or higher (as defined in the repository root `global.json` file). | ||||
| To start contributing to the [Spectre.Console](https://github.com/spectreconsole/spectre.console) documentation, you will need the [.NET Core SDK](https://dot.net) 3.1 or higher. | ||||
|  | ||||
| ## Running Preview Site | ||||
|  | ||||
| @@ -10,11 +10,15 @@ The documentation site uses [Statiq](https://statiq.dev), a static site generato | ||||
| > Preview.ps1 | ||||
| ``` | ||||
|  | ||||
| After the build is complete, you can navigate to [http://localhost:5080](http://localhost:5080). | ||||
| After the build is complete, you can navigate to [http://localhost:5080/spectre.console](http://localhost:5080/spectre.console). | ||||
|  | ||||
| ## Npm | ||||
| **Note that the site runs under a virtual directory.** | ||||
|  | ||||
| The site uses some tools from the JavaScript ecosystem including npm. While Statiq will execute `npm install` and other commands as needed, you need to have [npm installed](https://www.npmjs.com/get-npm) before running a site build. | ||||
| ## Building the CSS | ||||
|  | ||||
| The documentation uses tailwind for the CSS. Committed to the repository is a large 4gb file with all possible styles at `assets/style.css`. This file is generated from the root files tailwind.config.js and tailwind.css. Any changes to the overall design style (e.g. colors, markdown styling, etc) can be made in these two files. | ||||
|  | ||||
|  For production, `npm run build:tailwind` should be ran post Statiq build. This process will look at all the styles in the HTML and prune the tailwind file down to a much more manageable 30kb or so file. | ||||
|  | ||||
| ## Editing Content | ||||
|  | ||||
| @@ -23,7 +27,7 @@ The documentation is written using [Markdown](https://www.markdownguide.org/basi | ||||
| Markdown files can be found under the following directories: | ||||
|  | ||||
| - [/input](./input) | ||||
| - [/appendix](./input/appendix) | ||||
|   - [/appendix](./input/appendix) | ||||
|      | ||||
| ## Editing Layout | ||||
|  | ||||
|   | ||||
							
								
								
									
										198169
									
								
								docs/input/assets/styles.css
									
									
									
									
									
								
							
							
						
						
									
										198169
									
								
								docs/input/assets/styles.css
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -25,6 +25,9 @@ for Python written by Will McGugan. | ||||
|  | ||||
| ## Examples | ||||
|  | ||||
| <?# AsciiCast cast="all-samples" /?> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| <video autoplay muted loop class="mt-4"> | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|   "description": "Docs for Spectre.Console", | ||||
|   "main": "index.js", | ||||
|   "scripts": { | ||||
|     "build:tailwind": "tailwind build ./input/tailwind.css  -c ./input/tailwind.config.js  -o ./output/assets/styles.css", | ||||
|     "build": "cross-env NODE_ENV=production dotnet run -- -o public" | ||||
|     "build:tailwind": "tailwindcss build ./tailwind.css -o ./input/assets/styles.css", | ||||
|     "build": "cross-env NODE_ENV=production tailwind build tailwind.css -o ./output/assets/styles.css" | ||||
|   }, | ||||
|   "repository": { | ||||
|     "url": "https://github.com/spectreconsole/spectre.console" | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -3,13 +3,12 @@ const colors = require("tailwindcss/colors"); | ||||
| 
 | ||||
| module.exports = { | ||||
|     purge: ["./output/**/*.html"], | ||||
|     mode: 'jit', | ||||
|     darkMode: false, // or 'media' or 'class'
 | ||||
|     theme: { | ||||
|         extend: { | ||||
|             fontFamily: { | ||||
|                 sans: ["Poppins", ...defaultTheme.fontFamily.sans], | ||||
|                 mono: ["Cascadia Mono", "Cascadia Code", "Menlo", "Consolas", "Liberation Mono", "Lucida Console", "WebCascadiaMonoPL", "monospace"], | ||||
|                 mono: ["Cascadia Code", ...defaultTheme.fontFamily.mono], | ||||
|             }, | ||||
|             container: { | ||||
|                 center: true, | ||||
| @@ -276,12 +276,9 @@ code.language-markup .token.script .token.keyword { | ||||
|   .asciinema-terminal.font-small { | ||||
|     font-size: 12px; | ||||
|   } | ||||
|   @media only screen and (min-width: 1080px) { | ||||
|     .asciinema-terminal.font-small { | ||||
|       font-size: 15px; | ||||
|     } | ||||
|   .asciinema-terminal.font-medium { | ||||
|     font-size: 18px; | ||||
|   } | ||||
| 
 | ||||
|   .asciinema-terminal.font-big { | ||||
|     font-size: 24px; | ||||
|   } | ||||
| @@ -1920,10 +1917,10 @@ code.language-markup .token.script .token.keyword { | ||||
|     background-color: #d9d9d9; | ||||
|   } | ||||
|   .asciinema-theme-asciinema .fg-8 { | ||||
|     color: #808080; | ||||
|     color: #4d4d4d; | ||||
|   } | ||||
|   .asciinema-theme-asciinema .bg-8 { | ||||
|     background-color: #808080; | ||||
|     background-color: #4d4d4d; | ||||
|   } | ||||
|   .asciinema-theme-asciinema .fg-9 { | ||||
|     color: #dd3c69; | ||||
		Reference in New Issue
	
	Block a user
	 Patrik Svensson
					Patrik Svensson