Skip to content

Commit

Permalink
Merge branch 'main' into fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-mom authored Jan 14, 2025
2 parents 99a9cc4 + dd0ffb0 commit 00b0ccf
Show file tree
Hide file tree
Showing 486 changed files with 398 additions and 348 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
public/
site/resources/
.DS_Store
.idea
.DS_Store
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ Docs, Learn & Guides sections are open to contributions. If you find a mistake,

## Markdown extensions

### Using images

There are two places to store images:

1.`/site/static` for any images that are used in the UI, chrome, menus etc. These are typically icons, logos etc.
2.`/site/assets` for any images that are used in the content of the site. These are typically screenshots, diagrams etc.

The `/site/assets` directory is special, as Hugo can use it to get "resources" which are then fed into the assets
processing pipeline, where they are optimized, transformed to `.webp` and some more magic.

Adding images to any markdown file works in the canonical way:

```markdown
![some alt text](/path/to/image.jpg "optional title")
```
The above markdown will trigger the `render-image.html` hook that does all the pipelining magic.

> Note that you can leave out the `/site/assets` part of the path.
### Fancy fenced code blocks with title

You can make fancy fenced code blocks as follows. We recognize any typescript and javascript code blocks and
Expand Down
2 changes: 1 addition & 1 deletion algolia/config-docs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"index_name": "checkly_docs",
"start_urls": ["https://www.checklyhq.com/docs"],
"sitemap_urls": ["https://docs.checklyhq.com/sitemap.xml"],
"sitemap_urls": ["https://www.checklyhq.com/docs-sitemap.xml"],
"selectors": {
"lvl0": {
"selector": ".DocSearch-lvl1",
Expand Down
17 changes: 11 additions & 6 deletions algolia/config-learn.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"index_name": "checkly_docs_learning",
"start_urls": ["https://www.checklyhq.com/learn/headless"],
"index_name": "checkly_learn",
"start_urls": ["https://www.checklyhq.com/learn/"],
"stop_urls": [
".*(?<!/)$"
],
"selectors": {
"lvl0": ".learn-page article h1",
"lvl1": ".learn-page article h2",
"lvl2": ".learn-page article h3",
"text": ".learn-page article p,.learn-page article ul,.learn-page article ol"
"lvl0": {
"selector": ".DocSearch-lvl1",
"global": true,
"default_value": "Learn"
},
"lvl1": ".learn-page article h1",
"lvl2": ".learn-page article h2",
"lvl3": ".learn-page article h3",
"text": ".DocSearch-content p, .DocSearch-content li, .DocSearch-content .alert"
}
}
4 changes: 2 additions & 2 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gulp.task('purgecss', () => {
return gulp.src('./public/css/**/*.css')
.pipe(purgecss({
content: ['./public/**/*.html'],
safelist: [/dot--*/, /modal/]
safelist: [/dot--*/, /modal/, /DocSearch/, /copy-code-button-*/, /left-transform/, /right-transform/]
}))
.pipe(gulp.dest('./public/css'))
})
Expand Down Expand Up @@ -82,7 +82,7 @@ gulp.task('assets', () => (
))

gulp.task('hash', () => {
return gulp.src('./public/**', { encoding: false })
return gulp.src(['./public/images/**', './public/js/**', './public/css/**'], { encoding: false })
.pipe(revall.revision({
dontRenameFile: [/^\/favicon.ico$/g, '.html', 'sitemap.xml', 'robots.txt', '.woff', '.eot', '.ttf', '.woff2'],
dontUpdateReference: ['.woff', '.eot', '.ttf', '.woff2']
Expand Down
38 changes: 28 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"gulp-postcss": "^9.0.1",
"gulp-purgecss": "^5.0.0",
"gulp-rev-all": "^3.0.0",
"gulp-sass": "5.1.0",
"gulp-sass": "6.0.0",
"gulp-watch": "^5.0.1",
"html-loader": "^1.3.2",
"hugo-bin": "0.135.0",
"imports-loader": "^0.7.1",
"imports-loader": "^5.0.0",
"postcss-cssnext": "3.1.1",
"postcss-import": "^15.1.0",
"run-sequence": "^2.2.1",
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 00b0ccf

Please sign in to comment.