- New 'Import Obsidian' action on site settings page - Upload a zip file of an Obsidian vault to import all notes as posts - Markdown notes imported with title from filename, published date from file timestamp, and body with front-matter stripped - Images and other attachments saved as Upload records - New obsimport service handles zip traversal and import logic - Unit tests for front-matter stripping Co-authored-by: Shelley <shelley@exe.dev>
77 lines
2.9 KiB
HTML
77 lines
2.9 KiB
HTML
<main class="container">
|
|
<!--
|
|
<ul class="nav nav-pills justify-content-center my-3">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" aria-current="page" href="#">General</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#">Feeds</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#">Publish</a>
|
|
</li>
|
|
</ul>
|
|
-->
|
|
|
|
<div>
|
|
<form method="post" action="/sites/{{ .site.ID }}/settings">
|
|
<div>
|
|
<h5 class="my-4">Site Settings</h5>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="siteName" class="col-sm-3 col-form-label text-end">Site Name</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" id="siteName" name="name" value="{{ .site.Title }}">
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="siteTagline" class="col-sm-3 col-form-label text-end">Site Tagline</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" class="form-control" id="siteTagline" name="tagline" value="{{ .site.Tagline }}">
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="timezone" class="col-sm-3 col-form-label text-end">Timezone</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" list="tzoneList" class="form-control" id="timezone" name="timezone" value="{{ .site.Timezone }}">
|
|
<datalist id="tzoneList">
|
|
{{ range .tzones }}
|
|
<option value="{{ . }}">{{ . }}</option>
|
|
{{ end }}
|
|
</datalist>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="postsPerPage" class="col-sm-3 col-form-label text-end">Posts Per Page</label>
|
|
<div class="col-sm-3">
|
|
<input type="number" class="form-control" id="postsPerPage" name="postsPerPage" value="{{ .site.PostsPerPage }}" min="1" max="100">
|
|
<div class="form-text">Number of posts per page on the generated site.</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-9"><button type="submit" class="btn btn-primary">Save Settings</button></div>
|
|
</div>
|
|
</form>
|
|
<hr>
|
|
<div>
|
|
<h5 class="my-4">Manage</h5>
|
|
</div>
|
|
<form action="/sites/{{ .site.ID }}/rebuild" method="post">
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-9">
|
|
<button type="submit" class="btn btn-secondary">Rebuild</button>
|
|
<span class="form-text mx-3">Trigger a full rebuild of the site.</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-9">
|
|
<a href="/sites/{{ .site.ID }}/import/obsidian" class="btn btn-secondary">Import Obsidian</a>
|
|
<span class="form-text mx-3">Import posts and attachments from an Obsidian vault zip file.</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main> |