Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix url paths #822

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```python exec
config_api_ref_url = "/docs/api-reference/config"
cli_api_ref_url = "/docs/api-reference/cli"
from pcweb.pages.docs import api_reference
```

# Configuration
Expand All @@ -27,7 +26,7 @@ config = rx.Config(
)
```

See the [config reference]({config_api_ref_url}) for all the parameters available.
See the [config reference]({api_reference.cli.path}) for all the parameters available.

## Environment Variables

Expand All @@ -46,7 +45,7 @@ Finally, you can override the configuration file and environment variables by pa
reflex run --frontend-port 3001
```

See the [CLI reference]({cli_api_ref_url}) for all the arguments available.
See the [CLI reference]({api_reference.config.path}) for all the arguments available.

## Customizable App Data Directory

Expand Down
3 changes: 2 additions & 1 deletion docs/library/graphing/charts/composedchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ components:

```python exec
import reflex as rx
from pcweb.pages.docs import library
```
# Composed Chart

A `composed_chart` is a higher-level component chart that is composed of multiple charts, where other charts are the children of the `composed_chart`. The charts are placed on top of each other in the order they are provided in the `composed_chart` function.


```md alert info
# To learn more about individual charts, checkout: **[area_chart](/docs/library/graphing/areachart/)**, **[line_chart](/docs/library/graphing/line/)**, or **[bar_chart](/docs/library/graphing/barchart/)**.
# To learn more about individual charts, checkout: **[area_chart]({library.graphing.charts.areachart.path})**, **[line_chart]({library.graphing.charts.linechart.path})**, or **[bar_chart]({library.graphing.charts.barchart.path})**.
```

```python demo graphing
Expand Down
3 changes: 2 additions & 1 deletion pcweb/pages/blog/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
blog_routes = [blogs]
for path, document in blog_data.items():
# Get the docpage component.
route = f"/{path.replace('.md', '')}"
route = f"/{path}"
print(route)
title = rx.utils.format.to_snake_case(path.rsplit("/", 1)[1].replace(".md", ""))
comp = webpage(path=route, title=document.metadata["title"]+ " · Reflex Blog")(
lambda doc=document: page(doc, route)
Expand Down
2 changes: 1 addition & 1 deletion pcweb/pages/blog/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def get_blog_data(paths):
blogs = {}
for path in reversed(sorted(paths)):
document = flexdown.parse_file(path)
path = path.replace(".md", "")
path = path.replace(".md", "/")
blogs[path] = document
return blogs

Expand Down
2 changes: 1 addition & 1 deletion pcweb/pages/docs/apiref.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
name = module.__name__.lower()
docs = generate_docs(name, s)
title = name.replace("_", " ").title()
page_data = docpage(f"/docs/api-reference/{name}", title)(docs)
page_data = docpage(f"/docs/api-reference/{name}/", title)(docs)
page_data.title = page_data.title.split('·')[0].strip()
pages.append(page_data)
Loading