Skip to content

Commit

Permalink
Vitepress kickoff
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Feb 21, 2024
1 parent b51a2f7 commit 6950144
Show file tree
Hide file tree
Showing 16 changed files with 973 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ config.codekit3
prepros-6.config
composer.lock
/tests/.env
/docs/.vitepress/dist
/docs/.vitepress/cache

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indices in sync with your entries.

![Scout](https://www.studioespresso.co/assets/Scout-Github-Banner.png)

## Requirements

This plugin requires Craft CMS 4.x or later and PHP 8.0.2 or later.
Expand Down
48 changes: 48 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
title: 'Scout for Craft CMS',
description: "Scout for Craft CMS",
base: '/craft-scout',
head: [
['meta', {content: 'https://github.com/studioespresso', property: 'og:see_also',}],
[
'script',
{
defer: '',
'data-domain': 'studioespresso.github.io',
src: 'https://stats.studioespresso.co/js/script.tagged-events.outbound-links.js'
}
],
],
themeConfig: {
logo: '/img/plugin-logo.svg',
sidebar: [
{
text: 'General',
items:
[
{text: 'Usage', link: '/general'},
{text: 'Field & settings', link: '/field'},
{text: 'Templating', link: '/templating'},
{text: 'Settings', link: '/settings'},

]
},
],
nav: [
{
text: 'Buy now',
link: 'https://plugins.craftcms.com/scout',
},
{
text: 'Report an issue',
link: 'https://github.com/studioespresso/craft-scout/issues'
},
{
text: 'GitHub',
link: 'https://github.com/studioespresso/craft-scout'
}
]

}
}
;
34 changes: 34 additions & 0 deletions docs/.vitepress/theme/FooterLogo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<template>
<div class="studio-footer">
<span>Brought to you by:</span>
<a
href="https://github.com/sponsors/janhenckens"
target="_blank"
rel="noopener"
>
<img
src="/img/logo-studioespresso.svg"
aria-label="Studio Espresso logo"
/>
</a>
</div>
</template>

<script setup>
</script>

<style scoped>
.studio-footer {
padding: 0 1.5rem 2rem;
font-size: 0.8rem;
}
.studio-footer img {
box-sizing: border-box;
max-width: 200px;
height: 80px;
display: block;
margin: 1rem 0;
padding-left: 0.7rem;
}
</style>
27 changes: 27 additions & 0 deletions docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:root {
--vp-c-bg: rgb(251, 245, 240);
--vp-c-bg-alt: rgba(231, 231, 231);
--vp-c-bg-elv: #ffffff;
--vp-c-bg-soft: #f6f6f7;
--vp-c-brand-1: #598380;
}

.dark {
--vp-c-bg: #1b1b1f;
--vp-c-bg-alt: #161618;
--vp-c-bg-elv: #202127;
--vp-c-bg-soft: #202127;
--vp-c-brand-1: #fff;
}

.custom-block.tip {
border-color: var(--c-brand);
}

.DocSearch {
--docsearch-primary-color: var(--c-brand) !important;
}

a > img {
display: inline-block;
}
15 changes: 15 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Theme from 'vitepress/theme'
import {h, watch} from 'vue'
import './custom.css'

import FooterLogo from './FooterLogo.vue';

export default {
...Theme,
Layout() {
return h(Theme.Layout, null, {
'aside-bottom': () => h(FooterLogo)
}
)
}
}
6 changes: 6 additions & 0 deletions docs/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module "*.vue" {
import Vue from 'vue';
export default Vue;
}

declare module 'FooterLogo';
Binary file added docs/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/icon-vuepress-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/icon-vuepress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Scout
---
# Scout for Craft CMS
Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indices in sync with your entries.

![Banner](./images/banner.png)

## Requirements
This plugin works with Craft 3 or 4.

## Installation
To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

```bash
# go to the project directory
cd /path/to/my-craft-project.dev

# tell Composer to install the plugin
composer require studioespresso/craft-scout

# tell Craft to install the plugin
./craft install/plugin scout
```

### Support & issues
Having an issue with the plugin or would you like to see something added, do report it [here](https://github.com/studioespresso/craft-scout/issues/new).

If you need help setting things up or you want to get in touch privately, [get in touch](mailto:[email protected]).

---

Brought to you by [Studio Espresso ☕️](https://www.studioespresso.co/)
14 changes: 14 additions & 0 deletions docs/public/img/logo-studioespresso.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/public/img/plugin-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6950144

Please sign in to comment.