chore(fmt): add html formatting
This commit is contained in:
@@ -1,28 +1,29 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8" />
|
||||||
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>{{ title }} | {{ config.title }}</title>
|
<title>{{ title }} | {{ config.title }}</title>
|
||||||
<link rel="canonical" href="{{ base_url }}{{ page_path }}">
|
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
||||||
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="{{ base_url }}/feed.xml">
|
<link
|
||||||
<link rel="stylesheet" href="{{ prefix }}/style.css">
|
rel="alternate"
|
||||||
</head>
|
type="application/atom+xml"
|
||||||
|
title="Atom Feed"
|
||||||
|
href="{{ base_url }}/feed.xml"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="{{ prefix }}/style.css" />
|
||||||
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="{{ prefix }}/index.html">{{ config.title }}</a>
|
<a href="{{ prefix }}/index.html">{{ config.title }}</a>
|
||||||
{% for item in nav %}
|
{% for item in nav %}
|
||||||
<a href="{{ prefix }}{{ item.path }}">{{ item.label }}</a>
|
<a href="{{ prefix }}{{ item.path }}">{{ item.label }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>{% block content %}{% endblock content %}</main>
|
||||||
{% block content %}{% endblock content %}
|
|
||||||
</main>
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>© {{ config.author }}</p>
|
<p>© {{ config.author }}</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<article>
|
<article>
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
{% if page.description %}
|
{% if page.description %}
|
||||||
<p class="description">{{ page.description }}</p>
|
<p class="description">{{ page.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<section class="content">
|
<section class="content">{{ content | safe }}</section>
|
||||||
{{ content | safe }}
|
|
||||||
</section>
|
|
||||||
</article>
|
</article>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -1,25 +1,19 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
{% if page.date %}
|
{% if page.date %}
|
||||||
<time class="date">{{ page.date }}</time>
|
<time class="date">{{ page.date }}</time>
|
||||||
{% endif %}
|
{% endif %} {% if page.description %}
|
||||||
{% if page.description %}
|
<p class="description">{{ page.description }}</p>
|
||||||
<p class="description">{{ page.description }}</p>
|
{% endif %} {% if page.tags %}
|
||||||
{% endif %}
|
<ul class="tags">
|
||||||
{% if page.tags %}
|
{% for tag in page.tags %}
|
||||||
<ul class="tags">
|
<li><a href="{{ prefix }}/tags/{{ tag }}.html">{{ tag }}</a></li>
|
||||||
{% for tag in page.tags %}
|
{% endfor %}
|
||||||
<li><a href="{{ prefix }}/tags/{{ tag }}.html">{{ tag }}</a></li>
|
</ul>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
</ul>
|
</header>
|
||||||
{% endif %}
|
<section class="content">{{ content | safe }}</section>
|
||||||
</header>
|
|
||||||
<section class="content">
|
|
||||||
{{ content | safe }}
|
|
||||||
</section>
|
|
||||||
</article>
|
</article>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="hero">
|
<section class="hero">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
{% if page.description %}
|
{% if page.description %}
|
||||||
<p class="tagline">{{ page.description }}</p>
|
<p class="tagline">{{ page.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">{{ content | safe }}</section>
|
||||||
{{ content | safe }}
|
{% endblock content %}
|
||||||
</section>
|
|
||||||
{% endblock content %}
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<article class="page">
|
<article class="page">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<section class="content">
|
<section class="content">{{ content | safe }}</section>
|
||||||
{{ content | safe }}
|
|
||||||
</section>
|
|
||||||
</article>
|
</article>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<h1>{{ section.title }}</h1>
|
<h1>{{ section.title }}</h1>
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<li>
|
<li>
|
||||||
<a href="./{{ item.slug }}.html">
|
<a href="./{{ item.slug }}.html">
|
||||||
<span class="title">{{ item.frontmatter.title }}</span>
|
<span class="title">{{ item.frontmatter.title }}</span>
|
||||||
{% if item.frontmatter.date %}
|
{% if item.frontmatter.date %}
|
||||||
<time class="date">{{ item.frontmatter.date }}</time>
|
<time class="date">{{ item.frontmatter.date }}</time>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% if item.frontmatter.description %}
|
{% if item.frontmatter.description %}
|
||||||
<p class="description">{{ item.frontmatter.description }}</p>
|
<p class="description">{{ item.frontmatter.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<h1>{{ section.title }}</h1>
|
<h1>{{ section.title }}</h1>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<li>
|
<li>
|
||||||
<a href="./{{ item.slug }}.html">{{ item.frontmatter.title }}</a>
|
<a href="./{{ item.slug }}.html">{{ item.frontmatter.title }}</a>
|
||||||
{% if item.frontmatter.description %}
|
{% if item.frontmatter.description %}
|
||||||
<p>{{ item.frontmatter.description }}</p>
|
<p>{{ item.frontmatter.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -1,24 +1,21 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<h1>{{ section.title }}</h1>
|
<h1>{{ section.title }}</h1>
|
||||||
<ul class="project-cards">
|
<ul class="project-cards">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<li class="card">
|
<li class="card">
|
||||||
{% if item.frontmatter.link_to %}
|
{% if item.frontmatter.link_to %}
|
||||||
<a href="{{ item.frontmatter.link_to }}" target="_blank" rel="noopener">
|
<a href="{{ item.frontmatter.link_to }}" target="_blank" rel="noopener">
|
||||||
<h2>{{ item.frontmatter.title }}</h2>
|
<h2>{{ item.frontmatter.title }}</h2>
|
||||||
{% if item.frontmatter.description %}
|
{% if item.frontmatter.description %}
|
||||||
<p>{{ item.frontmatter.description }}</p>
|
<p>{{ item.frontmatter.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h2>{{ item.frontmatter.title }}</h2>
|
<h2>{{ item.frontmatter.title }}</h2>
|
||||||
{% if item.frontmatter.description %}
|
{% if item.frontmatter.description %}
|
||||||
<p>{{ item.frontmatter.description }}</p>
|
<p>{{ item.frontmatter.description }}</p>
|
||||||
{% endif %}
|
{% endif %} {% endif %}
|
||||||
{% endif %}
|
</li>
|
||||||
</li>
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ options = ["fmt", "-o", "align_entries=true", "-o", "reorder_keys=true"]
|
|||||||
[formatter.prettier]
|
[formatter.prettier]
|
||||||
command = "prettier"
|
command = "prettier"
|
||||||
excludes = ["*/sources.json"]
|
excludes = ["*/sources.json"]
|
||||||
includes = ["*.json", "*.md", "*.yaml", "*.yml"]
|
includes = ["*.json", "*.md", "*.yaml", "*.yml", "*.html"]
|
||||||
options = ["--write"]
|
options = ["--write"]
|
||||||
|
|
||||||
[formatter.rustfmt]
|
[formatter.rustfmt]
|
||||||
|
|||||||
Reference in New Issue
Block a user