@daz4126/swifty 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/config.yaml +11 -0
- package/css/custom.css +30 -0
- package/css/simple.css +1267 -0
- package/dist/about.html +26 -0
- package/dist/css/custom.css +30 -0
- package/dist/css/simple.css +1267 -0
- package/dist/docs/configuration.html +17 -0
- package/dist/docs/folder-structure.html +21 -0
- package/dist/docs/get-started.html +17 -0
- package/dist/docs/layouts.html +28 -0
- package/dist/docs/pages.html +17 -0
- package/dist/docs/partials.html +17 -0
- package/dist/docs/template.html +20 -0
- package/dist/docs.html +60 -0
- package/dist/images/horizon.jpg +0 -0
- package/dist/images/lights.jpg +0 -0
- package/dist/images/raspberries.jpg +0 -0
- package/dist/index.html +98 -0
- package/dist/tags/about.html +16 -0
- package/dist/tags/config.html +19 -0
- package/dist/tags/docs.html +21 -0
- package/dist/tags/swifty.html +23 -0
- package/dist/tags/todo.html +15 -0
- package/dist/tags.html +16 -0
- package/dist/test.html +91 -0
- package/images/horizon.jpg +0 -0
- package/images/lights.jpg +0 -0
- package/images/raspberries.jpg +0 -0
- package/init.js +55 -0
- package/layouts/default.html +5 -0
- package/layouts/docs.html +10 -0
- package/package.json +41 -0
- package/pages/about.md +36 -0
- package/pages/docs/configuration.md +20 -0
- package/pages/docs/folder-structure.md +27 -0
- package/pages/docs/get-started.md +9 -0
- package/pages/docs/layouts.md +50 -0
- package/pages/docs/pages.md +24 -0
- package/pages/docs/partials.md +24 -0
- package/pages/docs/template.md +15 -0
- package/pages/index.md +42 -0
- package/pages/test.md +34 -0
- package/partials/docs.md +9 -0
- package/partials/number.md +9 -0
- package/partials/pages.md +9 -0
- package/serve.json +5 -0
- package/swifty.js +446 -0
- package/template.html +22 -0
- package/test/swifty.test.js +78 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Configuration || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/configuration.html" data-turbo-frame="content" data-turbo-action="advance">Configuration</a></div>
|
|
6
|
+
<h1>Configuration</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div></div>
|
|
9
|
+
<p class="text-s bold">Configuration options</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</turbo-frame>
|
|
17
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Folder Structure || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/folder-structure.html" data-turbo-frame="content" data-turbo-action="advance">Folder Structure</a></div>
|
|
6
|
+
<h1>Folder Structure</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a></div></div>
|
|
9
|
+
<p class="text-s bold">How to structure folders</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
<p>Any pages placed insdie a folder will become sub-pages of that folder. The path to these pages will reflect the folder structure.</p>
|
|
13
|
+
<p>So if there are two pages .</p>
|
|
14
|
+
<p>Order of Pages</p>
|
|
15
|
+
<p>Index Partials</p>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</turbo-frame>
|
|
21
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Get Started || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/get-started.html" data-turbo-frame="content" data-turbo-action="advance">Get Started</a></div>
|
|
6
|
+
<h1>Get Started</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/todo.html" data-turbo-frame="content" data-turbo-action="advance">todo</a></div></div>
|
|
9
|
+
<p class="text-s bold">Install and set up Swifty.</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</turbo-frame>
|
|
17
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Layouts || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/layouts.html" data-turbo-frame="content" data-turbo-action="advance">Layouts</a></div>
|
|
6
|
+
<h1>Layouts</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div></div>
|
|
9
|
+
<p class="text-s bold">Using layouts</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
<p>Layouts are used to add content before and after the main page content.</p>
|
|
13
|
+
<p>They go in the layouts folder and are always HTML files.</p>
|
|
14
|
+
<p>Place <code>{{ content }}</code> at the point where you want the page content to be inserted.</p>
|
|
15
|
+
<h2>Default layouts</h2>
|
|
16
|
+
<p>By default every page tries to apply the layout named after the folder they are in. So if a page is inside a folder called 'posts' then it will try to apply a layout called 'posts.html', otherwise it will apply the layout called 'default.html'. Top level pages apply the 'default.html' layout. </p>
|
|
17
|
+
<p>You can specify a particular layout for a page by adding the 'layout' propety to the front matter data of a page. The following will try to apply the layout called 'special_layout.html':</p>
|
|
18
|
+
<pre><code>---
|
|
19
|
+
layout: special_layout
|
|
20
|
+
---
|
|
21
|
+
</code></pre>
|
|
22
|
+
<p>If a layout file doesn't exist then it is no layout will be applied.</p>
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</turbo-frame>
|
|
28
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Pages || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/pages.html" data-turbo-frame="content" data-turbo-action="advance">Pages</a></div>
|
|
6
|
+
<h1>Pages</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div></div>
|
|
9
|
+
<p class="text-s bold">Creating pages</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</turbo-frame>
|
|
17
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Partials || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/partials.html" data-turbo-frame="content" data-turbo-action="advance">Partials</a></div>
|
|
6
|
+
<h1>Partials</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div></div>
|
|
9
|
+
<p class="text-s bold">Using partials to reuse content</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</turbo-frame>
|
|
17
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Template || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a> » <a class="swifty_breadcrumb" href="/docs/template.html" data-turbo-frame="content" data-turbo-action="advance">Template</a></div>
|
|
6
|
+
<h1>The Template File</h1>
|
|
7
|
+
<div class="post-info italic text-xs">Posted by Taylor Swift on Tue, 25 Mar 2025</div>
|
|
8
|
+
<div class="tags"><div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a><a class="tag" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div></div>
|
|
9
|
+
<p class="text-s bold">Setting up the template file</p>
|
|
10
|
+
<div class="serif-font">
|
|
11
|
+
|
|
12
|
+
<p>The template file is the main template that includes all of the html that is included in every page.</p>
|
|
13
|
+
<p>This should contain the main HTML.</p>
|
|
14
|
+
<p>The placeholder <code>{{ content }}</code> should go where the main content from any page will go.</p>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</turbo-frame>
|
|
20
|
+
|
package/dist/docs.html
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Docs || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/docs.html" data-turbo-frame="content" data-turbo-action="advance">Docs</a></div>
|
|
6
|
+
<h1>Docs</h1>
|
|
7
|
+
|
|
8
|
+
<div class="docs">
|
|
9
|
+
<!-- markdown content starts -->
|
|
10
|
+
|
|
11
|
+
<h3><a href="/docs/get-started.html">Get Started</a></h3>
|
|
12
|
+
<h5>Install and set up Swifty.</h5>
|
|
13
|
+
<!-- markdown content ends -->
|
|
14
|
+
</div>
|
|
15
|
+
<div class="docs">
|
|
16
|
+
<!-- markdown content starts -->
|
|
17
|
+
|
|
18
|
+
<h3><a href="/docs/configuration.html">Configuration</a></h3>
|
|
19
|
+
<h5>Configuration options</h5>
|
|
20
|
+
<!-- markdown content ends -->
|
|
21
|
+
</div>
|
|
22
|
+
<div class="docs">
|
|
23
|
+
<!-- markdown content starts -->
|
|
24
|
+
|
|
25
|
+
<h3><a href="/docs/folder-structure.html">Folder Structure</a></h3>
|
|
26
|
+
<h5>How to structure folders</h5>
|
|
27
|
+
<!-- markdown content ends -->
|
|
28
|
+
</div>
|
|
29
|
+
<div class="docs">
|
|
30
|
+
<!-- markdown content starts -->
|
|
31
|
+
|
|
32
|
+
<h3><a href="/docs/template.html">The Template File</a></h3>
|
|
33
|
+
<h5>Setting up the template file</h5>
|
|
34
|
+
<!-- markdown content ends -->
|
|
35
|
+
</div>
|
|
36
|
+
<div class="docs">
|
|
37
|
+
<!-- markdown content starts -->
|
|
38
|
+
|
|
39
|
+
<h3><a href="/docs/pages.html">Pages</a></h3>
|
|
40
|
+
<h5>Creating pages</h5>
|
|
41
|
+
<!-- markdown content ends -->
|
|
42
|
+
</div>
|
|
43
|
+
<div class="docs">
|
|
44
|
+
<!-- markdown content starts -->
|
|
45
|
+
|
|
46
|
+
<h3><a href="/docs/layouts.html">Layouts</a></h3>
|
|
47
|
+
<h5>Using layouts</h5>
|
|
48
|
+
<!-- markdown content ends -->
|
|
49
|
+
</div>
|
|
50
|
+
<div class="docs">
|
|
51
|
+
<!-- markdown content starts -->
|
|
52
|
+
|
|
53
|
+
<h3><a href="/docs/partials.html">Partials</a></h3>
|
|
54
|
+
<h5>Using partials to reuse content</h5>
|
|
55
|
+
<!-- markdown content ends -->
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
</turbo-frame>
|
|
60
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Swifty</title>
|
|
7
|
+
<meta name="turbo-refresh-method" content="morph">
|
|
8
|
+
<link rel="stylesheet" href="/css/custom.css" />
|
|
9
|
+
<link rel="stylesheet" href="/css/simple.css" />
|
|
10
|
+
|
|
11
|
+
<script type="module">
|
|
12
|
+
import * as Turbo from 'https://esm.sh/@hotwired/turbo';
|
|
13
|
+
const turboFrame = document.querySelector("turbo-frame#content");
|
|
14
|
+
function loadFrameContent() {
|
|
15
|
+
const path = window.location.pathname;
|
|
16
|
+
if(path !== "/") {
|
|
17
|
+
turboFrame.style.visibility = "hidden";
|
|
18
|
+
const pagePath = path.endsWith(".html") ? path : path + ".html";
|
|
19
|
+
if (turboFrame) Turbo.visit(pagePath, { frame: "content" });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
loadFrameContent();
|
|
23
|
+
window.addEventListener("popstate", loadFrameContent);
|
|
24
|
+
document.addEventListener("turbo:frame-load", event => {
|
|
25
|
+
turboFrame.style.visibility = "visible";
|
|
26
|
+
window.scrollTo(0,0);
|
|
27
|
+
const frameSrc = turboFrame.getAttribute("src");
|
|
28
|
+
if (frameSrc && frameSrc.endsWith(".html")) {
|
|
29
|
+
const newPath = frameSrc.replace(".html", "");
|
|
30
|
+
if (window.location.pathname !== newPath) {
|
|
31
|
+
window.history.pushState({}, "", newPath);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
document.querySelectorAll('#content a[href]').forEach(link => {
|
|
35
|
+
const href = link.getAttribute('href');
|
|
36
|
+
if (href.startsWith('#') || href.startsWith('http') || href === "/") return;
|
|
37
|
+
link.setAttribute('data-turbo-frame', 'content');
|
|
38
|
+
link.setAttribute('data-turbo-action', 'advance');
|
|
39
|
+
link.setAttribute('href', href.endsWith(".html") ? href : href + ".html");
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<header class="sticky dropshadow opacity-9 align-vertical space-between">
|
|
46
|
+
<a href="/" class="logo">S</a>
|
|
47
|
+
<nav class="tabs"><li><a href="/about.html" class="swifty_link" data-turbo-frame="content">About</a></li>
|
|
48
|
+
<li><a href="/docs.html" class="swifty_link" data-turbo-frame="content">Docs</a></li>
|
|
49
|
+
<li><a href="/test.html" class="swifty_link" data-turbo-frame="content">Test</a></li></nav>
|
|
50
|
+
</header>
|
|
51
|
+
<main>
|
|
52
|
+
|
|
53
|
+
<turbo-frame id="content">
|
|
54
|
+
<head><title>Home || Swifty</title></head>
|
|
55
|
+
|
|
56
|
+
<section class="container text-center no-margin">
|
|
57
|
+
<h1 class="display-l fancy-font logo no-margin">Swifty</h1>
|
|
58
|
+
<div class="gradient-text display-s text-center margin-y">The Super Speedy Static Site Generator!</div>
|
|
59
|
+
</section>
|
|
60
|
+
|
|
61
|
+
<div class="align-center gap-s">
|
|
62
|
+
<a class="button" href="/about">Learn Swifty</a>
|
|
63
|
+
<a class="button" href="/docs">Swifty Docs</a>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<section class="highlight container text-center">
|
|
68
|
+
|
|
69
|
+
<h2>Create a Website in No Time!</h2>
|
|
70
|
+
<p>Swifty is the next generation of static site generator. It lets you write all your content in MarkDown and then builds the whole site based on your folder structure with pretty urls and super fast navigation.</p>
|
|
71
|
+
<p><img src="/images/lights.jpg" alt="Hazy Lights"></p>
|
|
72
|
+
</section>
|
|
73
|
+
|
|
74
|
+
<section class="container text-center">
|
|
75
|
+
|
|
76
|
+
<h2>Super Flexible</h2>
|
|
77
|
+
<p>You can conditionally add layouts to pages as well as using partials for content that is created. Pages can dynamically insert data into the content using front matter notation.</p>
|
|
78
|
+
<p><img src="/images/raspberries.jpg" alt="Raspberries"></p>
|
|
79
|
+
</section>
|
|
80
|
+
|
|
81
|
+
<section class="highlight container text-center">
|
|
82
|
+
|
|
83
|
+
<h2>Extra Features</h2>
|
|
84
|
+
<p>Swifty includes lots of extra features to make site creation simple:</p>
|
|
85
|
+
<p>Tags and tag links are automatically generated, helper methods can be used to add breadcrumb links and site navigation, custom CSS and JS is automatically added to the site</p>
|
|
86
|
+
<p><img src="/images/horizon.jpg" alt="Horizon"></p>
|
|
87
|
+
</section>
|
|
88
|
+
|
|
89
|
+
</turbo-frame>
|
|
90
|
+
|
|
91
|
+
</main>
|
|
92
|
+
<footer>
|
|
93
|
+
<p>This site was built with Swifty, the super speedy static site generator.</p>
|
|
94
|
+
<p><a href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">All Tags</a></p>
|
|
95
|
+
</footer>
|
|
96
|
+
</body>
|
|
97
|
+
</html>
|
|
98
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>about || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a> » <a class="swifty_breadcrumb" href="/tags/about.html" data-turbo-frame="content" data-turbo-action="advance">about</a></div>
|
|
6
|
+
<h1>Pages tagged with About</h1>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<li><a href="/about.html" data-turbo-frame="content" data-turbo-action="advance">About</a></li>
|
|
10
|
+
<li><a href="/test.html" data-turbo-frame="content" data-turbo-action="advance">Test</a></li>
|
|
11
|
+
</ul>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</turbo-frame>
|
|
16
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>config || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a> » <a class="swifty_breadcrumb" href="/tags/config.html" data-turbo-frame="content" data-turbo-action="advance">config</a></div>
|
|
6
|
+
<h1>Pages tagged with Config</h1>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<li><a href="/docs/configuration.html" data-turbo-frame="content" data-turbo-action="advance">Configuration</a></li>
|
|
10
|
+
<li><a href="/docs/layouts.html" data-turbo-frame="content" data-turbo-action="advance">Layouts</a></li>
|
|
11
|
+
<li><a href="/docs/pages.html" data-turbo-frame="content" data-turbo-action="advance">Pages</a></li>
|
|
12
|
+
<li><a href="/docs/partials.html" data-turbo-frame="content" data-turbo-action="advance">Partials</a></li>
|
|
13
|
+
<li><a href="/docs/template.html" data-turbo-frame="content" data-turbo-action="advance">Template</a></li>
|
|
14
|
+
</ul>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
</turbo-frame>
|
|
19
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>docs || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a> » <a class="swifty_breadcrumb" href="/tags/docs.html" data-turbo-frame="content" data-turbo-action="advance">docs</a></div>
|
|
6
|
+
<h1>Pages tagged with Docs</h1>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<li><a href="/docs/configuration.html" data-turbo-frame="content" data-turbo-action="advance">Configuration</a></li>
|
|
10
|
+
<li><a href="/docs/folder-structure.html" data-turbo-frame="content" data-turbo-action="advance">Folder Structure</a></li>
|
|
11
|
+
<li><a href="/docs/get-started.html" data-turbo-frame="content" data-turbo-action="advance">Get Started</a></li>
|
|
12
|
+
<li><a href="/docs/layouts.html" data-turbo-frame="content" data-turbo-action="advance">Layouts</a></li>
|
|
13
|
+
<li><a href="/docs/pages.html" data-turbo-frame="content" data-turbo-action="advance">Pages</a></li>
|
|
14
|
+
<li><a href="/docs/partials.html" data-turbo-frame="content" data-turbo-action="advance">Partials</a></li>
|
|
15
|
+
<li><a href="/docs/template.html" data-turbo-frame="content" data-turbo-action="advance">Template</a></li>
|
|
16
|
+
</ul>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
</turbo-frame>
|
|
21
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>swifty || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a> » <a class="swifty_breadcrumb" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a></div>
|
|
6
|
+
<h1>Pages tagged with Swifty</h1>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<li><a href="/about.html" data-turbo-frame="content" data-turbo-action="advance">About</a></li>
|
|
10
|
+
<li><a href="/docs/configuration.html" data-turbo-frame="content" data-turbo-action="advance">Configuration</a></li>
|
|
11
|
+
<li><a href="/docs/folder-structure.html" data-turbo-frame="content" data-turbo-action="advance">Folder Structure</a></li>
|
|
12
|
+
<li><a href="/docs/get-started.html" data-turbo-frame="content" data-turbo-action="advance">Get Started</a></li>
|
|
13
|
+
<li><a href="/docs/layouts.html" data-turbo-frame="content" data-turbo-action="advance">Layouts</a></li>
|
|
14
|
+
<li><a href="/docs/pages.html" data-turbo-frame="content" data-turbo-action="advance">Pages</a></li>
|
|
15
|
+
<li><a href="/docs/partials.html" data-turbo-frame="content" data-turbo-action="advance">Partials</a></li>
|
|
16
|
+
<li><a href="/docs/template.html" data-turbo-frame="content" data-turbo-action="advance">Template</a></li>
|
|
17
|
+
<li><a href="/test.html" data-turbo-frame="content" data-turbo-action="advance">Test</a></li>
|
|
18
|
+
</ul>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
</turbo-frame>
|
|
23
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>todo || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a> » <a class="swifty_breadcrumb" href="/tags/todo.html" data-turbo-frame="content" data-turbo-action="advance">todo</a></div>
|
|
6
|
+
<h1>Pages tagged with Todo</h1>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<li><a href="/docs/get-started.html" data-turbo-frame="content" data-turbo-action="advance">Get Started</a></li>
|
|
10
|
+
</ul>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
</turbo-frame>
|
|
15
|
+
|
package/dist/tags.html
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>All Tags || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">Tags</a></div>
|
|
6
|
+
<h1>All Tags</h1>
|
|
7
|
+
|
|
8
|
+
<li><a href="/tags/swifty.html" class="swifty_link" data-turbo-frame="content">swifty</a></li>
|
|
9
|
+
<li><a href="/tags/about.html" class="swifty_link" data-turbo-frame="content">about</a></li>
|
|
10
|
+
<li><a href="/tags/docs.html" class="swifty_link" data-turbo-frame="content">docs</a></li>
|
|
11
|
+
<li><a href="/tags/config.html" class="swifty_link" data-turbo-frame="content">config</a></li>
|
|
12
|
+
<li><a href="/tags/todo.html" class="swifty_link" data-turbo-frame="content">todo</a></li>
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</turbo-frame>
|
|
16
|
+
|
package/dist/test.html
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
<turbo-frame id="content">
|
|
3
|
+
<head><title>Test || Swifty</title></head>
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="breadcrumbs"><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/test.html" data-turbo-frame="content" data-turbo-action="advance">Test</a></div>
|
|
6
|
+
<h1>About Swifty</h1>
|
|
7
|
+
|
|
8
|
+
<h2>Breadcrumbs</h2>
|
|
9
|
+
<p><a class="swifty_breadcrumb" href="/" data-turbo-frame="content" data-turbo-action="advance">Home</a> » <a class="swifty_breadcrumb" href="/test.html" data-turbo-frame="content" data-turbo-action="advance">Test</a></p>
|
|
10
|
+
<h2>Nav</h2>
|
|
11
|
+
<li><a href="/about.html" class="swifty_link" data-turbo-frame="content">About</a></li>
|
|
12
|
+
<li><a href="/docs.html" class="swifty_link" data-turbo-frame="content">Docs</a></li>
|
|
13
|
+
<li><a href="/test.html" class="swifty_link" data-turbo-frame="content">Test</a></li>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<h2>links_to_children</h2>
|
|
17
|
+
<h2>links_to_siblings</h2>
|
|
18
|
+
<div class="docs">
|
|
19
|
+
<!-- markdown content starts -->
|
|
20
|
+
|
|
21
|
+
<h3><a href="/about.html">About Swifty!!!!!!!!</a></h3>
|
|
22
|
+
<p>OG + FM = JOG</p>
|
|
23
|
+
<!-- markdown content ends -->
|
|
24
|
+
</div>
|
|
25
|
+
<div class="docs">
|
|
26
|
+
<!-- markdown content starts -->
|
|
27
|
+
|
|
28
|
+
<h3><a href="/docs.html">Docs!!!!!!!!</a></h3>
|
|
29
|
+
<p>OG + FM = JOG</p>
|
|
30
|
+
<!-- markdown content ends -->
|
|
31
|
+
</div>
|
|
32
|
+
<div class="docs">
|
|
33
|
+
<!-- markdown content starts -->
|
|
34
|
+
|
|
35
|
+
<h3><a href="/">Home!!!!!!!!</a></h3>
|
|
36
|
+
<p>OG + FM = JOG</p>
|
|
37
|
+
<!-- markdown content ends -->
|
|
38
|
+
</div>
|
|
39
|
+
<div class="docs">
|
|
40
|
+
<!-- markdown content starts -->
|
|
41
|
+
|
|
42
|
+
<h3><a href="/tags.html">All Tags!!!!!!!!</a></h3>
|
|
43
|
+
<p>OG + FM = JOG</p>
|
|
44
|
+
<!-- markdown content ends -->
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<h2>links_to_self_and_siblings</h2>
|
|
49
|
+
<div class="docs">
|
|
50
|
+
<!-- markdown content starts -->
|
|
51
|
+
|
|
52
|
+
<h3><a href="/about.html">About Swifty!!!!!!!!</a></h3>
|
|
53
|
+
<p>OG + FM = JOG</p>
|
|
54
|
+
<!-- markdown content ends -->
|
|
55
|
+
</div>
|
|
56
|
+
<div class="docs">
|
|
57
|
+
<!-- markdown content starts -->
|
|
58
|
+
|
|
59
|
+
<h3><a href="/docs.html">Docs!!!!!!!!</a></h3>
|
|
60
|
+
<p>OG + FM = JOG</p>
|
|
61
|
+
<!-- markdown content ends -->
|
|
62
|
+
</div>
|
|
63
|
+
<div class="docs">
|
|
64
|
+
<!-- markdown content starts -->
|
|
65
|
+
|
|
66
|
+
<h3><a href="/">Home!!!!!!!!</a></h3>
|
|
67
|
+
<p>OG + FM = JOG</p>
|
|
68
|
+
<!-- markdown content ends -->
|
|
69
|
+
</div>
|
|
70
|
+
<div class="docs">
|
|
71
|
+
<!-- markdown content starts -->
|
|
72
|
+
|
|
73
|
+
<h3><a href="/test.html">About Swifty!!!!!!!!</a></h3>
|
|
74
|
+
<p>OG + FM = JOG</p>
|
|
75
|
+
<!-- markdown content ends -->
|
|
76
|
+
</div>
|
|
77
|
+
<div class="docs">
|
|
78
|
+
<!-- markdown content starts -->
|
|
79
|
+
|
|
80
|
+
<h3><a href="/tags.html">All Tags!!!!!!!!</a></h3>
|
|
81
|
+
<p>OG + FM = JOG</p>
|
|
82
|
+
<!-- markdown content ends -->
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<h2>links_to_tags</h2>
|
|
86
|
+
<div class="tags"><a class="tag" href="/tags/swifty.html" data-turbo-frame="content" data-turbo-action="advance">swifty</a><a class="tag" href="/tags/about.html" data-turbo-frame="content" data-turbo-action="advance">about</a></div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
</turbo-frame>
|
|
91
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/init.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
// Define the structure
|
|
7
|
+
const structure = {
|
|
8
|
+
"pages/index.md": "This my home page.",
|
|
9
|
+
"layouts/": null,
|
|
10
|
+
"partials/": null,
|
|
11
|
+
"css/": null,
|
|
12
|
+
"js/": null,
|
|
13
|
+
"images/": null,
|
|
14
|
+
"config.yaml": "site_name: My Swifty Site",
|
|
15
|
+
"template.html": `<!DOCTYPE html>
|
|
16
|
+
<html lang="en">
|
|
17
|
+
<head>
|
|
18
|
+
<meta charset="UTF-8">
|
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
20
|
+
<title>{{sitename}}</title>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<header>
|
|
24
|
+
<h1>Swifty</h1>
|
|
25
|
+
</header>
|
|
26
|
+
<main>
|
|
27
|
+
{{ content }}
|
|
28
|
+
</main>
|
|
29
|
+
<footer>
|
|
30
|
+
<p>This site was built with Swifty, the super speedy static site generator.</p>
|
|
31
|
+
<p><a href="/tags.html" data-turbo-frame="content" data-turbo-action="advance">All Tags</a></p>
|
|
32
|
+
</footer>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
`
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Function to create files and folders
|
|
39
|
+
function createStructure(basePath, structure) {
|
|
40
|
+
Object.entries(structure).forEach(([filePath, content]) => {
|
|
41
|
+
const fullPath = path.join(basePath, filePath);
|
|
42
|
+
if (content === null) {
|
|
43
|
+
fs.mkdirSync(fullPath, { recursive: true });
|
|
44
|
+
} else {
|
|
45
|
+
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
46
|
+
fs.writeFileSync(fullPath, content);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Execute script
|
|
52
|
+
const projectRoot = process.cwd();
|
|
53
|
+
createStructure(projectRoot, structure);
|
|
54
|
+
|
|
55
|
+
console.log("✅ Swifty project initialized successfully!");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<div class="breadcrumbs">{{ breadcrumbs }}</div>
|
|
3
|
+
<h1>{{ title }}</h1>
|
|
4
|
+
<div class="post-info italic text-xs">Posted by {{ author }} on {{ date }}</div>
|
|
5
|
+
<div class="tags">{{ links_to_tags }}</div>
|
|
6
|
+
<p class="text-s bold">{{ summary }}</p>
|
|
7
|
+
<div class="serif-font">
|
|
8
|
+
{{ content }}
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|