aboutsummaryrefslogtreecommitdiff
path: root/projects/msg.html
blob: 3b30c6206b73aeb330ec77a0490c8c341a4d5dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
  <head>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="description" content="RAGHURAM SUBRAMANI ~ COMPROMYSE | Hacker & Programmer">

    <title>MSG | COMPROMYSE</title>

    <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
    <link rel="manifest" href="/assets/favicon/site.webmanifest">

    <link href="/assets/stylesheet.css" rel="stylesheet" />

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Jersey+15&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/base16/ashes.min.css" defer>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
    <script defer>hljs.highlightAll();</script>

  </head>
  <body class="bg-zinc-900 text-pink-300 font-['Jersey_15'] selection:text-pink-900 selection:bg-pink-100 lg:text-xl">
    <div class="min-h-screen flex flex-col">

      <nav class="w-full mx-auto mt-10">
  <div class="flex flex-wrap items-center px-10 gap-4 text-center text-lg lg:text-2xl">

    <a href="/" class="cursor-pointer font-bold hover:underline justify-center button">
      COMPROMYSE
    </a>

    <div class="flex items-center gap-4 flex-wrap justify-center md:justify-left">
      <a href="/projects" class="hover:underline">
        [ PROJECTS ]
      </a>

    </div>

  </div>
</nav>


      <div class="flex flex-grow flex-col py-8 px-14 items-center">

        <div class="text-center flex flex-col gap-4 w-full max-w-100">
          <h1 class="text-5xl font-semibold">MSG</h1>
          <div>
            <h4 class="text-xl">An incredibly opinionated, hackable, minimal Static Site Generator.</h4>
            <h6 class="text-center text-sm border-t-4 mt-2 py-1">C</h6>
          </div>

          <a href="https://github.com/compromyse/msg" target="_blank" class="button">SOURCE</a>
        </div>

        <div class="prose md:prose-lg lg:prose-2xl prose-pink prose-invert w-full max-w-256 pt-12">
          <p>See <a href="https://github.com/compromyse/compromyse.xyz">github.com/compromyse/compromyse.xyz</a> for an example site.</p>

<h3>Compilation &amp; Usage</h3>

<p><pre><code class="sh"># REQUIREMENTS: CMake, Git, GCC/Clang, GNUMake/Ninja
$ git clone https://github.com/compromyse/msg
$ mkdir build &amp;&amp; cd build
$ cmake ..
$ make # or ninja
$ ./msg -h
msg: The Minimal Static Site Generator

Usage: ./msg [-h] [-w] [-v] [-o &lt;output&gt;] &lt;directory&gt;
        -h         : Help
        -w         : Watch working directory for changes
        -v         : Verbose
        -o &lt;output&gt;: Output directory
        &lt;directory&gt;: Working directory
</code></pre>
</p>

<h3>Site Structure</h3>

<p><pre><code class="sh">.
├── assets
│   └── me.webp
├── config.cfg
├── index.html
├── partials
│   ├── footer.html
│   ├── navbar.html
├── projects.html
└── templates
    └── base.html
</code></pre>
</p>

<h3>Features</h3>

<h4>Includes - include files from <code>/partials</code></h4>

<p><pre><code class="html">&lt;!-- index.html --&gt;
&lt;html&gt;
  &lt;body&gt;
    {{ include "navbar.html" }}
    ...
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
</p>

<h4>Contentfor - define content for templates</h4>

<p><pre><code class="html">&lt;!-- templates/base.html --&gt;
&lt;html&gt;
  &lt;head&gt;
    {{ content "head" }}
  &lt;/head&gt;
  &lt;body&gt;
    {{ body }}
  &lt;/body&gt;
&lt;/html&gt;

&lt;!-- index.html --&gt;
{{ contentfor "head" }}
&lt;title&gt;HOME&lt;/title&gt;
{{ endcontent }}

&lt;p&gt;...&lt;/p&gt;
</code></pre>
</p>

<h4>Eachdo - iterate over resources</h4>

<p><pre><code class="html">&lt;!-- projects/xyz.html --&gt;
title = XYZ
---

&lt;h1&gt;XYZ!&lt;/h1&gt;

&lt;!-- index.html --&gt;
{{ eachdo resources.projects }}
&lt;p&gt;{{ put title }}&lt;/p&gt;
{{ endeachdo }}
</code></pre>
</p>

<h4>Template - specify template for page</h4>

<p><pre><code class="html">&lt;!-- projects/xyz.html --&gt;
template = base_tailwind.html
---

&lt;h1 class="p-2"&gt;XYZ!&lt;/h1&gt;
</code></pre>
</p>

        </div>

      </div>
      <footer class="w-full pb-4 pt-12 px-8 text-sm md:text-lg">
  <div class="text-center">
    <p>The Quieter You Become, The More You Are Able To Hear.</p>
  </div>
</footer>


    </div>
  </body>
</html>