Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lagoproject.Net.Gh
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LAGO
Lagoproject.Net.Gh
Commits
b95dffa5
Commit
b95dffa5
authored
2 years ago
by
squidfunk
Browse files
Options
Downloads
Patches
Plain Diff
Removed level 1 headline hack in content partial
parent
39013249
No related branches found
Branches containing commit
Tags
9.0.0
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
material/partials/content.html
+2
-1
2 additions, 1 deletion
material/partials/content.html
src/partials/content.html
+3
-2
3 additions, 2 deletions
src/partials/content.html
src/partials/toc.html
+1
-1
1 addition, 1 deletion
src/partials/toc.html
with
6 additions
and
4 deletions
material/partials/content.html
+
2
−
1
View file @
b95dffa5
...
...
@@ -5,7 +5,8 @@
{% include "partials/tags.html" %}
{% endif %}
{% include "partials/actions.html" %}
{% if "\x3ch1" not in page.content %}
{% set first = page.toc | first %}
{% if first and first.level != 1 %}
<h1>
{{ page.title | d(config.site_name, true)}}
</h1>
{% endif %}
{{ page.content }}
...
...
This diff is collapsed.
Click to expand it.
src/partials/content.html
+
3
−
2
View file @
b95dffa5
...
...
@@ -29,10 +29,11 @@
{% include "partials/actions.html" %}
<!--
Hack: c
heck whether the content
contains a h
1 headline. If it doesn't, the
C
heck whether the content
starts with a level
1 headline. If it doesn't, the
page title (or respectively site name) is used as the main headline.
-->
{% if "\x3ch1" not in page.content %}
{% set first = page.toc | first %}
{% if first and first.level != 1 %}
<h1>
{{ page.title | d(config.site_name, true)}}
</h1>
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
src/partials/toc.html
+
1
−
1
View file @
b95dffa5
...
...
@@ -31,7 +31,7 @@
{% set toc = page.toc %}
<!--
Hack: c
heck whether the content
contains a h
1 headline. If it does, the
C
heck whether the content
starts with a level
1 headline. If it does, the
top-level anchor must be skipped, since it would be redundant to the link
to the current page that is located just above the anchor. Therefore we
directly continue with the children of the anchor.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment