Phase 6 part 5, step 2: start a new site
Sites → New site fills an empty Gitea repository with the theme, a hugo.toml in the site's brand and a starter home page: checked that the repository is empty and builds with Hugo, then the first commit is pushed to its default branch. The site joins the profile, and a First pages card builds its Home, About, Contact and product pages with the page builder; About and Contact join the top menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{{define "content"}}{{with .Data}}{{$n := .N}}
|
||||
<div class="heading"><h1>A new site</h1></div>
|
||||
<p class="lede">Start a website with Supermarket's theme: federated-website's look and sections, in your brand. Supermarket fills an empty Gitea repository with the theme, the settings and a starter home page; then you build its pages here, as pull requests.</p>
|
||||
|
||||
<section class="card">
|
||||
<h2>1. In Gitea</h2>
|
||||
<p>Create a new, <strong>empty</strong> repository{{with .Gitea}} on <a href="{{.}}/repo/create" target="_blank" rel="noopener noreferrer">{{.}}</a>{{end}}: no README, license or .gitignore. Supermarket makes its first commit.</p>
|
||||
<p class="small muted">Publishing the site is your Gitea's job, as for your other sites: add the deploy hook that builds it with Hugo on your web server, and point the address below at it.</p>
|
||||
{{if not .Gitea}}<p class="warn-text">Save a Gitea token under <a href="/settings/search">Settings → Search engines</a> first.</p>{{end}}
|
||||
</section>
|
||||
|
||||
<form method="post" action="/sites/new" class="card">
|
||||
<h2>2. The site</h2>
|
||||
<div class="cols">
|
||||
<label>Repository <input name="repo" value="{{$n.Repo}}" placeholder="owner/name" required></label>
|
||||
<label>Its address <input name="url" value="{{$n.URL}}" placeholder="https://www.example.com" required></label>
|
||||
</div>
|
||||
<div class="cols">
|
||||
<label>Name <input name="title" value="{{$n.Title}}" placeholder="Acme Widgets" required></label>
|
||||
<label>Contact email <span class="muted">(where forms go until they're connected to EspoCRM)</span> <input name="email" type="email" value="{{$n.Email}}"></label>
|
||||
</div>
|
||||
<label>Tagline <input name="tagline" value="{{$n.Tagline}}" placeholder="What the company does, in a line."></label>
|
||||
|
||||
<h3>Brand</h3>
|
||||
<div class="cols">
|
||||
<label>Dark <span class="muted">(top bar, hero, closing band)</span> <input type="color" name="dark" value="{{$n.Dark}}"></label>
|
||||
<label>Primary <span class="muted">(the main button)</span> <input type="color" name="primary" value="{{$n.Primary}}"></label>
|
||||
<label>Accent <span class="muted">(links, highlights)</span> <input type="color" name="accent" value="{{$n.Accent}}"></label>
|
||||
</div>
|
||||
<div class="cols">
|
||||
<label>Font <select name="font">{{range .Fonts}}<option {{if eq . $n.Font}}selected{{end}}>{{.}}</option>{{end}}</select></label>
|
||||
<label>Logo <span class="muted">(optional: an image's https:// address, or a path on the site; without one, the name shows)</span> <input name="logo" value="{{$n.Logo}}"></label>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button type="submit" data-busy="Starting the site…" {{if not .Gitea}}disabled{{end}}>Start the site</button>
|
||||
</div>
|
||||
<p class="small muted">It checks the repository is empty and builds the site with Hugo before pushing anything. Colors, font and logo can be changed later in the site's <code>hugo.toml</code>.</p>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user