Skip to content

Commit

Permalink
A new start
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennedi committed Jan 18, 2023
0 parents commit cbda6fd
Show file tree
Hide file tree
Showing 881 changed files with 70,096 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single

[*.{js,py}]
indent_size = 4

[*.{md,txt}]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Community Slack
url: https://weaviate.slack.com
about: Chat with the community about any issues, questions, or feedback
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/create_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create a new issue
description: Create a new issue to suggest improvements in the docs or the website
body:
- type: markdown
attributes:
value: |
* For questions, ask in [Slack](https://join.slack.com/t/weaviate/shared_invite/zt-goaoifjr-o8FuVz9b1HLzhlUfyfddhw).
* Before you file an issue read the [Contributing guide](https://github.com/weaviate/weaviate-io/blob/main/CONTRIBUTING.md).
* Check to make sure someone hasn't already opened a similar [issue](https://github.com/weaviate/weaviate-io/issues).
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: This project has a Code of Conduct that all participants are expected to understand and follow.
options:
- label: I have read and agree to the Weaviate's [Code of Conduct](https://github.com/weaviate/weaviate-io/blob/main/CODE_OF_CONDUCT.md)
required: true

- type: textarea
attributes:
label: What part of document/web-page on weaviate.io is affected?
description: |
- Give as much detail as you can to help us understand the change you want to see.
- Why should the docs be changed?
- What is the expected outcome?
validations:
required: true

- type: textarea
attributes:
label: Additional comments?
description: Any additional information, configuration, or data that might be necessary to reproduce the issue.
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/doc_feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation Feedback
description: Provide docs feedback
title: "[Documentation Feedback]: "
labels:
- user-feedback
body:
- type: markdown
attributes:
value: |
Thank you for your feedback. We highly appreciate it and are constantly striving to create better, more useful documentation.
- type: input
id: page-url
attributes:
label: Page URL
description: The URL of the page you provide feedback for.
placeholder: ex. https://weaviate.io/developers/weaviate/
validations:
required: true
- type: textarea
id: feedback
attributes:
label: User feedback
description: What is your feedback? Any tips you would want us to consider?
validations:
required: true
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/report_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Report a bug
description: A clear and concise description of what the bug is.
body:
- type: markdown
attributes:
value: |
* For questions, ask in [Slack](https://join.slack.com/t/weaviate/shared_invite/zt-goaoifjr-o8FuVz9b1HLzhlUfyfddhw).
* Before you file an issue read the [Contributing guide](https://github.com/weaviate/weaviate-io/blob/main/CONTRIBUTING.md).
* Check to make sure someone hasn't already opened a similar [issue](https://github.com/weaviate/weaviate-io/issues).
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: This project has a Code of Conduct that all participants are expected to understand and follow.
options:
- label: I have read and agree to the Weaviate's [Code of Conduct](https://github.com/weaviate/weaviate-io/blob/main/CODE_OF_CONDUCT.md)
required: true

- type: textarea
attributes:
label: Steps to reproduce the bug
description: |
- Give as much detail as you can to help us understand the bug you want to report.
- Go to '...'
- Click on '...'
- Scroll down to '...'
- See the error
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots or screen captures to help explain your problem.
validations:
required: false

- type: textarea
attributes:
label: Additional context?
description: Any additional information, configuration, or data that might be necessary to reproduce the issue.
validations:
required: false
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Thank you for contributing to this project! You must fill out the information below before we can review this pull request. We can triage your pull request to the best possible team for review if you explain why you're making a change (or linking to a pull request) and what changes you've made.
See our [CONTRIBUTING.md](/CONTRIBUTING.md) for information how to contribute.
Thanks again!
-->

### Why:

This PR fixes: [issue link]

### What's being changed:

<!-- Share artifacts of the changes, be they code snippets, GIFs or screenshots; whatever shares the most context. -->

### Type of change:

<!--Please delete options that are not relevant.-->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Feature or enhancements (non-breaking change which adds functionality)
- [ ] Documentation updates (non-breaking change which updates documents)

### How Has This Been Tested?

<!--Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration-->
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
package-lock.json

.python-version
# Old docs
.bundle
_site
.jekyll-metadata
.jekyll-cache
.ruby-version
img/og/og-documentation
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
language: node_js
node_js:
- 16
# branches:
# only:
# - main
cache:
yarn: true
directories:
- $HOME/google-cloud-sdk
install:
- yarn install
script:
# Build the project
- yarn build

# Install additional packages
- yarn global add netlify-cli
# - yarn global add netlify-cli linkinator

# Deploy to Netlify
- source _build_scripts/publish-to-netlify.sh

# Send Slack Message
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $TRAVIS_BRANCH != "main" ]; then
source _build_scripts/slack-find-author.sh
source _build_scripts/slack-netlify-message.sh
fi
# Link Validation
# - source _build_scripts/verify-links.sh

###
##
# Deploy to Cloud Bucket
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $TRAVIS_BRANCH = "main" ]; then
source _build_scripts/gcp-bucket.sh
source _build_scripts/slack-find-author.sh
source _build_scripts/slack-release-message.sh
fi
- echo "It is all done"
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
32 changes: 32 additions & 0 deletions _build_scripts/gcp-bucket.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# unpack secrets
openssl aes-256-cbc -K $encrypted_617a65259523_key -iv $encrypted_617a65259523_iv -in key.master.json.enc -out key.master.json -d

# Install gcloud
gcloud version || true
if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi
echo "LOAD SOURCE"
source /home/travis/google-cloud-sdk/path.bash.inc
gcloud version
gcloud auth activate-service-account --key-file key.master.json
rm key.master.json

# set project
gcloud config set project "$GS_PROJECT"

# rm everything
gsutil -m rm -r gs://$GS_BUCKET_WEAVIATE_IO/**

# cd into assets dir
cd build/

# copy stuff
gsutil -m cp -r ./ gs://$GS_BUCKET_WEAVIATE_IO/

# Invalidate the CDN
gcloud compute url-maps invalidate-cdn-cache "weaviate-io" --path "/*" --async

# Send sitemap to Google
curl https://www.google.com/ping?sitemap=https://weaviate.io/sitemap.xml

# back to root
cd ..
18 changes: 18 additions & 0 deletions _build_scripts/publish-to-netlify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -e

# For Netlify - change robot.txt to Disallow - so that crawlers will ignore it
mv build/robots.txt build/robots.txt.live
echo -e "User-agent: *
Disallow: /" >> build/robots.txt

# sudo netlify deploy --dir=build --site=tangerine-buttercream-20c32f >> netlify.out
netlify deploy --dir=build --site=tangerine-buttercream-20c32f >> netlify.out

# Bring back the original robots.txt file
rm build/robots.txt
mv build/robots.txt.live build/robots.txt

# Extract Netlify URL
NETLIFY_LOC=$(grep -r 'Website Draft URL:' netlify.out)
NETLIFY_URL=$(echo ${NETLIFY_LOC:29})
33 changes: 33 additions & 0 deletions _build_scripts/slack-find-author.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -e

# A map of the github contributors that connects to @Slack handles
declare -A git_slack_map
git_slack_map=(
["Andrzej Liszka"]="<@U036Y4GPB6W>"
["Bob van Luijt"]="<@U6P955HC4>"
["Charlie Harr"]="<@U044XTHRVFA>"
["Connor Shorten"]="<@U03FRH53SUT>"
["Dan Dascalescu"]="<@U048SAV350W>"
["Dirk Kulawiak"]="<@U03MWHK4KV3>"
["Erika Cardenas"]="<@U03RSSRAMLN>"
["Etienne Dilocker"]="<@UCZDBEZ5F>"
["John Trengrove"]="<@U03KPAE8Y7K>"
["JP Hwang"]="<@U0441J6PYGN>"
["laura-ham"]="<@U7CK82LER>"
["Laura Ham"]="<@U7CK82LER>"
["Marcin Antas"]="<@U01E5BJ3UV7>"
["Parker Duckworth"]="<@U034QPLGSCU>"
["Sebastian Witalec"]="<@U03DENV56CR>"
["Stefan Bogdan"]="<@U01DPKTVA93>"
["Svitlana"]="<@U03DQTXFDHS>"
["Wera"]="<@U043TKSEU5V>"
)

# Get the Author name and map it to their Slack handle
github_name="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
if [ ${git_slack_map[$github_name]+_} ]; then
export AUTHOR_NAME=${git_slack_map[$github_name]}
else
export AUTHOR_NAME=$github_name
fi
18 changes: 18 additions & 0 deletions _build_scripts/slack-netlify-message.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -e

# Get commit message
commit_message="$(git log -1 $TRAVIS_COMMIT --pretty="%s")"

# Replace &, <, and > – as per Slack API instructions
commit_message=${commit_message//&/&amp;}
commit_message=${commit_message//</&lt;}
commit_message=${commit_message//>/&gt;}

# Prepare the message and send it to Slack
MESSAGE="{ \"text\": \"Hey $AUTHOR_NAME - your :docusaurus: *weaviate website* build (\`$TRAVIS_BRANCH\`) is ready on Netlify: $NETLIFY_URL \n> $commit_message\" }"

echo $MESSAGE > payload_netlify.json

# Send the slack message
curl -X POST -H 'Content-type: application/json' -d @payload_netlify.json https://hooks.slack.com/services/$SLACK_BOT
Loading

0 comments on commit cbda6fd

Please sign in to comment.