From 56b9ecba50e85b78f35091d69d7e4a779b4720f3 Mon Sep 17 00:00:00 2001 From: Billy Date: Mon, 22 Jul 2024 00:56:51 +0900 Subject: [PATCH] docs: New custom homepage for the documentation website --- .gitignore | 107 ++++++++++++++++++++++++++++++++++++- docs/index.md | 98 +++------------------------------ docs/overrides/home.html | 26 +++++++++ docs/stylesheets/extra.css | 98 +++++++++++++++++++++++++++++++++ mkdocs.yml | 14 +++-- 5 files changed, 246 insertions(+), 97 deletions(-) create mode 100644 docs/overrides/home.html create mode 100644 docs/stylesheets/extra.css diff --git a/.gitignore b/.gitignore index 12ea0713..f3ef9c12 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ extensions/* biscuit.build biscuit.dist + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -22,6 +23,8 @@ dist/ downloads/ eggs/ .eggs/ +lib/ +lib64/ parts/ sdist/ var/ @@ -36,6 +39,7 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest +*.spec # Installer logs pip-log.txt @@ -56,13 +60,112 @@ coverage.xml .pytest_cache/ cover/ -# PEP 582; +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + # Environments +.env .venv env/ venv/ ENV/ env.bak/ -venv.bak/ \ No newline at end of file +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index d5322be2..232e4fb8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,91 +1,7 @@ -

-
- - - - Project License - - Download Latest - - GitHub closed pull requests -

- -A lightweight, fast, and extensible code editor with wide range of language support, runs with very minimal system requirements. It implements the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) for code completions, refactoring, symbol references, and more. Features include breakpoint-based code debugging, AI assisted workflow, fast workspace search, and built-in Git support. Scroll down to see [biscuit in action](https://github.com/tomlin7/Biscuit/tree/main?tab=readme-ov-file#features). - -![image](https://github.com/tomlin7/biscuit/assets/70792552/74118e72-e7de-48dd-a34f-a5abd6664e42) - -- 🎀 Explore all community made extensions and their authors at the [Biscuit Extension Center](https://tomlin7.github.io/biscuit-extensions/) -- 🪛 For contributing/user guides or API reference, check the [documentation here](https://tomlin7.github.io/biscuit) -- 🌟 Scroll down to the [features section](https://github.com/tomlin7/biscuit?tab=readme-ov-file#features) for a list of all features - -## Installing - -You can install the latest release from PyPI by running: - -```bash -pip install biscuit-editor -``` - -Try running `biscuit --version` in your terminal to check if the installation was successful. - -### Standalone Builds - -- Grab the latest stable build from [**releases page**](https://github.com/tomlin7/Biscuit/releases) -- Unstable nightly builds from [GitHub actions](https://github.com/tomlin7/Biscuit/actions) - -For compiling from source code, please check the [installation guide](https://github.com/tomlin7/Biscuit/tree/main/scripts). - -## Contributing ❤️ - -Your contributions are valuable and very much appreciated! -Have a peek at the [contributing guide](https://github.com/tomlin7/Biscuit/blob/main/CONTRIBUTING.md) for a quick tour on project structure and to setup the environment. To contribute a new extension, check the [extension docs](https://github.com/tomlin7/biscuit-extensions). - - - -
- -- For opening feature requests and bug reports, use the [issue tracker](https://github.com/tomlin7/Biscuit/issues) -- Community made extensions are published at the [extensions repository](https://github.com/tomlin7/biscuit-extensions) - -## Features - -- **Language Server Support** for code completions, refactoring, symbol references, and more - -![peek](https://github.com/tomlin7/biscuit/assets/70792552/be132f5b-776c-4045-8a62-c9d29d463762) - - - - - - - - -
- -
- -- **Breakpoint-based Code Debugging** with variable inspection, call stack, and more - -![peek](https://github.com/tomlin7/biscuit/assets/70792552/29541b9e-e084-42bc-85b2-4d7c54cd8d34) - -
- -- **AI Assisted Workflow** for refactoring, code generation, and more - -![peek](https://github.com/tomlin7/biscuit/assets/70792552/97913c12-5493-4783-b1f0-ee904f67ff2d) - -
- -- **Fast Workspace Search** with regex support and file preview - -![peek](https://github.com/tomlin7/biscuit/assets/70792552/de0540b2-2b34-4be6-aa86-97e17a20d47d) - -
- -- **Built-in Git Support** for version control and diff viewer - -![image](https://github.com/tomlin7/biscuit/assets/70792552/ad650048-7e74-420b-bd3a-d0c059ff69cd) - -## License - -Biscuit is released under the MIT License; for more information, see [LICENSE](https://github.com/tomlin7/Biscuit/blob/main/LICENSE.md). +--- +template: home.html +title: Biscuit +social: + cards_layout_options: + title: A lightweight, fast, and extensible code editor with a wide range of language support. +--- diff --git a/docs/overrides/home.html b/docs/overrides/home.html new file mode 100644 index 00000000..ba963b52 --- /dev/null +++ b/docs/overrides/home.html @@ -0,0 +1,26 @@ +{% extends "main.html" %} +{% block tabs %} +{{ super() }} + +
+
+
+
+ +
+
+

Biscuit

+

{{ config.site_description }}. Set up in 5 minutes.

+ + Quick start + + + API Reference + +
+
+
+
+{% endblock %} +{% block content %}{% endblock %} +{% block footer %}{% endblock %} \ No newline at end of file diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 00000000..f853a91c --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,98 @@ +.animate { + filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.06)); + animation: gliding-animation 3s infinite ease-in-out; + transition: all 1s ease-in, filter 0.3s ease-in; +} + +@keyframes gliding-animation { + 50% { + transform: translateY(-15px); + } +} + +.animate:hover, .animate:focus { + transform: scale(1.01); + filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.12)); +} + +.md-banner { + color: var(--md-footer-fg-color--lighter); +} + +.mdx-container { + background: url("data:image/svg+xml;utf8,") + no-repeat bottom, + linear-gradient(to bottom, var(--md-primary-fg-color), #aa6114 99%, var(--md-default-bg-color) 99%); + padding-top: 1rem; +} +[data-md-color-scheme="slate"] .mdx-container { + background: url("data:image/svg+xml;utf8,") + no-repeat bottom, + linear-gradient(to bottom, var(--md-primary-fg-color), #aa6114 99%, var(--md-default-bg-color) 99%); +} + +.mdx-hero { + color: var(--md-primary-bg-color); + margin: 0 3rem; +} + +.mdx-hero h1 { + color: var(--md-primary-bg-color); + font-size: 3rem; + font-weight: 700; + margin-bottom: 1rem; +} + + +@media screen and (max-width:29.984375em) { + .mdx-hero h1 { + font-size: 1.4rem; + } +} +.mdx-hero__content { + padding-bottom: 6rem; +} + +@media screen and (min-width:60em) { + .mdx-hero { + align-items: stretch; + display: flex; + } + .mdx-hero__content { + margin-top: 3.5rem; + max-width: 19rem; + padding-bottom: 14vw; + } + .mdx-hero__image { + order: 1; + transform: translateX(4rem); + width: 38rem; + } +} + +@media screen and (min-width:76.25em) { + .mdx-hero__image { + transform: translateX(15rem) translateY(5rem); + } +} + +.mdx-hero .md-button { + color: var(--md-primary-bg-color); + margin-right: .5rem; + margin-top: .5rem; +} + +.mdx-hero .md-button:focus, .mdx-hero .md-button:hover { + background-color: var(--md-accent-fg-color); + border-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color); +} + +.mdx-hero .md-button--primary { + background-color: var(--md-primary-bg-color); + border-color: var(--md-primary-bg-color); + color: #aa6114; +} + + + diff --git a/mkdocs.yml b/mkdocs.yml index 550aaa73..2ef4fa31 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,21 +5,24 @@ repo_url: "https://github.com/tomlin7/biscuit" repo_name: "tomlin7/biscuit" copyright: Copyright © 2024 Billy +docs_dir: docs + theme: name: "material" + custom_dir: docs/overrides palette: - media: "(prefers-color-scheme: light)" scheme: default - primary: pink - accent: pink + primary: orange + accent: orange toggle: icon: material/weather-sunny name: Switch to dark mode - media: "(prefers-color-scheme: dark)" scheme: slate - primary: black - accent: pink + primary: orange + accent: orange toggle: icon: material/weather-night name: Switch to light mode @@ -39,6 +42,9 @@ plugins: - search - autorefs +extra_css: + - stylesheets/extra.css + nav: - Home: index.md - CLI: cli.md