Skip to content

Commit 3851e7f

Browse files
committed
Add titlecase linting and fix content
Signed-off-by: karthik Ganeshram <[email protected]>
1 parent 69cf2f8 commit 3851e7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+229
-162
lines changed

Diff for: .markdownlint-cli2.mjs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const options = {
2+
"config": {
3+
"default": false,
4+
"extends": null,
5+
// Headings can increment by only one step (h1 -> h2) and not (h1 -> h3)
6+
"heading-increment": true,
7+
// Multiple blank lines will throw an error
8+
"no-multiple-blanks": true,
9+
// Headings should be surrounded by new lines
10+
"blanks-around-headings": true,
11+
// Headings always start on new lines
12+
"heading-start-left": true,
13+
// Code blocks must have an empty line above and below them
14+
"blanks-around-fences": true,
15+
// There can not be empty spaces in links
16+
"no-space-in-links": true,
17+
// Links must always contain url or "#"
18+
"no-empty-links": true,
19+
// Images must contain alt texts
20+
"no-alt-text": true,
21+
// Enforce consistent style for code blocks
22+
"code-block-style": {
23+
"style": "fenced"
24+
},
25+
// Enforce consistent fence style for code blocks
26+
"code-fence-style": {
27+
"style": "backtick"
28+
},
29+
"titlecase-rule": true
30+
},
31+
"customRules": ["markdownlint-rule-titlecase"]
32+
}
33+
34+
export default options;

Diff for: .markdownlint.jsonc

-35
This file was deleted.

Diff for: content/bartholomew/contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cd ~/bartholomew
4444
Rust and the wasm32-wasi target are prerequisites that are required to build Bartholomew from the source code. Please see the next section if you require these prerequisites on your system.
4545

4646
---
47-
47+
<!-- markdownlint-disable-next-line titlecase-rule -->
4848
## Prerequisites (Rust, wasm32-wasi and wasm-opt)
4949

5050
You will need Rust installed.
@@ -354,7 +354,7 @@ The final stage of a successful contribution will be a notification that the PR
354354

355355
![PR merged](../static/image/docs/merged.png)
356356

357-
## Thank you
357+
## Thank You
358358

359359
At this point, you have performed a significant amount of work which is greatly appreciated.
360360

Diff for: content/bartholomew/quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ If your syntax in the `.md` file is **correct**, you will receive an output simi
102102
✅ content/blog/protons.md
103103
```
104104

105-
### Validating content with shortcodes
105+
### Validating Content With Shortcodes
106106

107107
If some of your documents uses shortcodes, then directory from which the shortcodes must be loaded needs to be specified using the `--shortcodes` flag.
108108

Diff for: content/bartholomew/scripting.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Bartholomew provides the Rhai scripting language for this.
1313
[Rhai](https://rhai.rs/) is a simple scripting language that has many stylistic similarities to
1414
Rust, Go, and Python. The integration with Bartholomew is easy to work with.
1515

16-
## The basic
16+
## The Basic
1717

1818
1. Create a file in `scripts/` with the extension `.rhai`
1919
2. Put some Rhai code in there
@@ -50,7 +50,7 @@ When we run the template, we will see:
5050
hello world
5151
```
5252

53-
## A more complicated example.
53+
## A More Complicated Example.
5454

5555
Let's take a look at `scripts/blogs.rhai`, which is called in a template as `blogs`.
5656
This script makes a list of all of the blog posts for the site.

Diff for: content/bartholomew/seo.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ template = "bartholomew_main"
66

77
---
88

9-
## Google Verification using Bartholomew
9+
## Google Verification Using Bartholomew
1010

1111
Your Bartholomew implementation can be <a href="https://support.google.com/webmasters/answer/9008080?hl=en" target="_blank">officially verified with Google</a>. This is an important first step because the verification process provides you with access to the <a href="https://g.co/kgs/UcBemE" target="_blank">Google Search Console</a>. The Google Search Console (formerly Google Webmaster Tools) allows webmasters to check indexing status, search queries, crawling errors and also optimize visibility of their site.
1212

@@ -42,7 +42,7 @@ google-site-verification: abcdefg.html
4242

4343
At this point the verification button in the Google dashboard can be pressed; Google fetches the file from your site and the verification is complete!
4444

45-
## Search Engine Optimization (SEO) using Bartholomew
45+
## Search Engine Optimization (SEO) Using Bartholomew
4646

4747
In addition to just verifying the ownership of a site/domain, You can see that there are <a href="https://developers.google.com/search/docs/beginner/seo-starter-guide" target="_blank">specific SEO requirements</a> in relation to how the <a href="https://g.co/kgs/p6qtQs" target="_blank">Googlebot</a> indexes content. Googlebot is the web crawler software used by Google.
4848

Diff for: content/bartholomew/shortcodes.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Shortcodes are simple reusable snippets can be used inside the markdown content.
1111

1212
Bartholomew supports shortcodes simplify sharing content between different markdown files.
1313

14-
## The basic
14+
## The Basic
1515

1616
1. Create a file in shortcodes/ with the extension `.rhai`
1717
2. Put some Rhai code in there
1818
3. Make the code return the required value
1919
4. Enable shortcodes in the markdown document
2020
5. Use it in the content
2121

22-
## Creating a shortcode
22+
## Creating a Shortcode
2323

2424
An example of a shortcode is in `shortcodes/alert.rhai`. The shortcode is available in the markdown file as `alert` just like for scripts.
2525

@@ -71,7 +71,7 @@ let icons = #{
7171

7272
```
7373

74-
## Enabling shortcodes
74+
## Enabling Shortcodes
7575

7676
To enable shortcodes support for a particular document, the value of `enable_shortcodes = true` must be set in the page head.
7777

@@ -85,7 +85,7 @@ enable_shortcodes = true
8585
---
8686
```
8787

88-
## Using shortcodes
88+
## Using Shortcodes
8989

9090
Now the shortcode can be used in the markdown file by calling it with the required arguments. For the alerts script, this is the type of alert and the message to be displayed.
9191

@@ -97,7 +97,7 @@ Which renders as the following.
9797

9898
{{ alert "warning" "Bartholomew is a work in progress" }}
9999

100-
## Note while using shortcodes
100+
## Note While Using Shortcodes
101101

102102
An important note to be considered while using shortcodes is that the `\{{ }}` must be escaped if they are not meant to be executed. This is only required in the content files where shortcodes are enabled.
103103

Diff for: content/bartholomew/templates.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In Bartholomew, layout is handled via templates. All templates are in the
1313
While the version of Handlebars used in Bartholomew is written in Rust, not JavaScript,
1414
it works almost identically.
1515

16-
## A simple template
16+
## A Simple Template
1717

1818
Here is a simple HTML template with Handlebars:
1919

@@ -37,7 +37,7 @@ then fills in the `body` with the value of `page.body`.
3737

3838
Let's take a brief look at the `page` object to understand what is happening here.
3939

40-
### The `page` object
40+
### The `page` Object
4141

4242
In JSON, the `page` object looks like this:
4343

@@ -60,7 +60,7 @@ In JSON, the `page` object looks like this:
6060
To access a part, you simply use a dotted path notation. So to get the value of `key` in
6161
the `extra` section, we use `{{ page.head.extra.key }}`.
6262

63-
### The `site` object
63+
### The `site` Object
6464

6565
In addition to the `page` object, there is also a `site` object. `site.pages` contains the `head` section and content of every page in the site. `site.pages` is only populated for templates included in `index_site_pages` in `site.toml` as described in the [configuration section](./configuration.md):
6666

@@ -84,7 +84,7 @@ In addition to the `page` object, there is also a `site` object. `site.pages` co
8484
Note that the `site.pages` array has access to every single document in the `content` folder.
8585
This part of the API may change in the future, as it does not scale terribly well.
8686

87-
### The `env` object
87+
### The `env` Object
8888

8989
The third top-level object is `env`, which holds all of the environment data.
9090

@@ -107,7 +107,7 @@ You can dump the entire contents of `env` using a template like this:
107107
</ul>
108108
```
109109

110-
### The `request` object
110+
### The `request` Object
111111

112112
The fourth top-level object is `request`, which holds all the details about
113113
the HTTP request, the path of this resource, and other Spin information.
@@ -131,7 +131,7 @@ You can dump the entire contents of `request` using a template like this:
131131
</ul>
132132
```
133133

134-
## Including a template
134+
## Including a Template
135135

136136
It is possible to include a template into another template.
137137
For example, if we want to include the `navbar.hbs` template, we use a "partial" include
@@ -143,7 +143,7 @@ like this:
143143

144144
Note that we drop the `.hbs` suffix when including this way.
145145

146-
## Calling template helpers
146+
## Calling Template Helpers
147147

148148
There are a few template helpers defined in Bartholomew.
149149

@@ -157,7 +157,7 @@ The above will render `HELLO`.
157157

158158
Note that you can create custom template helpers using [Rhai scripts](./scripting.md).
159159

160-
### Defined helper functions
160+
### Defined Helper Functions
161161

162162
The following helper functions are provided with Bartholomew
163163

@@ -170,7 +170,7 @@ The following helper functions are provided with Bartholomew
170170
- `abbrev UINT STRING`: Shorten the string to UINT with elipses. For example `abbrev 8 "Functions Example"` returns `Funct...`.
171171
- `plural INT SINGULAR_STRING PLURAL_STRING`: If `INT` is `1`, return the singular form. Otherwise return plural: `plural 1 "apple" "apples"` returns `apple`. But if we change `1` to `2` (or `0`) it will return `apples`.
172172

173-
### Values reference
173+
### Values Reference
174174

175175
The following values are available in the template. This is formatted in YAML for readability. The four top-level objects are:
176176

Diff for: content/bartholomew/themes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ template = "bartholomew_main"
88

99
Bartholomew supports theming which allows for easy customization of the site along with the user-defined tempaltes.
1010

11-
## Adding a theme
11+
## Adding a Theme
1212

1313
Once the initial site has been set up using the [quickstart section](./quickstart), create a themes folder where you will be able to download different themes.
1414

@@ -25,7 +25,7 @@ git submodule add <Source_to_the_theme>
2525

2626
Multiple themes can be added to the themes directory but only one of them will be active at a given time as described in the next section.
2727

28-
## Configuring the site to use the theme
28+
## Configuring the Site to Use the Theme
2929

3030
To choose a theme for the website, the `theme` attribute in `config/site.toml` must be configured, where the value is the name of the theme as found in the `themes/` folder.
3131

@@ -59,7 +59,7 @@ files = [ {source = "themes/<name of theme>/static", destination ="/"}, { source
5959
route = "/static/..."
6060
```
6161

62-
## Template precedence
62+
## Template Precedence
6363

6464
When a theme is enabled for a site, both the user-defined and theme-provided assets like the templates, scripts and static assets will be available. If a theme-provided asset and user-provided asset have the same name, the user-defined asset takes precedence. This allows for the user to override the theme to allow for customization.
6565

Diff for: content/cloud/data-redis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn publish(_req: Request) -> Result<Response> {
132132
}
133133
```
134134
135-
## Log into Fermyon Cloud
135+
## Log Into Fermyon Cloud
136136
137137
We need to log into Fermyon Cloud, so that we can build/deploy our application. For example:
138138

Diff for: content/cloud/delete.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ enable_shortcodes = true
55

66
---
77

8-
- [Sign in to the Fermyon Cloud website](#sign-in-to-the-fermyon-cloud-website)
9-
- [Delete your application](#delete-your-application)
10-
- [Next steps](#next-steps)
8+
- [Sign in to the Fermyon Cloud Website](#sign-in-to-the-fermyon-cloud-website)
9+
- [Delete Your Application](#delete-your-application)
10+
- [Next Steps](#next-steps)
1111

1212
It’s super easy to delete your application with Fermyon Cloud. This can be done in just a few steps using the Fermyon Cloud website.
1313

14-
## Sign in to the Fermyon Cloud website
14+
## Sign in to the Fermyon Cloud Website
1515

1616
1. Go to [https://cloud.fermyon.com](https://cloud.fermyon.com)
1717
1. Sign in using GitHub
1818

1919
![Fermyon Cloud login page](/static/image/login.png)
2020

21-
## Delete your application
21+
## Delete Your Application
2222

2323
1. Click on the application (**cloud_start** in the picture below), to open the application drawer.
2424

@@ -34,7 +34,7 @@ It’s super easy to delete your application with Fermyon Cloud. This can be don
3434

3535
That’s all about deleting your Spin Application on the Fermyon Cloud!
3636

37-
## Next steps
37+
## Next Steps
3838

3939
- Make sure to check the [FAQ and Known Limitations](faq) article
4040
- Find known issues and file new ones with this [GitHub repository](https://github.com/fermyon/feedback)

Diff for: content/cloud/deploy.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ enable_shortcodes = true
66
---
77

88
- [Prerequisites - Install the Spin CLI](#prerequisites---install-the-spin-cli)
9-
- [Login to the Fermyon Cloud](#login-to-the-fermyon-cloud)
10-
- [Deploy your application](#deploy-your-application)
11-
- [Next steps](#next-steps)
9+
- [Log in to the Fermyon Cloud](#log-in-to-the-fermyon-cloud)
10+
- [Deploy Your Application](#deploy-your-application)
11+
- [Next Steps](#next-steps)
1212

1313
This article will guide you through deploying a Spin Application with the Fermyon Cloud. You can deploy your [Spin App](/spin) or [Bartholomew](https://github.com/fermyon/bartholomew) site in just a few steps.
1414

@@ -44,7 +44,7 @@ Device authorized!
4444

4545
This command generates an authentication code for your device to be authorized on the Fermyon Cloud.
4646

47-
## Deploy your application
47+
## Deploy Your Application
4848

4949
After having signed in to the Fermyon Cloud, you deploy the application, by running the following command in the directory where your applications `spin.toml` file is located.
5050

@@ -64,6 +64,6 @@ Take a look at the [Quickstart article](quickstart) for how to get a pre-built a
6464

6565
**Congratulations on deploying your Spin Application! 🥳**
6666

67-
## Next steps
67+
## Next Steps
6868

6969
- Next, let's look at [how to upgrade an application](upgrade).

0 commit comments

Comments
 (0)