Skip to content

Commit

Permalink
Pull md files from source repo instead of wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanDrake committed Dec 4, 2024
1 parent feeb81b commit c51ad67
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "source"]
path = source
url = https://github.com/adventuregamestudio/ags-manual.wiki.git
url = https://github.com/adventuregamestudio/ags-manual-source.git
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ metadata.lua: $(METADATA_FILES)
--lua-filter "$(srcdir)/lua/insert_anchors.lua" \
--template "$(srcdir)/html/template.html5" \
--variable footer="$(FOOTER)" \
--variable editlink="https://github.com/adventuregamestudio/ags-manual-source/blob/master/${*F}.md" \
--table-of-contents \
--section-divs \
--css "css/normalize.css" \
Expand Down
7 changes: 7 additions & 0 deletions html/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,13 @@ header li {
margin-bottom: 4px;
}

/* edit this page link */
.edit-link {
display: inline-flex;
margin-top: 2.5em;
gap:10px;
}

/* code highlighting */
main {min-width:0;} /* trick to avoid code blocks expanding main area */
pre > code.sourceCode { white-space: pre; position: relative; }
Expand Down
3 changes: 3 additions & 0 deletions html/template.html5
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ $endif$

<main>
$body$
$if(toc)$
<a class="edit-link" href="$editlink$" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="20" height="20"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg> Edit this page</a>
$endif$
</main>

$for(include-after)$
Expand Down

0 comments on commit c51ad67

Please sign in to comment.