mirror of https://git.sr.ht/~sircmpwn/srht.site
Initial commit
This commit is contained in:
commit
93a2e7f8de
|
@ -0,0 +1 @@
|
|||
public
|
|
@ -0,0 +1,26 @@
|
|||
Copyright 2018 Drew DeVault <sir@cmpwn.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
After Width: | Height: | Size: 233 B |
|
@ -0,0 +1 @@
|
|||
.chroma { background-color: #f0f0f0 } .chroma .err { } .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } .chroma .hl { display: block; width: 100%;background-color: #d8d8d8 } .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } .chroma .k { color: #007020; font-weight: bold } .chroma .kc { color: #007020; font-weight: bold } .chroma .kd { color: #007020; font-weight: bold } .chroma .kn { color: #007020; font-weight: bold } .chroma .kp { color: #007020 } .chroma .kr { color: #007020; font-weight: bold } .chroma .kt { color: #902000 } .chroma .na { color: #4070a0 } .chroma .nb { color: #007020 } .chroma .nc { color: #0e84b5; font-weight: bold } .chroma .no { color: #60add5 } .chroma .nd { color: #555555; font-weight: bold } .chroma .ni { color: #d55537; font-weight: bold } .chroma .ne { color: #007020 } .chroma .nf { color: #06287e } .chroma .nl { color: #002070; font-weight: bold } .chroma .nn { color: #0e84b5; font-weight: bold } .chroma .nt { color: #062873; font-weight: bold } .chroma .nv { color: #bb60d5 } .chroma .s { color: #4070a0 } .chroma .sa { color: #4070a0 } .chroma .sb { color: #4070a0 } .chroma .sc { color: #4070a0 } .chroma .dl { color: #4070a0 } .chroma .sd { color: #4070a0; font-style: italic } .chroma .s2 { color: #4070a0 } .chroma .se { color: #4070a0; font-weight: bold } .chroma .sh { color: #4070a0 } .chroma .si { color: #70a0d0; font-style: italic } .chroma .sx { color: #c65d09 } .chroma .sr { color: #235388 } .chroma .s1 { color: #4070a0 } .chroma .ss { color: #517918 } .chroma .m { color: #40a070 } .chroma .mb { color: #40a070 } .chroma .mf { color: #40a070 } .chroma .mh { color: #40a070 } .chroma .mi { color: #40a070 } .chroma .il { color: #40a070 } .chroma .mo { color: #40a070 } .chroma .o { color: #666666 } .chroma .ow { color: #007020; font-weight: bold } .chroma .c { color: #60a0b0; font-style: italic } .chroma .ch { color: #60a0b0; font-style: italic } .chroma .cm { color: #60a0b0; font-style: italic } .chroma .c1 { color: #60a0b0; font-style: italic } .chroma .cs { color: #60a0b0; background-color: #fff0f0 } .chroma .cp { color: #007020 } .chroma .cpf { color: #007020 } .chroma .gd { color: #a00000 } .chroma .ge { font-style: italic } .chroma .gr { color: #ff0000 } .chroma .gh { color: #000080; font-weight: bold } .chroma .gi { color: #00a000 } .chroma .go { color: #888888 } .chroma .gp { color: #c65d09; font-weight: bold } .chroma .gs { font-weight: bold } .chroma .gu { color: #800080; font-weight: bold } .chroma .gt { color: #0044dd } .chroma .gl { text-decoration: underline } .chroma .w { color: #bbbbbb }
|
|
@ -0,0 +1,520 @@
|
|||
@import "hl";
|
||||
|
||||
/* gaze ye upon my spaghetti, and despair */
|
||||
$black: #212529;
|
||||
$primary: #007bff;
|
||||
$danger: #dc3545;
|
||||
|
||||
html, body {
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
color: $black;
|
||||
background-color: white;
|
||||
font-family: sans-serif;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
|
||||
@media (min-width: 960px) {
|
||||
width: 960px;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 0.3rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.service-grid {
|
||||
margin-top: 2rem;
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: unset;
|
||||
background-color: unset;
|
||||
font-style: italic;
|
||||
padding-left: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.index-grid, .service-grid {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
grid-template-columns: 4fr 2fr;
|
||||
grid-gap: 1rem;
|
||||
|
||||
@media(max-width: 960px) {
|
||||
display: block;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.left {
|
||||
grid-column-start: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
grid-column-start: 2;
|
||||
}
|
||||
}
|
||||
|
||||
img, video {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.4);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #eee;
|
||||
padding: 0.5rem;
|
||||
margin: 0 -0.5rem 1rem;
|
||||
overflow-x: auto;
|
||||
|
||||
code {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
background: #eee;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.pricing-grid {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-gap: 1rem;
|
||||
|
||||
@media(max-width: 960px) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.col-1 {
|
||||
grid-column-start: 1;
|
||||
}
|
||||
|
||||
.col-2 {
|
||||
grid-column-start: 2;
|
||||
}
|
||||
|
||||
.col-3 {
|
||||
grid-column-start: 3;
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
padding: 0.5rem 1rem 0 1rem;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
|
||||
a:not(:first-child):not(.btn) {
|
||||
margin-left: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.brand {
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: $black !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
font-size: 1.25rem;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
|
||||
.icon {
|
||||
width: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width: 720px) {
|
||||
.hidden-small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
line-height: .75em;
|
||||
|
||||
path {
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
width: 0.4em;
|
||||
vertical-align: -0.17em;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $primary;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: darken($primary, 15);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: .1rem .75rem;
|
||||
background: #e9ecef;
|
||||
border: #343a40 1px solid;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
border-radius: 0;
|
||||
transition: color .15s ease-in-out,
|
||||
background-color .15s ease-in-out,
|
||||
border-color .15s ease-in-out,
|
||||
box-shadow .15s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background: #f8f9fa;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
&.btn-primary {
|
||||
border: #001933 1px solid;
|
||||
background: #007bff;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: #0069d9;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-info {
|
||||
border: #062a30 1px solid;
|
||||
background: #17a2b8;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: #138496;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="password"], input[type="email"] {
|
||||
display: block;
|
||||
width: calc(100% - 1rem);
|
||||
border: 1px solid #888;
|
||||
padding: .375rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
|
||||
border-radius: 0;
|
||||
|
||||
&:focus {
|
||||
outline: 0;
|
||||
border-color: #80bdff;
|
||||
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding: 0.5rem;
|
||||
border: 1px solid transparent;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
&.alert-danger {
|
||||
background: #f8d7da;
|
||||
color: #721c24;
|
||||
border-color: #f5c6cb;
|
||||
}
|
||||
|
||||
&.alert-info {
|
||||
background: #d1ecf1;
|
||||
color: #0c5460;
|
||||
border-color: #bee5eb;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.3rem;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
padding-bottom: 0.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.1rem;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
padding-bottom: 0.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.event {
|
||||
padding: 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
background: #f5f5f5;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
*:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
*:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
margin-top: 0.5rem;
|
||||
min-height: auto;
|
||||
display: flex;
|
||||
padding: 0.5rem 0;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
background: darken($primary, 10);
|
||||
border-width: 1px 0;
|
||||
border-color: #001933;
|
||||
border-style: solid;
|
||||
|
||||
.heading {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding: 0.25rem 1rem;
|
||||
margin: 0 -1rem 0.5rem -1rem;
|
||||
background: rgba(255, 255, 255, 1.0);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
|
||||
@media (max-width: 960px) {
|
||||
margin: 0 -1rem 0.5rem -1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
small {
|
||||
color: darken($primary, 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.inline-header {
|
||||
h1 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.info a {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-bottom: 0.25rem;
|
||||
color: white;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
footer, .infobox {
|
||||
p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
background: #f4f4f4;
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
strong, h4 {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
form {
|
||||
max-width: 480px;
|
||||
margin: 0;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
margin: 1rem 0;
|
||||
text-align: center;
|
||||
|
||||
& > * {
|
||||
margin-right: 2rem;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer blockquote {
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
max-width: 600px;
|
||||
margin: 1rem auto;
|
||||
color: #444;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.stub {
|
||||
h2 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
article.content {
|
||||
max-width: 720px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: calc(-4px - 1rem);
|
||||
margin-right: calc(-4px - 1rem);
|
||||
padding: 0.25rem 1rem;
|
||||
border-left: 4px solid #333;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
iframe {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
details {
|
||||
padding: 0 1rem;
|
||||
margin: 0 -1rem 1rem;
|
||||
|
||||
summary {
|
||||
background: #dee2e6;
|
||||
padding: 0 1rem;
|
||||
margin: 0 -1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&[open] {
|
||||
padding: 0 1rem;
|
||||
margin-left: calc(-1rem - 4px);
|
||||
border-left: 4px solid #dee2e6;
|
||||
}
|
||||
}
|
||||
|
||||
.projects {
|
||||
padding-top: 2rem;
|
||||
|
||||
.content {
|
||||
background: #f4f4f4;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
padding: 1rem;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
|
||||
& > *:not(:last-child) {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.call-to-action {
|
||||
@extend .event;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
p {
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.btn {
|
||||
white-space: nowrap;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
baseURL = "https://srht.site/"
|
||||
title = "Sourcehut pages"
|
||||
pygmentsUseClasses = true
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe= true
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: sourcehut pages
|
||||
---
|
||||
|
||||
sourcehut pages is a tool which allows you to publish static websites. Every
|
||||
[sourcehut](https://sourcehut.org) user receives the `username.srht.site`
|
||||
domain, and you can your own domain as well.
|
||||
|
||||
- Any content generator, including Jekyll, Hugo, Doxygen, or your cool new one
|
||||
- Automatic, zero-config TLS
|
||||
- Use our domain or BYOD
|
||||
|
||||
<div class="call-to-action" style="margin-bottom: 2rem">
|
||||
<p>Ready to get started? You can get published in 3 minutes.</p>
|
||||
<a href="/quickstart" class="btn btn-primary">
|
||||
Quick start
|
||||
<span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### Resources for website builders
|
||||
|
||||
- [Quick start](/quickstart)
|
||||
- [Custom domains](/custom-domains)
|
||||
- [Automating deployments](/automating-deployments)
|
||||
- [Limitations](/limitations)
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: Automating deployments
|
||||
---
|
||||
|
||||
## Automating deployments
|
||||
|
||||
It's not a good idea to repeat the [quick start process](/quickstart.md) every
|
||||
time you want to update your site. So let's automate it!
|
||||
|
||||
### Create your repository
|
||||
|
||||
First, create a repository on [git.sr.ht](https://git.sr.ht/create) or
|
||||
[hg.sr.ht](https://hg.sr.ht/create) named after your website (e.g.
|
||||
"your-username.srht.pages"), and push your website's source code to it.
|
||||
|
||||
<div class="alert alert-info">
|
||||
Unfamiliar with git or hg? <a href="https://man.sr.ht/tutorials/set-up-account-and-git.md">Check out the tutorial</a>.
|
||||
</div>
|
||||
|
||||
### Writing the build manifest
|
||||
|
||||
We'll be using [builds.sr.ht](https://man.sr.ht/builds.sr.ht) to automate
|
||||
building and deploying our site. Create a file named ".build.yml" and fill it in
|
||||
with this template:
|
||||
|
||||
```
|
||||
image: alpine/latest
|
||||
oauth: pages.sr.ht/PAGES:RW
|
||||
environment:
|
||||
site: your-username.srht.site
|
||||
tasks:
|
||||
- package: |
|
||||
cd $site
|
||||
tar -cvz . > ../site.tar.gz
|
||||
- upload: |
|
||||
acurl https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
|
||||
```
|
||||
|
||||
Update the `site` variable to your desired website (e.g.
|
||||
"your-username.srht.site"). You can also add additional steps under `tasks`
|
||||
and `package` to call a static site generator and bundle your website
|
||||
differently. Once you're done, commit this file to your repository and push. A
|
||||
URL will be printed to your console which you can click on to follow the
|
||||
progress on deploying your site. Once it's done, that's it - your site will be
|
||||
re-published every time you push.
|
||||
|
||||
<div class="alert alert-info">
|
||||
Not sure how to build your static site with a build manifest? We have some
|
||||
examples for common static site generators available in the <a
|
||||
href="https://git.sr.ht/~sircmpwn/pages.sr.ht-examples">example pages
|
||||
repository</a>.
|
||||
</div>
|
||||
|
||||
For more information about using builds.sr.ht, consult
|
||||
[the builds.sr.ht documentation](https://man.sr.ht/builds.sr.ht).
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: Custom domains
|
||||
---
|
||||
|
||||
## Custom domains with sourcehut pages
|
||||
|
||||
In order to use a custom domain, you must first configure your website's DNS
|
||||
records accordingly. You can do this at your domain registrar's dashboard.
|
||||
|
||||
### Second-level domains
|
||||
|
||||
Simply add a CNAME record which points to `pages.sr.ht.` (the period at the end
|
||||
is important!). For exmaple, to add foobar.example.org (in bind format):
|
||||
|
||||
```
|
||||
foobar IN CNAME pages.sr.ht.
|
||||
```
|
||||
|
||||
That's it! Just substitute your domain name in place of `username.srht.site`
|
||||
when you publish. <a href="/quickstart">Back to the quick start <span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
||||
</span></a>
|
||||
|
||||
### Top level domains
|
||||
|
||||
To add a domain like `example.org`, you need to add an A record which points to
|
||||
`173.195.146.139`.
|
||||
|
||||
```
|
||||
@ IN A 173.195.146.139
|
||||
```
|
||||
|
||||
<div class="alert alert-danger">
|
||||
We reserve the right to change this IP address. If your site will be affected,
|
||||
we'll send you an email at least 30 days in advance.
|
||||
Make sure your email address
|
||||
<a href="https://meta.sr.ht/profile">is up to date</a>!
|
||||
</div>
|
||||
|
||||
That's it! Just substitute your domain name in place of `username.srht.site`
|
||||
when you publish. <a href="/quickstart">Back to the quick start <span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
||||
</span></a>
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
title: Limitations
|
||||
---
|
||||
|
||||
## Limitations
|
||||
|
||||
You can publish almost any kind of content (limited by the [terms of service][0],
|
||||
of course), but there are some technical limitations in place via a
|
||||
content-security policy which is applied to all sr.ht pages sites. Our full CSP
|
||||
header is:
|
||||
|
||||
[0]: https://man.sr.ht/terms.md
|
||||
|
||||
```
|
||||
Content-Security-Policy:
|
||||
default-src 'self' 'unsafe-eval' 'unsafe-inline';
|
||||
sandbox allow-forms allow-orientation-lock allow-pointer-lock allow-presentation allow-scripts;
|
||||
```
|
||||
|
||||
The main consequence of this is that all resources must be served from
|
||||
your domain — you cannot use a CDN or embed third-party content.
|
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
title: Quick start
|
||||
---
|
||||
|
||||
## Quick start with sourcehut pages
|
||||
|
||||
The steps for publishing your site are:
|
||||
|
||||
1. [Generate a personal access token][pat]
|
||||
2. Create a tarball with your website's contents.
|
||||
3. Upload your tarball to pages.sr.ht
|
||||
|
||||
Once you're live, we'll look at ways to automate the process.
|
||||
|
||||
### Your personal access token
|
||||
|
||||
You can [generate a personal access token][pat] on meta.sr.ht. Write it down for
|
||||
later reference.
|
||||
|
||||
[pat]: https://meta.sr.ht/oauth2/personal-token
|
||||
|
||||
### Building your tarball
|
||||
|
||||
Here's a simple example. Let's say you write this file to `index.html`:
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<title>My sourcehut page</title>
|
||||
<h1>My sourcehut page</h1>
|
||||
<p>Welcome to my cool sourcehut page!
|
||||
```
|
||||
|
||||
You can create a tarball for it like so:
|
||||
|
||||
```
|
||||
$ tar -cvz index.html > site.tar.gz
|
||||
```
|
||||
|
||||
Add any number of files other than index.html to expand this.
|
||||
|
||||
**Using a static site generator**
|
||||
|
||||
Here's another example for a website using [Hugo](https://gohugo.io):
|
||||
|
||||
```
|
||||
$ hugo
|
||||
$ tar -C public -cvz . > site.tar.gz
|
||||
```
|
||||
|
||||
You can use any tool, just so long as it outputs static content.
|
||||
|
||||
### Uploading your tarball
|
||||
|
||||
Once you have a tarball, upload it to pages.sr.ht:
|
||||
|
||||
```
|
||||
$ curl --oauth2-bearer "access token" \
|
||||
-F@site.tar.gz \
|
||||
https://pages.sr.ht/publish/username.srht.site
|
||||
```
|
||||
|
||||
Substitute "access token" with your personal access token, and username with
|
||||
your sr.ht username.
|
||||
|
||||
<div class="event">
|
||||
Want to use your own domain name? <a href="/custom-domains">Review the extra
|
||||
steps here</a>.
|
||||
</div>
|
||||
|
||||
Once you run this command, your website should now be live at
|
||||
`https://username.srht.site`! The first load will take an extra second or two
|
||||
while we obtain a TLS certificate for you.
|
||||
|
||||
<div class="alert alert-info call-to-action" style="align-items: flex-start">
|
||||
<p>
|
||||
Need some help building your site?
|
||||
<a href="https://gohugo.io" rel="noopener">Hugo</a>
|
||||
is a good choice for getting up and running quickly with a nice theme for
|
||||
your site. We recommend it for users new to static site generation. Feel
|
||||
free to set up a site you like, then come back when you're ready to publish
|
||||
it.
|
||||
</p>
|
||||
<a href="https://gohugo.io/getting-started/quick-start/" class="btn btn-primary" rel="noopener">
|
||||
Hugo Quick Start
|
||||
<span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## Next: Automating deployments
|
||||
|
||||
Next: <a href="/automating-deployments">Automating deployments <span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
||||
</span></a>
|
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
{{ partial "head.html" }}
|
||||
<title>{{.Title}} | sourcehut pages</title>
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" }}
|
||||
<main>
|
||||
<article class="content">
|
||||
{{.Content}}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "footer.html" }}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{- .Content | html -}}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -0,0 +1,38 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{.Title}}</title>
|
||||
{{ partial "head.html" }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" }}
|
||||
<main style="padding-bottom: 1rem">
|
||||
{{ range .Data.Pages }}
|
||||
<div class="content stub">
|
||||
<h2>
|
||||
<a href="{{.Permalink}}">
|
||||
{{.Title}}
|
||||
</a>
|
||||
</h2>
|
||||
<small>
|
||||
{{.Date.Format "January 2, 2006"}}
|
||||
by {{.Params.author}}
|
||||
</small>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="content" style="margin-top: 1rem">
|
||||
<p>
|
||||
<a href="/blog/index.xml">RSS feed</a>
|
||||
</p>
|
||||
<p>
|
||||
More historical posts are available on the
|
||||
<a
|
||||
href="https://lists.sr.ht/~sircmpwn/sr.ht-announce"
|
||||
rel="noopener"
|
||||
>sr.ht-announce archives</a>.
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "footer.html" }}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{.Title}}</title>
|
||||
{{ partial "head.html" }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" }}
|
||||
<main>
|
||||
<header>
|
||||
<div class="heading">
|
||||
<div class="info">
|
||||
<div class="content">
|
||||
{{.Date.Format "January 2, 2006"}}
|
||||
by {{.Params.author}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1>
|
||||
{{.Title}}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<article class="content">
|
||||
{{.Content}}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "footer.html" }}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "head.html" }}
|
||||
<title>{{.Title}}</title>
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" }}
|
||||
<main>
|
||||
<article class="content">
|
||||
<h1>{{.Title}}</h1>
|
||||
{{.Content}}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "footer.html" }}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<footer>
|
||||
<div class="footer-links">
|
||||
<span>
|
||||
© {{ dateFormat "2006" now }} sr.ht, LLC
|
||||
</span>
|
||||
<a
|
||||
href="https://man.sr.ht/privacy.md"
|
||||
rel="noopener"
|
||||
>Privacy Policy</a>
|
||||
<a
|
||||
href="https://man.sr.ht/terms.md"
|
||||
rel="noopener"
|
||||
>Terms of Use</a>
|
||||
<span>
|
||||
<a
|
||||
href="https://sr.ht/~sircmpwn/sourcehut/"
|
||||
rel="noopener"
|
||||
>Source Code</a>
|
||||
<small class="text-muted">(AGPL, BSD et al)</small>
|
||||
</span>
|
||||
</div>
|
||||
<blockquote>
|
||||
We are here to make free software better. We will be honest, transparent,
|
||||
and empathetic. We care for our users, and we will not exploit them, and
|
||||
we hope that they will reward our care and diligence with success.
|
||||
</blockquote>
|
||||
</footer>
|
|
@ -0,0 +1,8 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description"
|
||||
content="sourcehut is a network of useful open source tools for software project maintainers and collaborators, including git repos, bug tracking, continuous integration, and mailing lists." />
|
||||
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIGCC8n92KyhQAAAj1QTFRFAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////anIwUQAAAL50Uk5TAAECAwQFBgcICQoLDA4PEBESExQVFhcYGRobHB0eHyAhIyQmJygpKistLzAzNDU2Nzg5Ozw9QEFDREZHSElLTE1OT1BRVFdYWVpbXF1eX2BhZGZnaGltbnBxdHV3eHp7fn+AgYKDhIWGh4iJio2TlJucnqGio6Smp6ipqqusrbCxsrO0tre4ury9vr/Cw8TFxsfIycrMzc7P0dLT1dbY2dvf4OLj5OXm5+jq6+zt7u/w8fL09fb3+Pn6+/z9/gNzyOkAAAABYktHRL6k3IPDAAAFwUlEQVQYGe3B+VtUVQAG4G9i0TQZZyA1S0JxydzDNFTUqXBfcylzS8UE21TMyjAQUQnFEi0BHQU3cAc0UGbm+9v65Zw7y70zc++dc3qenof3xZAhQ4b8T+V/uGn/kdrm1psdHTdbm2uP7Ns434//yLD5e+u7aOH+6T0ludBszGf1L5jC87rNBdDm9XXnw0wrfG71cOhQ9N0z2vTk20Ko9t5PYToQOj4FKr17IkKHwtUToMobVQN0of/rkVDik7t06c5yZC7/V1rqajq6f9vKQFlZYNW2A0cvdNPSL35kaPEDmgxerFiSjwQFZQebQzTpKkUmsg4xUX/Nijwk4V15aoAJIhVZcM13ngnatuQhJe/WNiY464VLE28xXsMCD9LyLDzLeMEiuDLzIeM0zIRNs88xTvcMuFDSx1htC+FA6XXG6pkLx0qeM8aLHdlwJGfnP4zRNw8OzexjjOaJcGzSn4zR8z4cmfiQUZF9WXAhuyLCqO4iOOC7xahni+BSWQ+jgl7YlnWeUR3FcG1qJ6MasmDXIUZdexMZGNvGqAOwaTGjrnqREd/fNERKYUvBAxqueZEhXzsNXX7Y8SsNHW8iY+M6afgZNnxKw7NiKDCtl4YA0nrjHqXIIiixjIY7I5FOFQ37oEglDZVIo+glpeYsKJJ9mdJAIVI7QenFRChT3E+pGim9F6G0AwrtohSeglR+otSWDYVygpSqkUJRmNJCKLWEUmgCkvuOUgPU8vxO6TCSev0ZpZlQ7ANKj4YhmXWUGqBcI6UVSOY8pQVQbhGlM0hiTJhCmwfKeW5QCPlh7TNKW6DBdkobYa2eQn8eNPC9pPAbLA17QaEGWtRS6MuBlfmUVkCLtZTmwspeCoN50MIXprATVuopXIQmLRROwUoXhQpoUkXhNizkU1oCTZZRyoPZh5Tyock4SnNgtolCF3TxPKKwBmb7KTRBm0sUdsPsCIWj0OY4hR9gVkthP7SppHASZs0UtkGbLyg0wqyVwkpos4FCC8xuUghAm3IK7TDroFAGbQIUgjDroFAGbQIUgjC7SSEAbcoptMOslcIqaLOBQgvMmilsgzY7KDTCrJbCAWhTReEkzI5QOAptfqTwPcz2UbgAbS5R2AWzjRS6oYvnMYXVMJtPqQCavEVpNsz8lMqgyXJKo2DhPoWD0OQwhU5YOU2hGZpcoVADK3sohLzQwh+h8CWslFBaCS3WUZoDK7nPKZyCFnUUerNh6TSFAS808L+iUANrmylthQafU1oPawVhCm0eKOcJUhgcjSTOUVoI5RZTqkMyqymdhXJNlMqRzPAnlGZDsRJKD3OR1LeUzkEtTxOlSiRXGKL0EZRaSmlwPFI4Tul6DhTKvUXpGFKZEqa0EwrtoRQqRkrVlP6ZBGUmD1A6htQm9FP6IxuK5Fyl1P8O0viahgoo8g0NB5HOyDuUImVQ4mMabo9AWgEaeqZCgel9NCyFDb/Q0DkWGXv7Lg0nYIe/i4Y2HzKUf4OGe6NhS2mEhr98yEh+Kw3hBbCpglHt45CB8TcY9RXsyjrLqM5pcG36XUadfg22eYOM6l0Glz7uY9T1UXCg6AFjHMqGCznfMMb9Qjgyo4cxLhfDsclXGePpdDg0r48x+nflwJHcPQOM0TsLjs3rYazgEtjnWXqLsZ7Oggszuhnn9w9gU0kT49yfDleKgozXuMiDtDyLmxjveiFc8jYwwY3tPqTk/zzIBPWj4FpWRYQJXtau9SEJ/7q6V0wQ/uo1ZKK0iybhlqplYxHP89byw1ciNLm3ABny/0xLjy4dr/xiQ3kgUL5hR9WPlx7T0onRyFzgDl26vRRKjKwcoAv9B0dAlcLqMB0KH3sHKk2pDtGBwWPFUG3C4Ue06WHleOgwbMWZENMarCvPhTb+jb/1MYXemvWjoVnO3J2nbtNCZ82Xc7LxH8mbs2b3DycbW9qDwfaWxpPf71o9exSGDBky5P/pX9F6dsCMuJp+AAAAAElFTkSuQmCC" />
|
||||
{{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/blog/index.xml">
|
|
@ -0,0 +1,19 @@
|
|||
<div>
|
||||
<nav>
|
||||
<span class="brand">
|
||||
<span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"/></svg>
|
||||
</span>
|
||||
<a href="/">
|
||||
sourcehut pages
|
||||
</a>
|
||||
</span>
|
||||
<a href="https://sourcehut.org">what is sourcehut?</a>
|
||||
<a href="https://sr.ht" class="btn pull-right hidden-small">
|
||||
Go to sr.ht
|
||||
<span class="icon">
|
||||
{{ (resources.Get "caret-right.svg").Content | safeHTML }}
|
||||
</span>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
|
@ -0,0 +1,17 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
width="128" height="128">
|
||||
<defs>
|
||||
<filter id="shadow" x="-10%" y="-10%" width="125%" height="125%">
|
||||
<feDropShadow dx="0" dy="0" stdDeviation="1.5"
|
||||
flood-color="black" />
|
||||
</filter>
|
||||
<filter id="text-shadow" x="-10%" y="-10%" width="125%" height="125%">
|
||||
<feDropShadow dx="0" dy="0" stdDeviation="1.5"
|
||||
flood-color="#AAA" />
|
||||
</filter>
|
||||
</defs>
|
||||
<circle cx="50%" cy="50%" r="38%" stroke="white" stroke-width="4%"
|
||||
fill="none" filter="url(#shadow)" />
|
||||
<circle cx="50%" cy="50%" r="38%" stroke="white" stroke-width="4%"
|
||||
fill="none" filter="url(#shadow)" />
|
||||
</svg>
|
After Width: | Height: | Size: 670 B |
Loading…
Reference in New Issue