Skip to content

Commit 3acced6

Browse files
Home page content can be modified
- Home page content can be controlled by changing `content/_index.md` - Create custom shortcodes
1 parent ecedb40 commit 3acced6

File tree

6 files changed

+69
-62
lines changed

6 files changed

+69
-62
lines changed

content/_index.md

+27-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ date = 2023-01-01T08:00:00-07:00
44
draft = false
55
+++
66

7-
Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
8-
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
9-
excepteur excepteur pariatur nostrud qui irure ullamco.
7+
## What is LLVM?
8+
9+
LLVM began as a research project at the University of Illinois, with the goal of
10+
providing a modern, SSA-based compilation strategy capable of supporting both
11+
static and dynamic compilation of arbitrary programming languages. Since then,
12+
LLVM has grown to be an umbrella project consisting of a number of subprojects,
13+
many of which are being used in production by a wide variety of commercial and
14+
open source projects as well as being widely used in academic research. Code in
15+
the LLVM project is licensed under the "Apache 2.0 License with LLVM exceptions.
16+
17+
{{<subprojects>}}
18+
19+
## Getting Involved
20+
21+
As much as everything else, LLVM has a broad and friendly community of people
22+
who are interested in building great low-level tools. If you are interested in
23+
getting involved, a good first place is to skim the LLVM Blog and join LLVM
24+
Discourse. For information on how to send in a patch, get commit access, and
25+
copyright and license topics, please see the LLVM Developer Policy.
26+
27+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem">
28+
29+
{{<developer_resources>}}
30+
31+
{{<upcoming_events>}}
32+
33+
</div>

hugo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ baseURL = 'https://example.org/'
22
languageCode = 'en-us'
33
title = 'The LLVM Compiler Infrastructure'
44

5+
[markup.goldmark.renderer]
6+
unsafe= true
57

68
# Navigation Bar Menu
79
[[menus.main]]
@@ -75,9 +77,9 @@ weight = 50
7577
icon = "ri-hashtag"
7678
url = "/"
7779
[[params.hero_section_links]]
78-
title = "Get Started"
80+
title = "Upcoming Events"
7981
icon = "ri-play-large-line"
80-
url = "/"
82+
url = "#upcoming_events"
8183
[[params.hero_section_links]]
8284
title = "Read the Docs"
8385
icon = "ri-book-open-line"
@@ -132,4 +134,4 @@ links = [
132134
{ text = "Events", url = "#" },
133135
{ text = "Sponsors", url = "#" },
134136
{ text = "Contact", url = "#" }
135-
]
137+
]

layouts/_default/home.html

+3-56
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,9 @@ <h1 class="hero__title">
4141
</div>
4242
</section>
4343

44-
<section class="section-container">
45-
<h2>What is LLVM?</h2>
46-
<p>
47-
LLVM began as a research project at the University of Illinois, with the
48-
goal of providing a modern, SSA-based compilation strategy capable of
49-
supporting both static and dynamic compilation of arbitrary programming
50-
languages. Since then, LLVM has grown to be an umbrella project consisting
51-
of a number of subprojects, many of which are being used in production by
52-
a wide variety of commercial and open source projects as well as being
53-
widely used in academic research. Code in the LLVM project is licensed
54-
under the "Apache 2.0 License with LLVM exceptions"
55-
</p>
56-
</section>
44+
{{ .Content }}
5745

58-
{{ $subprojects := .Site.Data.subprojects.subprojects }}
59-
<section class="section-container">
60-
<h2>Sub Projects</h2>
61-
<div class="sub-projects-wrapper">
62-
{{ range $subprojects}}
63-
<div class="sub-project">
64-
<h4 class="sub-project__title">{{ .name }}</h4>
65-
<p class="sub-project__description">{{ .description }}</p>
66-
<a class="sub-project__button" href="{{ .url }}">Learn More</a>
67-
</div>
68-
{{ end }}
69-
</div>
70-
</section>
71-
72-
<section class="section-container getting-involved">
46+
{{/* <section class="section-container getting-involved">
7347
<h2>Getting Involved</h2>
7448
<div class="getting-involved__wrapper">
7549
<p style="margin-top: 0">
@@ -95,35 +69,8 @@ <h2>Getting Involved</h2>
9569
</a>
9670
</div>
9771
</div>
98-
</section>
99-
100-
<div class="home__row section-container">
101-
{{ $resources := .Site.Data.developer_resources.developer_resources }}
102-
103-
<section class="">
104-
<h2>Developer Resources</h2>
105-
<ul>
106-
{{ range $resources }}
107-
<li><a href="{{ .url }}">{{ .name }}</a></li>
108-
{{ end }}
109-
</ul>
110-
</section>
111-
{{ $events := .Site.Data.upcoming_events.upcoming_events }}
72+
</section> */}}
11273

113-
<section class="">
114-
<h2>Upcoming events</h2>
115-
<ul>
116-
{{ range $events }}
117-
<li>
118-
<a href="{{ .url }}">
119-
{{ .start_date | dateFormat "January 2" }}-{{ .end_date | dateFormat
120-
"2, 2006" }} - {{ .name }}
121-
</a>
122-
</li>
123-
{{ end }}
124-
</ul>
125-
</section>
126-
</div>
12774
</div>
12875

12976
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ $resources := .Site.Data.developer_resources.developer_resources }}
2+
<section class="">
3+
<h2 id="developer_resources">Developer Resources</h2>
4+
<ul>
5+
{{ range $resources }}
6+
<li><a href="{{ .url }}">{{ .name }}</a></li>
7+
{{ end }}
8+
</ul>
9+
</section>

layouts/shortcodes/subprojects.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ $subprojects := .Site.Data.subprojects.subprojects }}
2+
<h2>Sub Projects</h2>
3+
<div class="sub-projects-wrapper">
4+
{{ range $subprojects}}
5+
<div class="sub-project">
6+
<h4 class="sub-project__title">{{ .name }}</h4>
7+
<p class="sub-project__description">{{ .description }}</p>
8+
<a class="sub-project__button" href="{{ .url }}">Learn More</a>
9+
</div>
10+
{{ end }}
11+
</div>
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ $events := .Site.Data.upcoming_events.upcoming_events }}
2+
<section class="">
3+
<h2 id="upcoming_events">Upcoming events</h2>
4+
<ul>
5+
{{ range $events }}
6+
<li>
7+
<a href="{{ .url }}">
8+
{{ .start_date | dateFormat "January 2" }}-{{ .end_date | dateFormat
9+
"2, 2006" }} - {{ .name }}
10+
</a>
11+
</li>
12+
{{ end }}
13+
</ul>
14+
</section>

0 commit comments

Comments
 (0)