index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2021-10-22 19:44:25.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2021-10-22 19:44:25.0 +00:00:00
commit
bf6ac4d9d42aa59019777ea90437cf964dd824f9 [patch]
tree
de1677611eb60479e6a176d7ad9a3322795ab05d
parent
c3bfa68c43fd52c0f70ba158159390a4f08bf628
download
bf6ac4d9d42aa59019777ea90437cf964dd824f9.tar.gz

docs: base dev server [skip ci]



Diff

 .gitignore                |  2 +-
 Makefile                  |  4 +++-
 docs/assets/rust_logo.svg | 10 +++++++-
 docs/index.md             | 30 +++++++++++++++++++++-
 mkdocs.yml                | 70 ++++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 115 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 3da0fa4..5686bbd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,6 @@
**/*.gz
**/.DS_Store
**/*.env
**/*.svg
**/*.data*
**/*.zst
**/*.out*
@@ -23,3 +22,4 @@ release
TODO

!sample.env
!/docs
diff --git a/Makefile b/Makefile
index ce391b1..f1df13f 100644
--- a/Makefile
+++ b/Makefile
@@ -249,6 +249,10 @@ prod.release.version:
	git push
.ONESHELL: prod.release.version

docs-dev:
	@docker run --rm -it -p 8088:8000 -v $(PWD):/docs squidfunk/mkdocs-material
.PHONY: docs-dev

promote:
	@drone build promote joseluisq/static-web-server $(BUILD) $(ENV)
.PHONY: promote
diff --git a/docs/assets/rust_logo.svg b/docs/assets/rust_logo.svg
new file mode 100644
index 0000000..281d2c4
--- /dev/null
+++ b/docs/assets/rust_logo.svg
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
    <g transform="matrix(0.98522,0,0,0.98522,-13.6364,-13.5473)">
        <path d="M64.591,21.527C40.9,21.527 21.618,40.818 21.618,64.5C21.618,88.182 40.909,107.473 64.591,107.473C88.273,107.473 107.564,88.182 107.564,64.5C107.564,40.818 88.273,21.527 64.591,21.527ZM64.527,25.345C66.045,25.385 67.274,26.649 67.273,28.173C67.265,29.721 65.994,30.993 64.445,31C62.897,30.993 61.626,29.721 61.618,28.173L61.618,28.172C61.626,26.619 62.906,25.345 64.459,25.345C64.482,25.345 64.505,25.345 64.527,25.345ZM71,30C81.039,31.883 89.757,38.092 94.818,46.964L91.482,54.491C90.916,55.786 91.504,57.317 92.791,57.9L99.209,60.745C99.408,62.752 99.433,64.772 99.282,66.782L95.709,66.782C95.355,66.782 95.209,67.018 95.209,67.364L95.209,69C95.209,72.855 93.036,73.7 91.127,73.909C89.309,74.118 87.3,73.145 87.045,72.036C85.973,66.009 84.191,64.727 81.373,62.5C84.873,60.282 88.509,57 88.509,52.618C88.509,47.882 85.264,44.9 83.055,43.436C79.945,41.391 76.509,40.982 75.582,40.982L38.673,40.982C43.776,35.282 50.619,31.421 58.136,30L62.491,34.564C62.975,35.073 63.647,35.362 64.35,35.362C65.012,35.362 65.65,35.105 66.127,34.645L71,30ZM30.818,50.927C32.336,50.977 33.558,52.236 33.564,53.755C33.556,55.303 32.285,56.574 30.736,56.582C29.188,56.574 27.917,55.303 27.909,53.755L27.909,53.754C27.917,52.2 29.197,50.926 30.75,50.926C30.773,50.926 30.795,50.927 30.818,50.927ZM98.227,51.055C99.745,51.105 100.967,52.364 100.973,53.882C100.965,55.43 99.694,56.702 98.145,56.709C96.597,56.702 95.326,55.43 95.318,53.882L95.318,53.881C95.326,52.328 96.606,51.054 98.159,51.054C98.182,51.054 98.205,51.054 98.227,51.055ZM36.145,51.509L41.073,51.509L41.073,73.727L31.127,73.727C29.899,69.414 29.516,64.904 30,60.445L36.091,57.736C37.02,57.324 37.622,56.399 37.622,55.383C37.622,55.022 37.546,54.666 37.4,54.336L36.145,51.509ZM56.709,51.745L68.445,51.745C69.055,51.745 72.727,52.445 72.727,55.2C72.727,57.482 69.909,58.3 67.591,58.3L56.7,58.3L56.709,51.745ZM56.709,67.709L65.7,67.709C66.518,67.709 70.091,67.945 71.227,72.509C71.582,73.909 72.373,78.473 72.909,79.936C73.445,81.573 75.618,84.845 77.936,84.845L92.609,84.845C91.626,86.162 90.55,87.408 89.391,88.573L83.418,87.291C82.034,86.995 80.652,87.889 80.355,89.273L78.936,95.891C69.713,100.067 59.111,100.017 49.927,95.755L48.509,89.136C48.258,87.952 47.203,87.098 45.992,87.098C45.812,87.098 45.631,87.117 45.455,87.155L39.609,88.409C38.524,87.29 37.516,86.1 36.591,84.845L65.018,84.845C65.336,84.845 65.555,84.791 65.555,84.491L65.555,74.436C65.555,74.145 65.336,74.082 65.018,74.082L56.7,74.082L56.709,67.709ZM43.591,90.736C45.108,90.786 46.331,92.045 46.336,93.564C46.329,95.112 45.057,96.383 43.509,96.391C41.961,96.383 40.689,95.112 40.682,93.564L40.682,93.563C40.689,92.009 41.969,90.736 43.523,90.736C43.545,90.736 43.568,90.736 43.591,90.736ZM85.455,90.864C86.972,90.914 88.195,92.173 88.2,93.691C88.193,95.239 86.921,96.511 85.373,96.518C83.825,96.511 82.553,95.239 82.545,93.691L82.545,93.69C82.553,92.137 83.833,90.863 85.386,90.863C85.409,90.863 85.432,90.863 85.455,90.864Z" style="fill:white;fill-rule:nonzero;"/>
    </g>
    <g transform="matrix(0.98522,0,0,0.98522,-13.6364,-13.5473)">
        <path d="M105.164,64.5C105.164,86.757 86.848,105.073 64.591,105.073C42.334,105.073 24.018,86.757 24.018,64.5C24.018,42.243 42.334,23.927 64.591,23.927C86.848,23.927 105.164,42.243 105.164,64.5ZM104.4,60.582L110.727,64.5L104.4,68.418L109.836,73.5L102.873,76.109L107.218,82.155L99.864,83.355L102.955,90.136L95.509,89.873L97.218,97.127L89.964,95.418L90.227,102.864L83.445,99.773L82.245,107.127L76.2,102.782L73.591,109.745L68.509,104.309L64.591,110.636L60.673,104.309L55.591,109.745L52.982,102.782L46.936,107.127L45.736,99.773L38.955,102.864L39.218,95.418L31.964,97.127L33.673,89.873L26.227,90.136L29.318,83.355L21.964,82.155L26.309,76.109L19.345,73.5L24.782,68.418L18.455,64.5L24.782,60.582L19.345,55.5L26.309,52.891L21.964,46.845L29.318,45.645L26.227,38.864L33.673,39.127L31.964,31.873L39.218,33.582L38.955,26.136L45.736,29.227L46.936,21.873L52.982,26.218L55.591,19.255L60.673,24.691L64.591,18.364L68.509,24.691L73.591,19.255L76.2,26.218L82.245,21.873L83.445,29.227L90.227,26.136L89.964,33.582L97.218,31.873L95.509,39.127L102.955,38.864L99.864,45.645L107.218,46.845L102.873,52.891L109.836,55.5L104.4,60.582Z" style="fill:white;stroke:white;stroke-width:2.73px;"/>
    </g>
</svg>
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..5615259
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,30 @@
# Welcome to MkDocs

For full documentation visit [mkdocs.org]https://www.mkdocs.org.

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

```rust
#![deny(warnings)]
#![deny(rust_2018_idioms)]

#[cfg(all(target_env = "musl", target_pointer_width = "64"))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

use static_web_server::{Result, Server};

fn main() -> Result {
    Server::new().run()?;

    Ok(())
}

```
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 0000000..6a61f5f
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,70 @@
# Project information
site_name: Static Web Server
site_description: 'A blazing fast and asynchronous web server for static files-serving ⚡'
site_author: 'Jose Quintana'
site_url: https://joseluisq.github.io/static-web-server/

# Repository
repo_name: joseluisq/static-web-server
repo_url: https://github.com/joseluisq/static-web-server/
edit_uri: ""

# Copyright
copyright: Copyright &copy; 2019-2021 Jose Quintana

# Theme
theme:
  name: 'material'
  logo: assets/rust_logo.svg
  palette:
    - scheme: default
      primary: black
      accent: indigo
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode
    - scheme: slate
      primary: black
      accent: grey
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode
  font:
    text: 'Fira Sans'
    code: 'Droid Sans Mono'
  favicon: https://camo.githubusercontent.com/a08032a2db94aea229991af8f73c45cc95174c8066dc7a6b1f88a79c94cf1093/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f642f64352f527573745f70726f6772616d6d696e675f6c616e67756167655f626c61636b5f6c6f676f2e7376672f3130323470782d527573745f70726f6772616d6d696e675f6c616e67756167655f626c61636b5f6c6f676f2e7376672e706e67

extra:
  social:
    - icon: 'fontawesome/brands/github'
      link: 'https://github.com/joseluisq'
    - icon: 'fontawesome/brands/twitter'
      link: 'https://twitter.com/joseluis_q'

markdown_extensions:
    - codehilite
    - admonition
    - meta
    - toc:
        permalink: true
    - markdown.extensions.tables
    - pymdownx.arithmatex
    - pymdownx.betterem
    - pymdownx.caret
    - pymdownx.critic
    - pymdownx.details
    - pymdownx.emoji:
        emoji_generator: !!python/name:pymdownx.emoji.to_svg
    - pymdownx.magiclink:
        repo_url_shortener: true
        repo_url_shorthand: true
        provider: "github"
        user: "facelessuser"
        repo: "pymdown-extensions"
    - pymdownx.tilde
    - pymdownx.emoji
    - pymdownx.superfences
    - pymdownx.inlinehilite
    - pymdownx.mark
    - pymdownx.smartsymbols
    - pymdownx.tasklist