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: docs/Features/AdvancedFeatures.md
+88-4Lines changed: 88 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
3
3
This page lists some of the more advanced or less-used features of the blog software.
4
4
5
-
###Shortcodes
5
+
## Shortcodes
6
6
Shortcodes are markdown content that can be shown inside blog posts (like templates that can be referenced).
7
7
The idea is to reuse certain shortcodes across various blog posts.
8
8
If you update the shortcode, it will be updated across all those blog posts as well.
9
9
10
10
For example if you have a running promotion you can add a shortcode and link it in various blog posts. Updating the shortcode (for example that it is almost sold out) will update all blog posts that reference this shortcode.
11
11
12
-
####Creating a shortcode
12
+
### Creating a shortcode
13
13
14
14
To create a shortcode, click on "Shortcodes" in the Admin tab of the navigation bar. You can create a shortcode by adding a name in the top row and the markdown content in the editor. Clicking on an already existing shortcode will allow you to either edit the shortcode or delete it.
15
15
16
16
Currently, deleting a shortcode will leave the shortcode name inside the blogpost. Therefore only delete shortcodes if you are sure that they are not used anymore.
17
17
18
-
####Using a shortcode
18
+
### Using a shortcode
19
19
There are two ways:
20
20
1. If you know the shortcode name, just type in `[[SHORTCODENAME]]` where `SHORTCODENAME` is the name you gave the shortcode.
21
21
2. Click on the more button in the editor and select "Shortcodes". This will open a dialog where you can select the shortcode you want to insert and puts it into the clipboard.
@@ -26,4 +26,88 @@ Shortcodes
26
26
* are not part of the table of contents even though they might have headers.
27
27
* are not part of the reading time calculation.
28
28
* are only available in the content section of a blog post and not the description.
29
-
* are currently only copied to the clipboard and not inserted directly into the editor at the cursor position.
29
+
* are currently only copied to the clipboard and not inserted directly into the editor at the cursor position.
30
+
31
+
## Critical CSS Generator
32
+
33
+
The Critical CSS Generator is a tool that extracts the minimal CSS required for rendering the above-the-fold content of the blog. This optimization improves the initial page load performance by reducing render-blocking CSS.
34
+
35
+
### How it works
36
+
37
+
The generator:
38
+
39
+
1. Starts a test instance of the blog
40
+
2. Visits the homepage and a sample blog post
41
+
3. Extracts the critical CSS using Playwright
42
+
4. Outputs the CSS based on the chosen output
43
+
44
+
The generator is under `tools/LinkDotNet.Blog.CriticalCSS`. You can run it from the command line or directly via `dotnet run`. Here an example
45
+
46
+
```bash
47
+
dotnet run -- --install-playwright -o file -p "critical.css"
48
+
```
49
+
50
+
The output of the "critical.css" should be copied into the head of the [`_Layout.cshtml`](../../src/LinkDotNet.Blog.Web/Pages/_Layout.cshtml) file.
51
+
52
+
### Options
53
+
54
+
| Option | Long Form | Description | Required | Example |
Copy file name to clipboardExpand all lines: docs/SEO/Readme.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,4 +34,7 @@ This blog also offers an RSS feed ([RSS 2.0 specification](https://validator.w3.
34
34
35
35
### Sitemap
36
36
37
-
This blog offers to generate a [sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) that lists all blog posts, the archive and pages of the blog. A sitemap can be generated in the Admin tab of the navigation bar under "Sitemap". This allows, especially new sites that don't have many inbound links, to be indexed easier by search engines.
37
+
This blog offers to generate a [sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) that lists all blog posts, the archive and pages of the blog. A sitemap can be generated in the Admin tab of the navigation bar under "Sitemap". This allows, especially new sites that don't have many inbound links, to be indexed easier by search engines.
38
+
39
+
## Critical CSS
40
+
The blog offers an integrated tool, that generates critical CSS for the blog. Read more about it in the ["*Advanced Features*"](../Features/AdvancedFeatures.md) section.
0 commit comments