Move self-hosting guide to the documentation repo
This commit is contained in:
parent
1739b0dd51
commit
6f86bda97f
1 changed files with 2 additions and 28 deletions
30
README.md
30
README.md
|
@ -15,34 +15,8 @@ This utility helps create CSS files to load your fonts from a mirror of Google F
|
|||
|
||||
### Google Fonts Mirror
|
||||
|
||||
Creating a Google Fonts mirror is an easy task. You need the following:
|
||||
1. A reliable server (e.g. a VPS).
|
||||
2. [git](https://git-scm.com/).
|
||||
3. A way to host the files ([Caddy](https://caddyserver.com/), [NGINX](https://www.nginx.com/), [Apache HTTP Server](https://httpd.apache.org/), etc.)
|
||||
4. (Technically this is not a requirement, but you should use one anyway) A domain.
|
||||
|
||||
Then follow the following steps:
|
||||
1. Run `git clone https://github.com/google/fonts --branch main --single-branch --depth 1 [folder]`
|
||||
* `[folder]` should be replaced with the folder where you will save the mirror.
|
||||
* This is just a [shallow clone](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)
|
||||
of the repo. You can just `git clone` the repo, but it's not recommended due to disk and bandwidth usage.
|
||||
2. Serve the files somewhere.
|
||||
* [Caddy](https://caddyserver.com/docs/quick-starts/static-files)
|
||||
* [NGINX](https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/)
|
||||
* [Apache](https://askubuntu.com/questions/556858/how-to-set-up-a-simple-file-server)
|
||||
3. Check that the mirror works by accessing the `[root]/README.md`
|
||||
* `[root]` should be replaced with your domain + the path where it's served (for example, [cdn.sofiaritz.com/fonts](https://cdn.sofiaritz.com/fonts)).
|
||||
* If everything is working, a README.md file like [this one](https://github.com/google/fonts/blob/main/README.md) should be downloaded.
|
||||
4. (Optional) Create a `index.html` file.
|
||||
* You can create a `index.html` file with something you want to tell about the mirror at `[folder]`.
|
||||
* For example, check [cdn.sofiaritz.com/fonts](https://cdn.sofiaritz.com/fonts).
|
||||
* I use that page to teach the users about the dangers of services like Google Fonts, how I handle personal data
|
||||
and my contact information.
|
||||
|
||||
### GFonts Interface
|
||||
|
||||
1. Run `yarn build`.
|
||||
2. Follow step 2 of [Self-hosting § Google Fonts Mirror](#google-fonts-mirror) with the `dist/` folder.
|
||||
> Check the [Documentation repo](https://git.sofiaritz.com/GFonts/documentation/src/branch/main/README.md#self-hosting)
|
||||
> for more information :)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
Loading…
Reference in a new issue