Skip to content

Commit

Permalink
Style changes for mobile (#2863)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Dec 3, 2023
1 parent a0adf36 commit 22bc8d1
Show file tree
Hide file tree
Showing 61 changed files with 468 additions and 74 deletions.
2 changes: 1 addition & 1 deletion guide/config/en/sidebar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ root:
path: guide/running/configuration.html
- label: Development
path: guide/running/development.html
- label: Server
- label: Running Sanic
path: guide/running/running.html
- label: Worker Manager
path: guide/running/manager.html
Expand Down
63 changes: 63 additions & 0 deletions guide/content/en/built-with-sanic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Full Speed Ahead - How We Built This Site with Sanic
layout: main
---

.. attrs::
:class: title

Full Speed Ahead:

.. attrs::
:class: subtitle

How We Built This Site with Sanic

Welcome to our little corner of the Internet where we proudly say, "Yes, we built this with Sanic!" This isn't just a website; it's our playground, our test lab, our battlefield, and, well, our home.

![](/assets/images/built-with-sanic.png)

### The Story: "We Drink Our Own Champagne"

We believe in Sanic so much that we decided to put it to the ultimate test—running our own website. It's like a chef eating at their own restaurant, only with less risk of food poisoning.

Why? Because building a website or web application is hard. There are countless moving parts, a plethora of challenges, and the ever-present need for speed and reliability. We want to show you just one of the many ways you *could* do it.

In this high-stakes digital kitchen, Sanic is our secret ingredient. By deploying our own website on Sanic, we're not just showcasing its capabilities; we're stress-testing them in the real world. This is our chance to walk the walk, proving that Sanic isn't just good on paper—it's a robust, high-performance framework that can handle everything from the smallest blog to the busiest e-commerce site.

So, here we are, sipping our own champagne, confident in the knowledge that if Sanic can run our site, it can power yours too. Cheers to coding at the speed of thought! 🥂

### The Setup: Digital Ocean, Ahoy!

We launched our site on Digital Ocean's App Platform because we love high-performance cloud sailing. Think of it as having a Ferrari in the cloud—fast, sleek, but way easier to handle.

Why go for simplicity? With a lean team and no DevOps gurus, we needed a no-fuss, straightforward solution. Digital Ocean gives us that smooth sailing platform-as-a-service (PaaS) experience. It’s perfect for our needs: easy setup, automatic deployments, and the kind of reliability that lets you sleep soundly.

Our choice reflects our ethos: focus on your strengths and let the platform do the heavy lifting. For us, it means creating amazing web experiences with Sanic, supported by a deployment solution that's simple yet powerful. ⛵

### The Code: GitHub's Where It's At

All our code is out in the open, basking in the glory of public scrutiny on GitHub. Why hide the magic? It's right there, in full view, at [our GitHub repository](https://github.com/sanic-org/sanic/tree/main/guide). Go ahead, take a peek, fork it, play with it, break it (and then kindly fix it).

Open-source isn't just a buzzword for us; it's our ethos. It's about building something bigger than ourselves, together. Our code is a testament to collaborative innovation, a playground for development, and a real-life example of Sanic in action.

Every line of code, every commit, reflects our journey with Sanic, showcasing how we leverage its speed and scalability. Your contributions, whether fixing a bug, suggesting a feature, or enhancing documentation, are what propel this project forward.

So, dive in, contribute your genius, and let's keep shaping the future of web development with Sanic. Together, we're not just coding – we're creating a community-driven powerhouse. 🚀

### The Invitation: Write, Code, Break, Fix!

- **Documentarians**: Love making complex stuff sound easy? Our docs are your canvas. Paint away in words! 🎨

- **Code Ninjas**: Find bugs? Squash 'em. Got ideas? Code 'em. Make pull requests rain! 🥷

- **Bug Hunters**: If you find bugs, don't just stare. Let us know. We love a good bug hunt. 🐛

### The Bottom Line

We built this site with Sanic to show off what it can do. It's fast, it's fun, and it's what we use. So, if things load swiftly, pat us on the back. If they don't, well, uh... we blame cosmic rays?

Join us in making Sanic not just good, but "I-can't-believe-it's-not-butter" good!

Cheers,
The Sanic Team (who occasionally wear capes)
4 changes: 4 additions & 0 deletions guide/content/en/guide/basics/app.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Application
---

# Sanic Application

See API docs: [sanic.app](/api/sanic.app)
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/basics/tasks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Background tasks
---

# Background tasks

## Creating Tasks
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/how-to/table-of-contents.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Table of Contents
---

# Table of Contents

We have compiled fully working examples to answer common questions and user cases. For the most part, the examples are as minimal as possible, but should be complete and runnable solutions.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/how-to/tls.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: TLS/SSL/HTTPS
---

# TLS/SSL/HTTPS

> How do I run Sanic via HTTPS?
Expand Down
4 changes: 2 additions & 2 deletions guide/content/en/guide/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

Sanic is a Python 3.7+ web server and web framework that’s written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy.
Sanic is a Python 3.8+ web server and web framework that’s written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy.

.. attrs::
:class: introduction-table
Expand All @@ -21,7 +21,7 @@ First things first, before you jump in the water, you should know that Sanic is

Right there in that first sentence there is a huge mistake because Sanic is _both_ a **framework** and a **web server**. In the deployment section we will talk a little bit more about this.

But, remember, out of the box Sanic comes with everything you need to write, deploy, and scale a production grade web application. :rocket:
But, remember, out of the box Sanic comes with everything you need to write, deploy, and scale a production grade web application. 🚀

## Goal

Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/running/app-loader.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Dynamic Applications
---

# Dynamic Applications

Running Sanic has been optimized to work with the CLI. If you have not read it yet, you should read [Running Sanic](./running.md#sanic-server) to become familiar with the options.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/running/manager.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Worker Manager
---

# Worker Manager

The worker manager and its functionality was introduced in version 22.9.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/guide/running/running.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Running Sanic
---

# Running Sanic

Sanic ships with its own internal web server. Under most circumstances, this is the preferred method for deployment. In addition, you can also deploy Sanic as an ASGI app bundled with an ASGI-able web server.
Expand Down
1 change: 1 addition & 0 deletions guide/content/en/help.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Need some help?
layout: main
---

Expand Down
8 changes: 4 additions & 4 deletions guide/content/en/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: The lightning-fast asynchronous Python web framework
layout: home
features:
- title: Simple and lightweight
Expand All @@ -15,7 +16,7 @@ features:
details: The project is maintained and run by the community for the community.
---

## ⚡ The lightning-fast asynchronous Python web framework
### ⚡ The lightning-fast asynchronous Python web framework

.. attrs::
:class: columns is-multiline mt-6
Expand Down Expand Up @@ -73,7 +74,6 @@ features:

**And some {span:has-text-primary:you wouldn't believe}.**


.. tab:: Production-grade

After installing, Sanic has all the tools you need for a scalable, production-grade server—out of the box!
Expand Down Expand Up @@ -304,8 +304,8 @@ features:
From the moment it is installed, Sanic includes helpful tools to help the developer get their job done.

- **One server** - Develop locally in DEV mode on the same server that will run your PRODUCTION application
- **Auto reload** - Reload running applications every time you save a Python fil, but also auto-reload **on any arbitrary directory** like HTML template directories
- **Debuggin tools** - Super helpful (and beautiful) [error pages](/en/guide/best-practices/exceptions) that help you traverse the trace stack easily
- **Auto reload** - Reload running applications every time you save a Python file, but also auto-reload **on any arbitrary directory** like HTML template directories
- **Debugging tools** - Super helpful (and beautiful) [error pages](/en/guide/best-practices/exceptions) that help you traverse the trace stack easily
- **Auto TLS** - Running a localhost website with `https` can be difficult, [Sanic makes it easy](/en/guide/how-to/tls)
- **Streamlined testing** - Built-in testing capabilities, making it easier for developers to create and run tests, ensuring the quality and reliability of their services
- **Modern Python** - Thoughtful use of type hints to help the developer IDE experience
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Configuration
---

# Configuration

Sanic Extensions can be configured in all of the same ways that [you can configure Sanic](../../guide/deployment/configuration.md). That makes configuring Sanic Extensions very easy.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/convenience.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Convenience
---

# Convenience

## Fixed serializer
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/custom.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Custom
---

# Custom extensions

It is possible to create your own custom extensions.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Getting Started
---

# Getting Started

Sanic Extensions is an *officially supported* plugin developed, and maintained by the SCO. The primary goal of this project is to add additional features to help Web API and Web application development easier.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/health-monitor.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Health Monitor
---

# Health monitor

The health monitor requires both `sanic>=22.9` and `sanic-ext>=22.9`.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/http/cors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - CORS protection
---

# CORS protection

Cross-Origin Resource Sharing (aka CORS) is a *huge* topic by itself. The documentation here cannot go into enough detail about *what* it is. You are highly encouraged to do some research on your own to understand the security problem presented by it, and the theory behind the solutions. [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) are a great first step.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/http/methods.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - HTTP Methods
---

# HTTP Methods

## Auto-endpoints
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/injection.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Dependency Injection
---

# Dependency Injection

Dependency injection is a method to add arguments to a route handler based upon the defined function signature. Specifically, it looks at the **type annotations** of the arguments in the handler. This can be useful in a number of cases like:
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/logger.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Background logger
---

# Background logger

The background logger requires both `sanic>=22.9` and `sanic-ext>=22.9`.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - OAS
---

# Openapi

- Adding documentation with decorators
Expand Down
Empty file.
6 changes: 5 additions & 1 deletion guide/content/en/plugins/sanic-ext/openapi/advanced.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: Sanic Extensions - Advanced OAS
---

# Advanced

_Documentation coming EOQ1 2023_
_Documentation in progress_

## CBV

Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi/autodoc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Auto-documentation
---

# Auto-documentation

To make documenting endpoints easier, Sanic Extensions will use a function's docstring to populate your documentation.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi/basics.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Basic OAS
---

# Basics


Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi/decorators.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - OAS Decorators
---

# Decorators

The primary mechanism for adding content to your schema is by decorating your endpoints. If you have
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi/security.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - OAS Security Schemes
---

# Security Schemes

To document authentication schemes, there are two steps.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/openapi/ui.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - OAS UI
---

# UI

Sanic Extensions comes with both Redoc and Swagger interfaces. You have a choice to use one, or both of them. Out of the box, the following endpoints are setup for you, with the bare `/docs` displaying Redoc.
Expand Down
6 changes: 6 additions & 0 deletions guide/content/en/plugins/sanic-ext/templating/html5tagger.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
---
title: Sanic Extensions - html5tagger
---

# Coming soon

See [GitHub])(https://github.com/sanic-org/html5tagger/)
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/templating/jinja.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Jinja
---

# Templating

Sanic Extensions can easily help you integrate templates into your route handlers.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-ext/validation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Extensions - Validation
---

# Validation

One of the most commonly implemented features of a web application is user-input validation. For obvious reasons, this is not only a security issue, but also just plain good practice. You want to make sure your data conforms to expectations, and throw a `400` response when it does not.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-testing/clients.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Testing - Test Clients
---

# Test Clients

There are three different test clients available to you, each of them presents different capabilities.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/plugins/sanic-testing/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Sanic Testing - Getting Started
---

# Getting Started

Sanic Testing is the *official* testing client for Sanic. Its primary use is to power the tests of the Sanic project itself. However, it is also meant as an easy-to-use client for getting your API tests up and running quickly.
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/release-notes/2021/v21.12.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Version 21.12 (LTS)
---

# Version 21.12 (LTS)

.. toc::
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/release-notes/2021/v21.3.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Version 21.3
---

# Version 21.3

.. toc::
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/release-notes/2021/v21.6.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Version 21.6
---

# Version 21.6

.. toc::
Expand Down
4 changes: 4 additions & 0 deletions guide/content/en/release-notes/2021/v21.9.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Version 21.9
---

# Version 21.9

.. toc::
Expand Down
6 changes: 5 additions & 1 deletion guide/content/en/release-notes/2022/v22.12.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Version 22.12
---
title: Version 22.12 (LTS)
---

# Version 22.12 (LTS)

.. toc::

Expand Down
Loading

0 comments on commit 22bc8d1

Please sign in to comment.