Skip to content

Commit fcd3e4d

Browse files
committed
Switch to MkDocs
replacing Ruby and Node.js as a dependency with Python, as Ledger offers an optional Python API, and hence some familiarity with Python can generally be assumed.
1 parent 7e98319 commit fcd3e4d

File tree

21 files changed

+73
-690
lines changed

21 files changed

+73
-690
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
build
2+
# source/css is generated from custom_theme/sass
3+
source/css
14
*.hi
25
*.o
36
*.html

Gemfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 123 deletions
This file was deleted.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ ledger3.texi_repopath := $(OWNER)/$(REPO)/$(LATEST)/doc
1616
ledger.1_repopath := $(OWNER)/$(REPO)/$(LATEST)/doc
1717
ledger-mode.texi_repopath := $(OWNER)/ledger-mode/master/doc
1818

19+
install: source/css
20+
mkdocs build
21+
1922
docs: init sources pdf html
2023

2124
pdf: $(PDF)
@@ -24,6 +27,11 @@ html: $(HTML)
2427

2528
sources: $(SOURCES)
2629

30+
.PHONY: source/css
31+
source/css: custom_theme/sass
32+
python -c 'import sass; sass.compile(dirname=("$<", "$@"))'
33+
34+
2735
.PHONY: init
2836
init:
2937
mkdir -p $(OUTPUT)

config.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

source/layouts/layout.erb renamed to custom_theme/main.html

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title><%= current_page.data.title %></title>
5+
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
66
<meta name="description" content="Website and documentation for the open source command-line double-entry accounting system named ledger">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<%= stylesheet_link_tag "site" %>
8+
<link href="/css/site.css" rel="stylesheet">
99
</head>
1010
<body>
1111
<main>
@@ -14,19 +14,15 @@
1414
</aside>
1515
<header>
1616
<nav>
17-
<ul>
18-
<li><a href="/">ledger</a></li>
19-
<li><a href="index.html">Home</a></li>
20-
<li><a href="features.html">Features</a></li>
21-
<li><a href="docs.html">Docs</a></li>
22-
<li><a href="download.html">Download</a></li>
23-
<li><a href="contribute.html">Contribute</a></li>
24-
<li><a href="https://wiki.ledger-cli.org/">Wiki</a></li>
25-
</ul>
17+
{% if nav|length>1 -%}<ul>
18+
{% for nav_item in nav -%}
19+
<li class="{% if nav_item.active %}current{% endif %}"><a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a></li>
20+
{% endfor -%}
21+
</ul>{% endif -%}
2622
</nav>
2723
</header>
2824
<article>
29-
<%= yield %>
25+
{{ page.content }}
3026
</article>
3127
</main>
3228
</body>
File renamed without changes.

source/stylesheets/site.css.scss renamed to custom_theme/sass/site.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ pre, code, tt {
8282
font-family:monospace;
8383
}
8484

85-
pre.highlight {
85+
pre {
8686
margin:0 0 0 1em;
87-
code {
87+
code[class^="language-"] {
8888
padding:0.5em;
8989
display:inline-block;
9090
background:var(--highlight-code-background-color);

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)