From 6cff69796388823d510f2abaf190c2f22ac48576 Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Wed, 21 Feb 2024 17:26:32 +0100 Subject: [PATCH 01/30] Add docs.py to build docs --- docs.py | 343 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 docs.py diff --git a/docs.py b/docs.py new file mode 100644 index 000000000..59578a820 --- /dev/null +++ b/docs.py @@ -0,0 +1,343 @@ +import json +import logging +import os +import re +import shutil +import subprocess +from functools import lru_cache +from http.server import HTTPServer, SimpleHTTPRequestHandler +from importlib import metadata +from multiprocessing import Pool +from pathlib import Path +from typing import Any, Dict, List, Optional, Union + +import mkdocs.commands.build +import mkdocs.commands.serve +import mkdocs.config +import mkdocs.utils +import typer +import yaml +from jinja2 import Template + +logging.basicConfig(level=logging.INFO) + +app = typer.Typer() + +mkdocs_name = "mkdocs.yml" + +missing_translation_snippet = """ +{!../../../docs/missing-translation.md!} +""" + +docs_path = Path("docs") +en_docs_path = Path("docs/en") +en_config_path: Path = en_docs_path / mkdocs_name +site_path = Path("site").absolute() +build_site_path = Path("site_build").absolute() + + +@lru_cache +def is_mkdocs_insiders() -> bool: + version = metadata.version("mkdocs-material") + return "insiders" in version + + +def get_en_config() -> Dict[str, Any]: + return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) + + +def get_lang_paths() -> List[Path]: + return sorted(docs_path.iterdir()) + + +def lang_callback(lang: Optional[str]) -> Union[str, None]: + if lang is None: + return None + lang = lang.lower() + return lang + + +def complete_existing_lang(incomplete: str): + lang_path: Path + for lang_path in get_lang_paths(): + if lang_path.is_dir() and lang_path.name.startswith(incomplete): + yield lang_path.name + + +@app.callback() +def callback() -> None: + if is_mkdocs_insiders(): + os.environ["INSIDERS_FILE"] = "../en/mkdocs.insiders.yml" + # For MacOS with insiders and Cairo + os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib" + + +@app.command() +def new_lang(lang: str = typer.Argument(..., callback=lang_callback)): + """ + Generate a new docs translation directory for the language LANG. + """ + new_path: Path = Path("docs") / lang + if new_path.exists(): + typer.echo(f"The language was already created: {lang}") + raise typer.Abort() + new_path.mkdir() + new_config_path: Path = Path(new_path) / mkdocs_name + new_config_path.write_text("INHERIT: ../en/mkdocs.yml\n", encoding="utf-8") + new_config_docs_path: Path = new_path / "docs" + new_config_docs_path.mkdir() + en_index_path: Path = en_docs_path / "docs" / "index.md" + new_index_path: Path = new_config_docs_path / "index.md" + en_index_content = en_index_path.read_text(encoding="utf-8") + new_index_content = f"{missing_translation_snippet}\n\n{en_index_content}" + new_index_path.write_text(new_index_content, encoding="utf-8") + typer.secho(f"Successfully initialized: {new_path}", color=typer.colors.GREEN) + update_languages() + + +@app.command() +def build_lang( + lang: str = typer.Argument( + ..., callback=lang_callback, autocompletion=complete_existing_lang + ), +) -> None: + """ + Build the docs for a language. + """ + insiders_env_file = os.environ.get("INSIDERS_FILE") + print(f"Insiders file {insiders_env_file}") + if is_mkdocs_insiders(): + print("Using insiders") + lang_path: Path = Path("docs") / lang + if not lang_path.is_dir(): + typer.echo(f"The language translation doesn't seem to exist yet: {lang}") + raise typer.Abort() + typer.echo(f"Building docs for: {lang}") + build_site_dist_path = build_site_path / lang + if lang == "en": + dist_path = site_path + # Don't remove en dist_path as it might already contain other languages. + # When running build_all(), that function already removes site_path. + # All this is only relevant locally, on GitHub Actions all this is done through + # artifacts and multiple workflows, so it doesn't matter if directories are + # removed or not. + else: + dist_path = site_path / lang + shutil.rmtree(dist_path, ignore_errors=True) + current_dir = os.getcwd() + os.chdir(lang_path) + shutil.rmtree(build_site_dist_path, ignore_errors=True) + subprocess.run(["mkdocs", "build", "--site-dir", build_site_dist_path], check=True) + shutil.copytree(build_site_dist_path, dist_path, dirs_exist_ok=True) + os.chdir(current_dir) + typer.secho(f"Successfully built docs for: {lang}", color=typer.colors.GREEN) + + +index_sponsors_template = """ +{% if sponsors %} +{% for sponsor in sponsors.gold -%} + +{% endfor -%} +{%- for sponsor in sponsors.silver -%} + +{% endfor %} +{% endif %} +""" + + +def generate_readme_content() -> str: + en_index = en_docs_path / "docs" / "index.md" + content = en_index.read_text("utf-8") + match_pre = re.search(r"\n\n", content) + match_start = re.search(r"", content) + match_end = re.search(r"", content) + sponsors_data_path = en_docs_path / "data" / "sponsors.yml" + sponsors = mkdocs.utils.yaml_load(sponsors_data_path.read_text(encoding="utf-8")) + if not (match_start and match_end): + raise RuntimeError("Couldn't auto-generate sponsors section") + if not match_pre: + raise RuntimeError("Couldn't find pre section (\n\n", content) match_start = re.search(r"", content) @@ -267,17 +274,17 @@ def live( def get_updated_config_content() -> Dict[str, Any]: - config = get_en_config() + config = get_base_config_path() languages = [{"en": "/"}] new_alternate: List[Dict[str, str]] = [] # Language names sourced from https://quickref.me/iso-639-1 # Contributors may wish to update or change these, e.g. to fix capitalization. - language_names_path = Path(__file__).parent / "../docs/language_names.yml" + language_names_path = Path(__file__).parent / docs_folder_name / "language_names.yml" local_language_names: Dict[str, str] = mkdocs.utils.yaml_load( language_names_path.read_text(encoding="utf-8") ) for lang_path in get_lang_paths(): - if lang_path.name in {"en", "em"} or not lang_path.is_dir(): + if lang_path.name == "en" or not lang_path.is_dir(): continue code = lang_path.name languages.append({code: f"/{code}/"}) @@ -287,19 +294,18 @@ def get_updated_config_content() -> Dict[str, Any]: if code not in local_language_names: print( f"Missing language name for: {code}, " - "update it in docs/language_names.yml" + f"update it in {docs_folder_name}/language_names.yml" ) raise typer.Abort() use_name = f"{code} - {local_language_names[code]}" new_alternate.append({"link": url, "name": use_name}) - new_alternate.append({"link": "/em/", "name": "😉"}) config["extra"]["alternate"] = new_alternate return config def update_config() -> None: config = get_updated_config_content() - en_config_path.write_text( + base_config_path.write_text( yaml.dump(config, sort_keys=False, width=200, allow_unicode=True), encoding="utf-8", ) @@ -311,13 +317,13 @@ def verify_config() -> None: Verify main mkdocs.yml content to make sure it uses the latest language names. """ typer.echo("Verifying mkdocs.yml") - config = get_en_config() + config = get_base_config_path() updated_config = get_updated_config_content() if config != updated_config: typer.secho( - "docs/en/mkdocs.yml outdated from docs/language_names.yml, " + f"{docs_folder_name}/en/mkdocs.yml outdated from {docs_folder_name}/language_names.yml, " "update language_names.yml and run " - "python ./scripts/docs.py update-languages", + "python ./docs.py update-languages", color=typer.colors.RED, ) raise typer.Abort() diff --git a/help/language_names.yml b/help/language_names.yml new file mode 100644 index 000000000..b461eae69 --- /dev/null +++ b/help/language_names.yml @@ -0,0 +1,2 @@ +en: English +fr: français diff --git a/mkdocs.yml b/mkdocs.yml index 58113f0a3..faf28384d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,204 +1,197 @@ site_name: Grist Help Center site_dir: site -site_description: "Tutorials and resources for Grist, to help you organize your data, your way." -site_url: "https://support.getgrist.com" -repo_name: "GitHub" -repo_url: "https://github.com/gristlabs/grist-help" - -# use directory urls (for prettiness) unless running htmlproofing -# (which is confused by them). -use_directory_urls: !ENV [HTMLPROOFER_OVERRIDE_USE_DIRECTORY_URLS, true] - -docs_dir: './help/en/docs' # Add localization folder here for now, we'll handle i18n later -# windmill is a theme maintained by Grist Labs in https://github.com/gristlabs/mkdocs-windmill +site_description: Tutorials and resources for Grist, to help you organize your data, your way. +site_url: https://support.getgrist.com +repo_name: GitHub +repo_url: https://github.com/gristlabs/grist-help +use_directory_urls: true +docs_dir: ./help/en/docs theme: name: windmill custom_dir: overrides nav: - - Welcome to Grist: index.md - - FAQ: FAQ.md - - How-To Tutorials: - - Create your own CRM: lightweight-crm.md - - Analyze and visualize: investment-research.md - - Manage business data: afterschool-program.md - - Managing documents: - - Creating a document: creating-doc.md - - Sharing a document: sharing.md - - Copying documents: copying-docs.md - - Importing more data: imports.md - - Exports & backups: exports.md - - Automatic backups: automatic-backups.md - - Document history: document-history.md - - Workspaces: workspaces.md - - Pages and Tables: - - Entering data: enter-data.md - - Pages & widgets: page-widgets.md - - Raw data page: raw-data.md - - Search, sort & filter: search-sort-filter.md - - Table widget: widget-table.md - - Card & Card List: widget-card.md - - Form: widget-form.md - - Chart: widget-chart.md - - Calendar: widget-calendar.md - - Custom: widget-custom.md - - Linking widgets: linking-widgets.md - - Custom layouts: custom-layouts.md - - Record Cards: record-cards.md - - Summary tables: summary-tables.md - - On-Demand tables: on-demand-tables.md - - Columns and data types: - - Columns & types: col-types.md - - Reference columns: col-refs.md - - Conditional Formatting: conditional-formatting.md - - Timestamp columns: timestamps.md - - Authorship columns: authorship.md - - Transformations: col-transform.md - - Using formulas: - - Intro to formulas: formulas.md - - References and Lookups: references-lookups.md - - Working with dates: dates.md - - Python versions: python.md - - Function reference: functions.md - - Formula Cheat Sheet: formula-cheat-sheet.md - - AI Assistant: - - AI Assistant: ai-assistant.md - - Team Sites: - - Creating team sites: teams.md - - Sharing team sites: team-sharing.md - - Access rules: - - Intro to access rules: access-rules.md - - Integrations: - - REST API usage: rest-api.md - - REST API reference: api.md - - Integrator Services: integrators.md - - Embedding: embedding.md - - Plugin API: - - Intro to Plugin API: code/README.md - - grist-plugin-api: code/modules/grist_plugin_api.md - - ... | flat | **/code/interfaces/** - - ... | flat | **/code/modules/** - - Self-Managed: - - Self-managed Grist: self-managed.md - - SAML: install/saml.md - - OIDC: install/oidc.md - - Forwarded headers: install/forwarded-headers.md - - Cloud storage: install/cloud-storage.md - - GristConnect: install/grist-connect.md - - AWS Marketplace: install/aws-marketplace.md - - Telemetry: - - Overview of Telemetry: telemetry.md - - Limited Telemetry: telemetry-limited.md - - Full Telemetry: telemetry-full.md - - News & updates: - - Newsletters: newsletters.md - - 2024/01: newsletters/2024-01.md - - 2023/12: newsletters/2023-12.md - - 2023/11: newsletters/2023-11.md - - 2023/10: newsletters/2023-10.md - - 2023/09: newsletters/2023-09.md - - 2023/08: newsletters/2023-08.md - - 2023/07: newsletters/2023-07.md - - 2023/06: newsletters/2023-06.md - - 2023/05: newsletters/2023-05.md - - 2023/04: newsletters/2023-04.md - - 2023/03: newsletters/2023-03.md - - 2023/02: newsletters/2023-02.md - - 2023/01: newsletters/2023-01.md - - 2022/12: newsletters/2022-12.md - - 2022/11: newsletters/2022-11.md - - 2022/10: newsletters/2022-10.md - - 2022/09: newsletters/2022-09.md - - 2022/08: newsletters/2022-08.md - - 2022/07: newsletters/2022-07.md - - 2022/06: newsletters/2022-06.md - - 2022/05: newsletters/2022-05.md - - 2022/04: newsletters/2022-04.md - - 2022/03: newsletters/2022-03.md - - 2022/02: newsletters/2022-02.md - - 2022/01: newsletters/2022-01.md - - 2021/12: newsletters/2021-12.md - - 2021/11: newsletters/2021-11.md - - 2021/10: newsletters/2021-10.md - - 2021/09: newsletters/2021-09.md - - 2021/08: newsletters/2021-08.md - - 2021/07: newsletters/2021-07.md - - 2021/06: newsletters/2021-06.md - - 2021/05: newsletters/2021-05.md - - 2021/04: newsletters/2021-04.md - - 2021/03: newsletters/2021-03.md - - 2021/02: newsletters/2021-02.md - - 2021/01: newsletters/2021-01.md - - 2020/12: newsletters/2020-12.md - - 2020/11: newsletters/2020-11.md - - 2020/10: newsletters/2020-10.md - - 2020/09: newsletters/2020-09.md - - 2020/08: newsletters/2020-08.md - - 2020/07: newsletters/2020-07.md - - 2020/06: newsletters/2020-06.md - - 2020/05: newsletters/2020-05.md - - More examples: - - More examples: examples.md - - Credit card expenses: examples/2020-06-credit-card.md - - Book club links: examples/2020-06-book-club.md - - Prefill emails: examples/2020-07-email-compose.md - - Prepare Invoices: examples/2020-08-invoices.md - - Track Payroll: examples/2020-09-payroll.md - - Print mailing labels: examples/2020-10-print-labels.md - - Treasure Hunt: examples/2020-11-treasure-hunt.md - - Map: examples/2020-12-map.md - - Task Management: examples/2021-01-tasks.md - - Lead List: examples/2021-03-leads.md - - Link Keys Guide: examples/2021-04-link-keys.md - - Reference Columns Guide: examples/2021-05-reference-columns.md - - Summary Tables Guide: examples/2021-06-timesheets.md - - Time and User Stamps: examples/2021-07-auto-stamps.md - - Restrict Duplicate Records: examples/2023-01-acl-memo.md - - Proposals & Contracts: examples/2023-07-proposals-contracts.md - - Reference: - - Shortcuts: keyboard-shortcuts.md - # The function reference (functions.md) is listed above; here is an intentionally non-standard - # link, so that only the above page item gets highlighted when the function reference is open. - - Function reference: /functions/ - - Limits: limits.md - - Data Security: data-security.md - - Browser Support: browser-support.md - - Glossary: glossary.md - +- Welcome to Grist: index.md +- FAQ: FAQ.md +- How-To Tutorials: + - Create your own CRM: lightweight-crm.md + - Analyze and visualize: investment-research.md + - Manage business data: afterschool-program.md +- Managing documents: + - Creating a document: creating-doc.md + - Sharing a document: sharing.md + - Copying documents: copying-docs.md + - Importing more data: imports.md + - Exports & backups: exports.md + - Automatic backups: automatic-backups.md + - Document history: document-history.md + - Workspaces: workspaces.md +- Pages and Tables: + - Entering data: enter-data.md + - Pages & widgets: page-widgets.md + - Raw data page: raw-data.md + - Search, sort & filter: search-sort-filter.md + - Table widget: widget-table.md + - Card & Card List: widget-card.md + - Form: widget-form.md + - Chart: widget-chart.md + - Calendar: widget-calendar.md + - Custom: widget-custom.md + - Linking widgets: linking-widgets.md + - Custom layouts: custom-layouts.md + - Record Cards: record-cards.md + - Summary tables: summary-tables.md + - On-Demand tables: on-demand-tables.md +- Columns and data types: + - Columns & types: col-types.md + - Reference columns: col-refs.md + - Conditional Formatting: conditional-formatting.md + - Timestamp columns: timestamps.md + - Authorship columns: authorship.md + - Transformations: col-transform.md +- Using formulas: + - Intro to formulas: formulas.md + - References and Lookups: references-lookups.md + - Working with dates: dates.md + - Python versions: python.md + - Function reference: functions.md + - Formula Cheat Sheet: formula-cheat-sheet.md +- AI Assistant: + - AI Assistant: ai-assistant.md +- Team Sites: + - Creating team sites: teams.md + - Sharing team sites: team-sharing.md +- Access rules: + - Intro to access rules: access-rules.md +- Integrations: + - REST API usage: rest-api.md + - REST API reference: api.md + - Integrator Services: integrators.md + - Embedding: embedding.md + - Plugin API: + - Intro to Plugin API: code/README.md + - grist-plugin-api: code/modules/grist_plugin_api.md + - '... | flat | **/code/interfaces/**' + - '... | flat | **/code/modules/**' +- Self-Managed: + - Self-managed Grist: self-managed.md + - SAML: install/saml.md + - OIDC: install/oidc.md + - Forwarded headers: install/forwarded-headers.md + - Cloud storage: install/cloud-storage.md + - GristConnect: install/grist-connect.md + - AWS Marketplace: install/aws-marketplace.md + - Telemetry: + - Overview of Telemetry: telemetry.md + - Limited Telemetry: telemetry-limited.md + - Full Telemetry: telemetry-full.md +- News & updates: + - Newsletters: newsletters.md + - 2024/01: newsletters/2024-01.md + - 2023/12: newsletters/2023-12.md + - 2023/11: newsletters/2023-11.md + - 2023/10: newsletters/2023-10.md + - 2023/09: newsletters/2023-09.md + - 2023/08: newsletters/2023-08.md + - 2023/07: newsletters/2023-07.md + - 2023/06: newsletters/2023-06.md + - 2023/05: newsletters/2023-05.md + - 2023/04: newsletters/2023-04.md + - 2023/03: newsletters/2023-03.md + - 2023/02: newsletters/2023-02.md + - 2023/01: newsletters/2023-01.md + - 2022/12: newsletters/2022-12.md + - 2022/11: newsletters/2022-11.md + - 2022/10: newsletters/2022-10.md + - 2022/09: newsletters/2022-09.md + - 2022/08: newsletters/2022-08.md + - 2022/07: newsletters/2022-07.md + - 2022/06: newsletters/2022-06.md + - 2022/05: newsletters/2022-05.md + - 2022/04: newsletters/2022-04.md + - 2022/03: newsletters/2022-03.md + - 2022/02: newsletters/2022-02.md + - 2022/01: newsletters/2022-01.md + - 2021/12: newsletters/2021-12.md + - 2021/11: newsletters/2021-11.md + - 2021/10: newsletters/2021-10.md + - 2021/09: newsletters/2021-09.md + - 2021/08: newsletters/2021-08.md + - 2021/07: newsletters/2021-07.md + - 2021/06: newsletters/2021-06.md + - 2021/05: newsletters/2021-05.md + - 2021/04: newsletters/2021-04.md + - 2021/03: newsletters/2021-03.md + - 2021/02: newsletters/2021-02.md + - 2021/01: newsletters/2021-01.md + - 2020/12: newsletters/2020-12.md + - 2020/11: newsletters/2020-11.md + - 2020/10: newsletters/2020-10.md + - 2020/09: newsletters/2020-09.md + - 2020/08: newsletters/2020-08.md + - 2020/07: newsletters/2020-07.md + - 2020/06: newsletters/2020-06.md + - 2020/05: newsletters/2020-05.md +- More examples: + - More examples: examples.md + - Credit card expenses: examples/2020-06-credit-card.md + - Book club links: examples/2020-06-book-club.md + - Prefill emails: examples/2020-07-email-compose.md + - Prepare Invoices: examples/2020-08-invoices.md + - Track Payroll: examples/2020-09-payroll.md + - Print mailing labels: examples/2020-10-print-labels.md + - Treasure Hunt: examples/2020-11-treasure-hunt.md + - Map: examples/2020-12-map.md + - Task Management: examples/2021-01-tasks.md + - Lead List: examples/2021-03-leads.md + - Link Keys Guide: examples/2021-04-link-keys.md + - Reference Columns Guide: examples/2021-05-reference-columns.md + - Summary Tables Guide: examples/2021-06-timesheets.md + - Time and User Stamps: examples/2021-07-auto-stamps.md + - Restrict Duplicate Records: examples/2023-01-acl-memo.md + - Proposals & Contracts: examples/2023-07-proposals-contracts.md +- Reference: + - Shortcuts: keyboard-shortcuts.md + - Function reference: functions.md + - Limits: limits.md + - Data Security: data-security.md + - Browser Support: browser-support.md + - Glossary: glossary.md extra: - logo: 'images/logo.png' + logo: images/logo.png palette: - primary: 'blue grey' - accent: 'orange' + primary: blue grey + accent: orange font: - text: 'Roboto' - code: 'Roboto Mono' - homepage: '/help' - version: '1.0.2-dev' + text: Roboto + code: Roboto Mono + homepage: /help + version: 1.0.2-dev article_nav_bottom: false history_buttons: false home_links: - - href: https://community.getgrist.com - text: 'Community' - - href: https://www.getgrist.com - text: 'Back to Grist' - hide_on_small_screen: true - google_tag_manager: 'GTM-5FDHKQ9' + - href: https://community.getgrist.com + text: Community + - href: https://www.getgrist.com + text: Back to Grist + hide_on_small_screen: true + google_tag_manager: GTM-5FDHKQ9 + alternate: + - link: / + name: en - English extra_css: - - css/grist.css +- css/grist.css extra_javascript: - - js/grist.js - +- js/grist.js plugins: - - search - - awesome-pages - - htmlproofer: - enabled: !ENV [HTMLPROOFER_ENABLED, false] - validate_external_urls: false - - meta-descriptions - +- search +- awesome-pages +- htmlproofer: + enabled: false + validate_external_urls: false +- meta-descriptions markdown_extensions: toc: - permalink: '#' + permalink: '#' admonition: {} smarty: {} extra: {} diff --git a/requirements.txt b/requirements.txt index d98953148..5311b906e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,8 @@ joblib==0.16.0 livereload==2.6.2 lunr==0.5.8 Markdown==3.2.2 -MarkupSafe==1.1.1 -mkdocs==1.2.3 +MarkupSafe==2.0.1 +mkdocs==1.5.3 mkdocs-awesome-pages-plugin==2.7.0 mkdocs-htmlproofer-plugin==0.8.0 mkdocs-meta-descriptions-plugin==2.0.0 @@ -19,3 +19,4 @@ requests==2.26.0 six==1.15.0 tornado==6.0.4 tqdm==4.48.0 +typer >=0.6.1,<0.8.0 From 6d2a138f4d4a11cba91d87b3e9743187322fd294 Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Wed, 21 Feb 2024 18:22:42 +0100 Subject: [PATCH 03/30] Fix documentation link after mkdocs upgrade --- help/en/docs/afterschool-program.md | 10 +-- help/en/docs/api.md | 2 +- help/en/docs/examples/2020-06-book-club.md | 14 ++--- help/en/docs/examples/2020-06-credit-card.md | 4 +- .../en/docs/examples/2020-07-email-compose.md | 4 +- help/en/docs/examples/2020-08-invoices.md | 60 +++++++++--------- help/en/docs/examples/2020-09-payroll.md | 16 ++--- help/en/docs/examples/2020-10-print-labels.md | 20 +++--- .../en/docs/examples/2020-11-treasure-hunt.md | 10 +-- help/en/docs/examples/2020-12-map.md | 10 +-- help/en/docs/examples/2021-01-tasks.md | 8 +-- help/en/docs/examples/2021-03-leads.md | 14 ++--- .../examples/2023-07-proposals-contracts.md | 62 +++++++++---------- help/en/docs/investment-research.md | 8 +-- help/en/docs/lightweight-crm.md | 2 +- help/en/docs/newsletters/2020-08.md | 2 +- help/en/docs/newsletters/2020-09.md | 2 +- help/en/docs/newsletters/2020-10.md | 2 +- help/en/docs/newsletters/2020-11.md | 2 +- help/en/docs/newsletters/2021-03.md | 2 +- help/en/docs/newsletters/2023-10.md | 2 +- help/en/docs/self-managed.md | 2 +- help/en/docs/widget-custom.md | 8 +-- 23 files changed, 133 insertions(+), 133 deletions(-) diff --git a/help/en/docs/afterschool-program.md b/help/en/docs/afterschool-program.md index a9a4d697e..29c07b8ba 100644 --- a/help/en/docs/afterschool-program.md +++ b/help/en/docs/afterschool-program.md @@ -39,14 +39,14 @@ instructor. When starting from scratch, you'll create a new empty document (see [Creating a document](creating-doc.md)), rename the initial empty table "Table1" to "Classes", add the columns you need, and type in some classes. To follow the steps of this tutorial, you can instead import -[Classes.csv](/unlocalized-assets/afterschool-program/Classes.csv){: data-wm-adjusted=1 } +[Classes.csv](./unlocalized-assets/afterschool-program/Classes.csv){: data-wm-adjusted=1 } (or simply refer to the "Afterschool Program" example document). ![add-classes](images/afterschool-program/add-classes.png) For the Staff table, click the "Add New" button and select "Add Empty Table". Rename it to "Staff", create some columns, and enter some data about instructors. Or import -[Staff.csv](/unlocalized-assets/afterschool-program/Staff.csv) to use sample data and save a few steps. +[Staff.csv](./unlocalized-assets/afterschool-program/Staff.csv) to use sample data and save a few steps. ![add-staff](images/afterschool-program/add-staff.png) @@ -108,7 +108,7 @@ Next, we will continue with students and their enrollments. Each class has a number of students. So, we’ll need a table of students. Again, add a new empty table, rename it to "Students", and fill it with the students’ names, grade levels, etc. Or -import [Students.csv](/unlocalized-assets/afterschool-program/Students.csv) to use sample data and save a few steps. +import [Students.csv](./unlocalized-assets/afterschool-program/Students.csv) to use sample data and save a few steps. ![students-table](images/afterschool-program/students-table.png) @@ -143,7 +143,7 @@ becomes this: {: .screenshot-half } So, let’s add a new table, name it "Enrollments", and add the columns we need. Here too, to follow -along, you may import sample data from [Enrollments.csv](/unlocalized-assets/afterschool-program/Enrollments.csv). +along, you may import sample data from [Enrollments.csv](./unlocalized-assets/afterschool-program/Enrollments.csv). ![enrollments-table](images/afterschool-program/enrollments-table.png) @@ -271,7 +271,7 @@ will likely simplify your daily workflow. So, let’s add one more table: `Families`. We’ll include the parent name and contact info, and link each child to a record here. You can import sample data from -[Families.csv](/unlocalized-assets/afterschool-program/Families.csv). +[Families.csv](./unlocalized-assets/afterschool-program/Families.csv). ![families1](images/afterschool-program/families1.png) diff --git a/help/en/docs/api.md b/help/en/docs/api.md index 3b9b4a96c..a5588be6d 100644 --- a/help/en/docs/api.md +++ b/help/en/docs/api.md @@ -272,7 +272,7 @@ Also note that some query parameters alter this behavior.

Responses

Request samples

Content type
application/json
{
  • "sql": "select * from Pets where popularity >= ?",
  • "args": [
    • 50
    ],
  • "timeout": 500
}

Response samples

Content type
application/json
{
  • "statement": "select * from Pets ...",
  • "records": [
    • {
      • "fields": {
        • "id": 1,
        • "pet": "cat",
        • "popularity": 67
        }
      },
    • {
      • "fields": {
        • "id": 2,
        • "pet": "dog",
        • "popularity": 95
        }
      }
    ]
}