Miscellaneous Improvements (#1202)

* Miscellaneous Improvements

* test

* update bot script

* remove stupid redirects
This commit is contained in:
Yakko Majuri
2021-04-12 13:41:13 +00:00
committed by GitHub
parent 02d98b2b8e
commit 2fbe2f82e5
4 changed files with 15 additions and 47 deletions

View File

@@ -21,6 +21,7 @@ Some variables here are default Django variables. This [Django Docs page](https:
| `JS_URL` | URL used by Webpack for loading external resources like images and files. | `http://localhost:8234` if PostHog is running in DEBUG mode, must be specified otherwise.
| `SENTRY_DSN` | Used to integrate with [Sentry](https://sentry.io/welcome/) error and event tracking. Ignored when running tests. | `None`
| `ASYNC_EVENT_ACTION_MAPPING`| If set to `False`, actions will be matched to events as they come. Otherwise, the matching will happen in batches through a periodic Celery task. Should only be toggled on by high load instances. | `False`
| `ACTION_EVENT_MAPPING_INTERVAL_SECONDS`| Specify how often (in seconds) PostHog should run a job to match events to actions. | `300`
| `DISABLE_SECURE_SSL_REDIRECT` | Disables automatic redirect from port 80 (HTTP) to port 443 (HTTPS). | `False`
| `IS_BEHIND_PROXY` | Specifies if PostHog is running behind a proxy like Apache, NGINX or ELB. Be sure to properly set [trusted proxies](/docs/configuring-posthog/running-behind-proxy#trusted-proxies). | `False`
| `ALLOWED_IP_BLOCKS` | Specifies IP blocks allowed to connect to the PostHog instance for management (events will still be allowed from anywhere). Make sure to properly [configure your proxy](/docs/configuring-posthog/running-behind-proxy) if running behind a proxy. |

View File

@@ -6,33 +6,29 @@ showTitle: true
<br />
This website is based on [Gatsby](https://gatsbyjs.org) and is hosted with [AWS Amplify](https://aws.amazon.com/amplify/).
This website is based on [Gatsby](https://gatsbyjs.org) and is hosted with [Netlify](https://www.netlify.com/).
<br />
## Finding the Content to Edit
Once you have cloned the repo, the ```contents``` folder contains a few key areas:
Once you have cloned the repo, the `contents/` directory contains a few key areas:
* ```docs```&nbsp;= all of the documentation for PostHog's platform
* ```handbook```&nbsp;= the PostHog company handbook
* ```blog```&nbsp;= our blog posts
* `docs/` = all of the documentation for PostHog's platform
* `handbook/` = the PostHog company handbook
* `blog/` = our blog posts
Inside each of these are a series of markdown files for you to edit.
<br />
<br />
## Deployment
New changes should be created as a Pull Request.
To get changes into production, the website deploys automatically from ```master```. The build takes 5-10 minutes.
<br />
<br />
To get changes into production, the website deploys automatically from `master`. The build takes 5-10 minutes.
## Markdown Details
#### Headers
#### Frontmatter
At the top of the file, it is necessary to have the following for the page to appear:
@@ -44,9 +40,9 @@ showTitle: true
---
```
The ```sidebar```&nbsp;is the sidebar menu that will attach. You can see a list of available sidebars in ```/src/sidebars/sidebars.json```. You can choose not to have a sidebar by setting this to ```null```.
The `sidebar` is the sidebar menu that the page will attach to. You can see a list of available sidebars in `/src/sidebars/sidebars.json`. You can choose not to have a sidebar by setting this to `null`.
The ```bashowTitle```&nbsp;should always be set to `true`.
The property `showTitle` should always be set to `true`.
#### Images / GIFs
@@ -54,7 +50,7 @@ For our Markdown, we use [gatsby-remark-copy-linked-files](https://www.gatsbyjs.
This copies local files linked to/from Markdown files to the root directory.
Place images in ```contents/images```.
Place images in `contents/images/`.
To include an image in a markdown file, you can use nice local references, like so:
@@ -76,4 +72,4 @@ For most images, this plugin will automatically generate a range of sizes to opt
Once you've made a new markdown file, you should link to it from the sidebar where appropriate.
The sidebar is generated from ```/src/sidebars/sidebars.json```.
The sidebar is generated from `/src/sidebars/sidebars.json`.

View File

@@ -6,34 +6,4 @@
[[redirects]]
from = "/careers/*"
to = "/careers"
status = 200
[[redirects]]
from = "/docs/api/elements"
to = "/docs/api/elements"
[[redirects]]
from = "/docs/api/events"
to = "/docs/api/events"
[[redirects]]
from = "/docs/api/overview"
to = "/docs/api/overview"
[[redirects]]
from = "/docs/api/people"
to = "/docs/api/people"
[[redirects]]
from = "/docs/api/trends"
to = "/docs/api/trends"
[[redirects]]
from = "/docs/api/user"
to = "/docs/api/user"
status = 200

View File

@@ -25,7 +25,8 @@ if len(from_paths) > 0 and len(from_paths) == len(to_paths):
new_redirects = ''
for i in range(len(from_paths)):
if from_paths[i] not in netlify_config_text:
md_to_mdx = '.mdx' not in from_paths[i] and '.mdx' in to_paths[i]
if from_paths[i] not in netlify_config_text and not md_to_mdx:
new_redirects += redirect_text.format(from_paths[i], to_paths[i])
with open("./netlify.toml", "a") as netlify_config: