├── .editorconfig
├── .github
└── settings.yml
├── .gitignore
├── .nvmrc
├── LICENSE
├── Makefile
├── README.md
├── assets
├── js
│ └── app.js
└── sass
│ └── custom.sass
├── config.yaml
├── content
├── _index.md
├── docs
│ ├── _index.md
│ ├── demo.md
│ ├── quickstart
│ │ ├── _index.md
│ │ ├── quickstart1.md
│ │ └── quickstart2.md
│ ├── reference
│ │ ├── _index.md
│ │ ├── reference1.md
│ │ └── reference2.md
│ └── tutorials
│ │ ├── _index.md
│ │ ├── tutorial1.md
│ │ └── tutorial2.md
└── test-content
│ └── docs-section-1
│ └── _index.md
├── layouts
├── _default
│ ├── _markup
│ │ ├── render-heading.html
│ │ └── render-link.html
│ ├── baseof.html
│ ├── section.html
│ └── single.html
├── index.html
├── partials
│ ├── breadcrumb.html
│ ├── css.html
│ ├── docs
│ │ ├── content.html
│ │ └── docs-nav.html
│ ├── favicon.html
│ ├── footer.html
│ ├── github-edit.html
│ ├── home
│ │ ├── cncf-status.html
│ │ ├── content.html
│ │ └── hero.html
│ ├── javascript.html
│ ├── navbar.html
│ ├── section-nav.html
│ ├── single-header.html
│ └── social-buttons.html
└── shortcodes
│ ├── caution.html
│ ├── kat-button
│ ├── note.html
│ ├── tab.html
│ ├── tabs.html
│ └── warning.html
├── netlify.toml
├── package.json
└── static
├── favicon.png
└── img
├── icon-pencil.svg
├── logos
├── cncf-color.png
└── cncf-white.png
├── pencil.png
└── test
└── architecture.png
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 |
7 | [Makefile]
8 | indent_style = tab
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
13 | [*.{html,js,json,md,sass,yaml}]
14 | indent_style = space
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.github/settings.yml:
--------------------------------------------------------------------------------
1 | # For documentation on settings, see https://github.com/apps/settings
2 |
3 | repository:
4 | # For options, see https://docs.github.com/en/rest/reference/repos#update-a-repository
5 |
6 | # The name of the repository. Changing this will rename the repository
7 | name: hugo-netlify-starter
8 |
9 | # A short description of the repository that will show up on GitHub
10 | description: Static website template for CNCF projects
11 |
12 | # A URL with more information about the repository
13 | homepage: https://cncf-hugo-starter.netlify.com/
14 |
15 | collaborators:
16 | # For options, see https://docs.github.com/en/rest/reference/repos#add-a-repository-collaborator
17 | - username: caniszczyk
18 | permission: admin
19 | - username: celestehorgan
20 | permission: admin
21 | - username: chalin
22 | permission: admin
23 | - username: nate-double-u
24 | permission: admin
25 | - username: sftim
26 | permission: admin
27 |
28 | # Labels: define labels for Issues and Pull Requests
29 | labels:
30 | - name: cleanup
31 | color: 1ebcd8
32 | - name: e1-hours
33 | description: "Effort: < 8 hrs"
34 | color: d9b38c
35 | - name: e2-days
36 | description: "Effort: < 5 days"
37 | color: cc9966
38 | - name: e3-weeks
39 | description: "Effort: < 4 weeks"
40 | color: bf8040
41 | - name: e4-months
42 | description: "Effort: 1+ months"
43 | color: 996633
44 | - name: infrastructure
45 | color: 696969
46 | - name: p0-critical
47 | color: B60205
48 | - name: p1-high
49 | color: D93F0B
50 | - name: p2-medium
51 | color: FBCA04
52 | - name: p3-low
53 | color: FEF2C0
54 | - name: e0-minutes
55 | description: "Effort: < 60 min"
56 | color: e6ccb3
57 | # GitHub default labels
58 | - name: bug
59 | description: "Something isn't working"
60 | color: d73a4a
61 | - name: documentation
62 | description: Improvements or additions to documentation
63 | color: 0075ca
64 | - name: duplicate
65 | description: This issue or pull request already exists
66 | color: cfd3d7
67 | - name: enhancement
68 | description: New feature or request
69 | color: a2eeef
70 | - name: good first issue
71 | description: Good for newcomers
72 | color: 7057ff
73 | - name: help wanted
74 | description: Extra attention is needed
75 | color: 008672
76 | - name: invalid
77 | description: "This doesn't seem right"
78 | color: e4e669
79 | - name: question
80 | description: Further information is requested
81 | color: d876e3
82 | - name: wontfix
83 | description: This will not be worked on
84 | color: ffffff
85 |
86 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Hugo-generated assets
2 | /public
3 | /resources
4 |
5 | # npm assets
6 | node_modules/
7 | package-lock.json
8 |
9 | # ignore system files
10 | .DS_Store
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/*
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Except as otherwise noted, the content of this repository is licensed under the
2 | Creative Commons Attribution 4.0 License [1], and code and code samples are
3 | licensed under the Apache License, Version 2.0 [2].
4 |
5 | Copyright 2021-present website Authors. All rights reserved.
6 |
7 | [1]: https://creativecommons.org/licenses/by/4.0, a copy is included below.
8 | [2]: https://apache.org/licenses/LICENSE-2.0
9 |
10 | ---
11 |
12 | Creative Commons Attribution 4.0 International
13 |
14 | =======================================================================
15 |
16 | Creative Commons Corporation ("Creative Commons") is not a law firm and
17 | does not provide legal services or legal advice. Distribution of
18 | Creative Commons public licenses does not create a lawyer-client or
19 | other relationship. Creative Commons makes its licenses and related
20 | information available on an "as-is" basis. Creative Commons gives no
21 | warranties regarding its licenses, any material licensed under their
22 | terms and conditions, or any related information. Creative Commons
23 | disclaims all liability for damages resulting from their use to the
24 | fullest extent possible.
25 |
26 | Using Creative Commons Public Licenses
27 |
28 | Creative Commons public licenses provide a standard set of terms and
29 | conditions that creators and other rights holders may use to share
30 | original works of authorship and other material subject to copyright
31 | and certain other rights specified in the public license below. The
32 | following considerations are for informational purposes only, are not
33 | exhaustive, and do not form part of our licenses.
34 |
35 | Considerations for licensors: Our public licenses are
36 | intended for use by those authorized to give the public
37 | permission to use material in ways otherwise restricted by
38 | copyright and certain other rights. Our licenses are
39 | irrevocable. Licensors should read and understand the terms
40 | and conditions of the license they choose before applying it.
41 | Licensors should also secure all rights necessary before
42 | applying our licenses so that the public can reuse the
43 | material as expected. Licensors should clearly mark any
44 | material not subject to the license. This includes other CC-
45 | licensed material, or material used under an exception or
46 | limitation to copyright. More considerations for licensors:
47 | wiki.creativecommons.org/Considerations_for_licensors
48 |
49 | Considerations for the public: By using one of our public
50 | licenses, a licensor grants the public permission to use the
51 | licensed material under specified terms and conditions. If
52 | the licensor's permission is not necessary for any reason--for
53 | example, because of any applicable exception or limitation to
54 | copyright--then that use is not regulated by the license. Our
55 | licenses grant only permissions under copyright and certain
56 | other rights that a licensor has authority to grant. Use of
57 | the licensed material may still be restricted for other
58 | reasons, including because others have copyright or other
59 | rights in the material. A licensor may make special requests,
60 | such as asking that all changes be marked or described.
61 | Although not required by our licenses, you are encouraged to
62 | respect those requests where reasonable. More considerations
63 | for the public:
64 | wiki.creativecommons.org/Considerations_for_licensees
65 |
66 | =======================================================================
67 |
68 | Creative Commons Attribution 4.0 International Public License
69 |
70 | By exercising the Licensed Rights (defined below), You accept and agree
71 | to be bound by the terms and conditions of this Creative Commons
72 | Attribution 4.0 International Public License ("Public License"). To the
73 | extent this Public License may be interpreted as a contract, You are
74 | granted the Licensed Rights in consideration of Your acceptance of
75 | these terms and conditions, and the Licensor grants You such rights in
76 | consideration of benefits the Licensor receives from making the
77 | Licensed Material available under these terms and conditions.
78 |
79 |
80 | Section 1 -- Definitions.
81 |
82 | a. Adapted Material means material subject to Copyright and Similar
83 | Rights that is derived from or based upon the Licensed Material
84 | and in which the Licensed Material is translated, altered,
85 | arranged, transformed, or otherwise modified in a manner requiring
86 | permission under the Copyright and Similar Rights held by the
87 | Licensor. For purposes of this Public License, where the Licensed
88 | Material is a musical work, performance, or sound recording,
89 | Adapted Material is always produced where the Licensed Material is
90 | synched in timed relation with a moving image.
91 |
92 | b. Adapter's License means the license You apply to Your Copyright
93 | and Similar Rights in Your contributions to Adapted Material in
94 | accordance with the terms and conditions of this Public License.
95 |
96 | c. Copyright and Similar Rights means copyright and/or similar rights
97 | closely related to copyright including, without limitation,
98 | performance, broadcast, sound recording, and Sui Generis Database
99 | Rights, without regard to how the rights are labeled or
100 | categorized. For purposes of this Public License, the rights
101 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
102 | Rights.
103 |
104 | d. Effective Technological Measures means those measures that, in the
105 | absence of proper authority, may not be circumvented under laws
106 | fulfilling obligations under Article 11 of the WIPO Copyright
107 | Treaty adopted on December 20, 1996, and/or similar international
108 | agreements.
109 |
110 | e. Exceptions and Limitations means fair use, fair dealing, and/or
111 | any other exception or limitation to Copyright and Similar Rights
112 | that applies to Your use of the Licensed Material.
113 |
114 | f. Licensed Material means the artistic or literary work, database,
115 | or other material to which the Licensor applied this Public
116 | License.
117 |
118 | g. Licensed Rights means the rights granted to You subject to the
119 | terms and conditions of this Public License, which are limited to
120 | all Copyright and Similar Rights that apply to Your use of the
121 | Licensed Material and that the Licensor has authority to license.
122 |
123 | h. Licensor means the individual(s) or entity(ies) granting rights
124 | under this Public License.
125 |
126 | i. Share means to provide material to the public by any means or
127 | process that requires permission under the Licensed Rights, such
128 | as reproduction, public display, public performance, distribution,
129 | dissemination, communication, or importation, and to make material
130 | available to the public including in ways that members of the
131 | public may access the material from a place and at a time
132 | individually chosen by them.
133 |
134 | j. Sui Generis Database Rights means rights other than copyright
135 | resulting from Directive 96/9/EC of the European Parliament and of
136 | the Council of 11 March 1996 on the legal protection of databases,
137 | as amended and/or succeeded, as well as other essentially
138 | equivalent rights anywhere in the world.
139 |
140 | k. You means the individual or entity exercising the Licensed Rights
141 | under this Public License. Your has a corresponding meaning.
142 |
143 |
144 | Section 2 -- Scope.
145 |
146 | a. License grant.
147 |
148 | 1. Subject to the terms and conditions of this Public License,
149 | the Licensor hereby grants You a worldwide, royalty-free,
150 | non-sublicensable, non-exclusive, irrevocable license to
151 | exercise the Licensed Rights in the Licensed Material to:
152 |
153 | a. reproduce and Share the Licensed Material, in whole or
154 | in part; and
155 |
156 | b. produce, reproduce, and Share Adapted Material.
157 |
158 | 2. Exceptions and Limitations. For the avoidance of doubt, where
159 | Exceptions and Limitations apply to Your use, this Public
160 | License does not apply, and You do not need to comply with
161 | its terms and conditions.
162 |
163 | 3. Term. The term of this Public License is specified in Section
164 | 6(a).
165 |
166 | 4. Media and formats; technical modifications allowed. The
167 | Licensor authorizes You to exercise the Licensed Rights in
168 | all media and formats whether now known or hereafter created,
169 | and to make technical modifications necessary to do so. The
170 | Licensor waives and/or agrees not to assert any right or
171 | authority to forbid You from making technical modifications
172 | necessary to exercise the Licensed Rights, including
173 | technical modifications necessary to circumvent Effective
174 | Technological Measures. For purposes of this Public License,
175 | simply making modifications authorized by this Section 2(a)
176 | (4) never produces Adapted Material.
177 |
178 | 5. Downstream recipients.
179 |
180 | a. Offer from the Licensor -- Licensed Material. Every
181 | recipient of the Licensed Material automatically
182 | receives an offer from the Licensor to exercise the
183 | Licensed Rights under the terms and conditions of this
184 | Public License.
185 |
186 | b. No downstream restrictions. You may not offer or impose
187 | any additional or different terms or conditions on, or
188 | apply any Effective Technological Measures to, the
189 | Licensed Material if doing so restricts exercise of the
190 | Licensed Rights by any recipient of the Licensed
191 | Material.
192 |
193 | 6. No endorsement. Nothing in this Public License constitutes or
194 | may be construed as permission to assert or imply that You
195 | are, or that Your use of the Licensed Material is, connected
196 | with, or sponsored, endorsed, or granted official status by,
197 | the Licensor or others designated to receive attribution as
198 | provided in Section 3(a)(1)(A)(i).
199 |
200 | b. Other rights.
201 |
202 | 1. Moral rights, such as the right of integrity, are not
203 | licensed under this Public License, nor are publicity,
204 | privacy, and/or other similar personality rights; however, to
205 | the extent possible, the Licensor waives and/or agrees not to
206 | assert any such rights held by the Licensor to the limited
207 | extent necessary to allow You to exercise the Licensed
208 | Rights, but not otherwise.
209 |
210 | 2. Patent and trademark rights are not licensed under this
211 | Public License.
212 |
213 | 3. To the extent possible, the Licensor waives any right to
214 | collect royalties from You for the exercise of the Licensed
215 | Rights, whether directly or through a collecting society
216 | under any voluntary or waivable statutory or compulsory
217 | licensing scheme. In all other cases the Licensor expressly
218 | reserves any right to collect such royalties.
219 |
220 |
221 | Section 3 -- License Conditions.
222 |
223 | Your exercise of the Licensed Rights is expressly made subject to the
224 | following conditions.
225 |
226 | a. Attribution.
227 |
228 | 1. If You Share the Licensed Material (including in modified
229 | form), You must:
230 |
231 | a. retain the following if it is supplied by the Licensor
232 | with the Licensed Material:
233 |
234 | i. identification of the creator(s) of the Licensed
235 | Material and any others designated to receive
236 | attribution, in any reasonable manner requested by
237 | the Licensor (including by pseudonym if
238 | designated);
239 |
240 | ii. a copyright notice;
241 |
242 | iii. a notice that refers to this Public License;
243 |
244 | iv. a notice that refers to the disclaimer of
245 | warranties;
246 |
247 | v. a URI or hyperlink to the Licensed Material to the
248 | extent reasonably practicable;
249 |
250 | b. indicate if You modified the Licensed Material and
251 | retain an indication of any previous modifications; and
252 |
253 | c. indicate the Licensed Material is licensed under this
254 | Public License, and include the text of, or the URI or
255 | hyperlink to, this Public License.
256 |
257 | 2. You may satisfy the conditions in Section 3(a)(1) in any
258 | reasonable manner based on the medium, means, and context in
259 | which You Share the Licensed Material. For example, it may be
260 | reasonable to satisfy the conditions by providing a URI or
261 | hyperlink to a resource that includes the required
262 | information.
263 |
264 | 3. If requested by the Licensor, You must remove any of the
265 | information required by Section 3(a)(1)(A) to the extent
266 | reasonably practicable.
267 |
268 | 4. If You Share Adapted Material You produce, the Adapter's
269 | License You apply must not prevent recipients of the Adapted
270 | Material from complying with this Public License.
271 |
272 |
273 | Section 4 -- Sui Generis Database Rights.
274 |
275 | Where the Licensed Rights include Sui Generis Database Rights that
276 | apply to Your use of the Licensed Material:
277 |
278 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
279 | to extract, reuse, reproduce, and Share all or a substantial
280 | portion of the contents of the database;
281 |
282 | b. if You include all or a substantial portion of the database
283 | contents in a database in which You have Sui Generis Database
284 | Rights, then the database in which You have Sui Generis Database
285 | Rights (but not its individual contents) is Adapted Material; and
286 |
287 | c. You must comply with the conditions in Section 3(a) if You Share
288 | all or a substantial portion of the contents of the database.
289 |
290 | For the avoidance of doubt, this Section 4 supplements and does not
291 | replace Your obligations under this Public License where the Licensed
292 | Rights include other Copyright and Similar Rights.
293 |
294 |
295 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
296 |
297 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
298 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
299 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
300 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
301 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
302 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
303 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
304 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
305 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
306 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
307 |
308 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
309 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
310 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
311 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
312 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
313 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
314 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
315 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
316 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
317 |
318 | c. The disclaimer of warranties and limitation of liability provided
319 | above shall be interpreted in a manner that, to the extent
320 | possible, most closely approximates an absolute disclaimer and
321 | waiver of all liability.
322 |
323 |
324 | Section 6 -- Term and Termination.
325 |
326 | a. This Public License applies for the term of the Copyright and
327 | Similar Rights licensed here. However, if You fail to comply with
328 | this Public License, then Your rights under this Public License
329 | terminate automatically.
330 |
331 | b. Where Your right to use the Licensed Material has terminated under
332 | Section 6(a), it reinstates:
333 |
334 | 1. automatically as of the date the violation is cured, provided
335 | it is cured within 30 days of Your discovery of the
336 | violation; or
337 |
338 | 2. upon express reinstatement by the Licensor.
339 |
340 | For the avoidance of doubt, this Section 6(b) does not affect any
341 | right the Licensor may have to seek remedies for Your violations
342 | of this Public License.
343 |
344 | c. For the avoidance of doubt, the Licensor may also offer the
345 | Licensed Material under separate terms or conditions or stop
346 | distributing the Licensed Material at any time; however, doing so
347 | will not terminate this Public License.
348 |
349 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
350 | License.
351 |
352 |
353 | Section 7 -- Other Terms and Conditions.
354 |
355 | a. The Licensor shall not be bound by any additional or different
356 | terms or conditions communicated by You unless expressly agreed.
357 |
358 | b. Any arrangements, understandings, or agreements regarding the
359 | Licensed Material not stated herein are separate from and
360 | independent of the terms and conditions of this Public License.
361 |
362 |
363 | Section 8 -- Interpretation.
364 |
365 | a. For the avoidance of doubt, this Public License does not, and
366 | shall not be interpreted to, reduce, limit, restrict, or impose
367 | conditions on any use of the Licensed Material that could lawfully
368 | be made without permission under this Public License.
369 |
370 | b. To the extent possible, if any provision of this Public License is
371 | deemed unenforceable, it shall be automatically reformed to the
372 | minimum extent necessary to make it enforceable. If the provision
373 | cannot be reformed, it shall be severed from this Public License
374 | without affecting the enforceability of the remaining terms and
375 | conditions.
376 |
377 | c. No term or condition of this Public License will be waived and no
378 | failure to comply consented to unless expressly agreed to by the
379 | Licensor.
380 |
381 | d. Nothing in this Public License constitutes or may be interpreted
382 | as a limitation upon, or waiver of, any privileges and immunities
383 | that apply to the Licensor or You, including from the legal
384 | processes of any jurisdiction or authority.
385 |
386 |
387 | =======================================================================
388 |
389 | Creative Commons is not a party to its public licenses.
390 | Notwithstanding, Creative Commons may elect to apply one of its public
391 | licenses to material it publishes and in those instances will be
392 | considered the “Licensor.” The text of the Creative Commons public
393 | licenses is dedicated to the public domain under the CC0 Public Domain
394 | Dedication. Except for the limited purpose of indicating that material
395 | is shared under a Creative Commons public license or as otherwise
396 | permitted by the Creative Commons policies published at
397 | creativecommons.org/policies, Creative Commons does not authorize the
398 | use of the trademark "Creative Commons" or any other trademark or logo
399 | of Creative Commons without its prior written consent including,
400 | without limitation, in connection with any unauthorized modifications
401 | to any of its public licenses or any other arrangements,
402 | understandings, or agreements concerning use of licensed material. For
403 | the avoidance of doubt, this paragraph does not form part of the public
404 | licenses.
405 |
406 | Creative Commons may be contacted at creativecommons.org.
407 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # To use a non-npm version of hugo, invoke make with HUGO set to your hugo command.
2 | # Example: make build HUGO=hugo
3 |
4 | HUGO:=npx hugo
5 |
6 | ifeq ($(DEPLOY_PRIME_URL),)
7 | DEPLOY_PRIME_URL:=http://localhost:8888/
8 | endif
9 |
10 | build:
11 | $(HUGO) --cleanDestinationDir -e dev -DFE
12 |
13 | production-build:
14 | $(HUGO) --cleanDestinationDir --minify
15 |
16 | preview-build:
17 | $(HUGO) --cleanDestinationDir \
18 | --baseURL $(DEPLOY_PRIME_URL) \
19 | --buildDrafts \
20 | --buildFuture \
21 | --minify
22 |
23 | serve:
24 | $(HUGO) serve \
25 | --buildDrafts \
26 | --buildFuture
27 |
28 | hugo-version:
29 | $(HUGO) version
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # :warning: This template is ARCHIVED.
2 |
3 | # ~CNCF Hugo Starter~
4 |
5 | ~This repository contains a boilerplate static site generator setup for creating~
6 | ~CNCF documentation projects. We strongly recommend using this setup (it helps us~
7 | ~help you and your project!), but none of the technologies in the stack are~
8 | ~strictly required.~
9 |
10 | The starter uses the following:
11 |
12 | * **[Hugo](https://gohugo.io/)** as a static site generator
13 | * **[Bootstrap 4.5.x](https://getbootstrap.com/docs/4.5/getting-started/introduction/)** as a CSS framework
14 | * **[Netlify](https://www.netlify.com/)** for building, hosting, and DNS management
15 |
16 | ## Running locally
17 |
18 | Make sure you have [npm](https://www.npmjs.com/) installed. Clone this
19 | repository and run the following two commands in its directory:
20 |
21 | ```shell
22 | # Install npm assets
23 | npm install
24 |
25 | # Run the server locally
26 | npm run serve
27 | ```
28 |
29 | ## Running on Netlify
30 |
31 | Netlify is a CI/CD build tool and hosting solution for (among other things)
32 | static sites. We **strongly** recommend using Netlify unless you have a good
33 | reason not to.
34 |
35 | This repository comes with a pre-configured
36 | [`netlify.toml`](https://github.com/cncf/hugo-netlify-starter/blob/master/netlify.toml)
37 | file. To build to Netlify:
38 |
39 | 1. Go to [netlify.com](https://netlify.com) and sign up. We recommend signing up
40 | using a GitHub account.
41 | 2. Click **New Site from Git**, and give Netlify access to your GitHub account.
42 | > **Note:** For projects with lots of contributors, it can be handy to
43 | > create a general/bot account instead of granting access with a personal
44 | > account.
45 | 3. Install Netlify with access to your documentation site repository.
46 | 4. Leave all other settings as default and click **Deploy Site**.
47 |
48 | # What's included
49 |
50 | This repository has two layouts with minimal styling, all stored under
51 | `/layouts/_default`:
52 |
53 | * A **homepage** template, a basic homepage which uses the following:
54 | * The `index.html` file and partials in the `/partials/home` directory
55 | * Some helpers in the `/assets/sass/helpers.sass` file
56 | * A **docs** template, a basic content page with submenu which uses the following:
57 | * The `single.html` file and partials in the `/partials/docs` directory
58 | * Classes in the `/assets/sass/helpers.sass` and `/assets/sass/_docs.sass` files
59 |
60 | Both use default components and styling from the Bootstrap CSS framework. No
61 | menus are structured, because menu structure is highly dependent on the nature
62 | of the project.
63 |
--------------------------------------------------------------------------------
/assets/js/app.js:
--------------------------------------------------------------------------------
1 | const navbarBurger = () => {
2 | const burger = $(".navbar-burger"),
3 | menu = $(".navbar-menu");
4 |
5 | burger.click(() => {
6 | [burger, menu].forEach((el) => el.toggleClass('is-active'));
7 | });
8 | }
9 |
10 | $(() => {
11 | console.log("Welcome to the CNCF's Hugo + Netlify starter");
12 | navbarBurger();
13 | });
14 |
15 | // show/hide left nav at small sizes
16 | document.getElementById("leftnavToggle").onclick = function() {
17 | toggleNav()
18 | };
19 |
20 | function toggleNav() {
21 | var leftnav = document.getElementById("leftnav");
22 | if (leftnav.style.display === "none") {
23 | leftnav.style.display = "block";
24 | leftnavToggle.classList.add("open");
25 | } else {
26 | leftnav.style.display = "none";
27 | leftnavToggle.classList.remove("open");
28 | }
29 | }
30 |
31 | // Add copy button on code blocks
32 | // This code is kindly shared under the MIT License by Tom Spencer in their most excellent [tutorial](https://www.tomspencer.dev/blog/2018/09/14/adding-click-to-copy-buttons-to-a-hugo-powered-blog/).
33 |
34 | (function() {
35 | 'use strict';
36 |
37 | if(!document.queryCommandSupported('copy')) {
38 | return;
39 | }
40 |
41 | function confirmationMsg(el, msg) {
42 | el.textContent = msg;
43 | setTimeout(function() {
44 | el.textContent = "Copy";
45 | }, 1200);
46 | }
47 |
48 | function selectText(node) {
49 | var selection = window.getSelection();
50 | var range = document.createRange();
51 | range.selectNodeContents(node);
52 | selection.removeAllRanges();
53 | selection.addRange(range);
54 | return selection;
55 | }
56 |
57 | // Create a copy button
58 | function addCopyButton(containerEl) {
59 | var copyBtn = document.createElement("button");
60 | copyBtn.className = "highlight-copy-btn";
61 | copyBtn.textContent = "Copy";
62 |
63 | var codeEl = containerEl.firstElementChild;
64 | copyBtn.addEventListener('click', function() {
65 | try {
66 | var selection = selectText(codeEl);
67 | document.execCommand('copy');
68 | selection.removeAllRanges();
69 |
70 | confirmationMsg(copyBtn, 'Copied!')
71 | } catch(e) {
72 | console && console.log(e);
73 | confirmationMsg(copyBtn, 'Failed.')
74 | }
75 | });
76 |
77 | containerEl.appendChild(copyBtn);
78 | }
79 |
80 | // Add copy button to code blocks
81 | var highlightBlocks = document.getElementsByClassName('highlight');
82 | Array.prototype.forEach.call(highlightBlocks, addCopyButton);
83 | })();
84 |
85 |
86 |
--------------------------------------------------------------------------------
/assets/sass/custom.sass:
--------------------------------------------------------------------------------
1 | // Custom.scss
2 | @charset "utf-8"
3 |
4 | {{ $extraColors := site.Params.colors.extra }}
5 | {{ $fontAwesomeVersion := site.Params.font_awesome_version }}
6 | {{ $fonts := site.Params.fonts }}
7 |
8 | {{ with $fontAwesomeVersion }}
9 | {{ $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" . }}
10 | @import url("{{ $fontAwesomeUrl }}")
11 | {{ end }}
12 |
13 | {{ if $fonts }}
14 | {{ $fontSlice := (slice) }}
15 | {{ range $fonts }}
16 | {{ $fontSlice = $fontSlice | append (printf "%s:%s" (replace .name " " "+") (delimit .sizes ",")) }}
17 | {{ end }}
18 | {{ $fontsUrl := printf "https://fonts.googleapis.com/css?family=%s" (delimit $fontSlice "|") }}
19 | @import url("{{ $fontsUrl }}")
20 | {{ end }}
21 |
22 |
23 | // Required
24 | @import "bootstrap/scss/functions"
25 | @import "bootstrap/scss/variables"
26 | @import "bootstrap/scss/mixins"
27 | @import "bootstrap/scss/root"
28 |
29 | //Optional
30 | @import "bootstrap/scss/reboot"
31 | @import "bootstrap/scss/type"
32 | @import "bootstrap/scss/images"
33 | @import "bootstrap/scss/code"
34 | @import "bootstrap/scss/grid"
35 | @import "bootstrap/scss/tables"
36 | @import "bootstrap/scss/forms"
37 | @import "bootstrap/scss/buttons"
38 | @import "bootstrap/scss/transitions"
39 | @import "bootstrap/scss/dropdown"
40 | //@import "bootstrap/scss/button-group"
41 | //@import "bootstrap/scss/input-group"
42 | //@import "bootstrap/scss/custom-forms"
43 | @import "bootstrap/scss/nav"
44 | @import "bootstrap/scss/navbar"
45 | //@import "bootstrap/scss/card"
46 | //@import "bootstrap/scss/breadcrumb"
47 | //@import "bootstrap/scss/pagination"
48 | //@import "bootstrap/scss/badge"
49 | @import "bootstrap/scss/jumbotron"
50 | //@import "bootstrap/scss/alert"
51 | //@import "bootstrap/scss/progress"
52 | //@import "bootstrap/scss/media"
53 | //@import "bootstrap/scss/list-group"
54 | //@import "bootstrap/scss/close"
55 | //@import "bootstrap/scss/toasts"
56 | //@import "bootstrap/scss/modal"
57 | //@import "bootstrap/scss/tooltip"
58 | //@import "bootstrap/scss/popover"
59 | //@import "bootstrap/scss/carousel"
60 | //@import "bootstrap/scss/spinners"
61 | @import "bootstrap/scss/utilities"
62 | //@import "bootstrap/scss/print"
63 |
64 |
65 | // Custom
66 |
67 | $layout-breakpoint-small: 400px
68 | $font-family-headers: "Roboto"
69 | $font-family-body: "Open Sans"
70 | $primary-color: #147eff
71 | $font-color: #444
72 |
73 | body
74 | font-family: $font-family-body
75 | font-size: .9rem
76 | font-color: $font-color
77 |
78 | .logo
79 | max-width: 200px
80 |
81 | .breadcrumb
82 | li
83 | list-style: none
84 | display: inline
85 | ul
86 | padding-left: 0
87 |
88 | a
89 | position: relative
90 |
91 | .hashlink
92 | font-size: .8rem !important
93 | position: relative
94 | bottom: 3px
95 | color: gray
96 | &:hover
97 | color: black
98 |
99 | .highlight pre
100 | padding: 0.5rem
101 | border-radius: 5px
102 |
103 | .content
104 | table
105 | @extend .table
106 |
107 | img
108 | @extend .img-fluid
109 |
110 | h1, h2, h3, h4, h5, h6
111 | font-family: $font-family-headers
112 | scroll-margin-top: 5rem
113 | margin-top: 1rem
114 |
115 | .navbar-light .navbar-nav .nav-link
116 | color: $font-color
117 |
118 | nav
119 | ul
120 | list-style-type: none
121 | padding-left: 0
122 | ul
123 | padding-left: 1rem
124 |
125 | // responsive left nav with show/hide and animated triangle
126 | @media (max-width: 650px)
127 | // triangle psuedo-element
128 | %triangle
129 | content: ""
130 | display: inline-block
131 | position: relative
132 | top: 2px
133 | width: 0
134 | height: 0
135 | border-style: solid
136 | border-width: 6px 0 6px 8px
137 | margin-left: .5rem
138 | border-color: transparent transparent transparent $font-color
139 | transform: rotate(0deg)
140 | .menu-label
141 | cursor: pointer
142 | position: relative
143 | &:after
144 | @extend %triangle
145 | transition: transform 500ms
146 | .open
147 | &:after
148 | @extend %triangle
149 | transform: rotate(90deg)
150 |
151 | // At larger sizes, make the left nav always visible and remove toggle ability so that menu doesn't unintentionally disappear if toggled closed and screen gets larger while display: none is applied above. Overrides js in assets/js/app.js.
152 | @media (min-width: 650px)
153 | ul#leftnav
154 | display: block !important
155 |
156 |
157 | .breadcrumb a
158 | color: $font-color
159 | text-decoration: none
160 | &:hover
161 | color: $primary-color
162 |
163 | .btn-primary
164 | background-color: gray
165 | border: none
166 |
167 | .td-content, body
168 | blockquote.callout
169 | padding: 0.4rem 0.4rem 0.4rem 1rem
170 | border: 1px solid #eee
171 | border-left-width: 0.5em
172 | background: #fff
173 | color: #000
174 | margin-top: 0.5em
175 | margin-bottom: 0.5em
176 |
177 | blockquote.callout
178 | border-radius: calc(1em/3)
179 |
180 | .callout.caution
181 | border-left-color: #f0ad4e
182 |
183 | .callout.note
184 | border-left-color: #428bca
185 |
186 | .callout.warning
187 | border-left-color: #d9534f
188 |
189 | h1:first-of-type + blockquote.callout
190 | margin-top: 1.5em
191 |
192 | // Search styles
193 | .gsc-control-cse
194 | background-color: transparent
195 | border: none
196 | padding: 0
197 |
198 | // remove fuzzy Google default background image on input
199 | .gsc-control-cse input
200 | background: none !important
201 |
202 | @media (min-width: 994px)
203 | .gsc-control-cse
204 | margin-left: 1rem
205 | min-width: 320px
206 |
207 | // place top navbar items to the right. Remove these styles to place them left.
208 | .mr-auto
209 | margin-left: auto
210 | margin-right: 0 !important
211 |
212 | ul.navbar-nav
213 | justify-content: space-evenly
214 |
215 | @media (min-width: 500px)
216 | ul.navbar-nav
217 | justify-content: center
218 |
219 | .nav-container li
220 | padding: 0 1rem
221 |
222 | .navbar-nav
223 | flex-direction: inherit
224 |
225 | .navbar .container
226 | padding: 0
227 |
228 | @media (max-width: 650px)
229 | .col-8
230 | flex: 0 0 100%
231 | max-width: 100%
232 |
233 | // styles for the page toc
234 | .toc
235 | border-left: 2px solid #ddd
236 | padding-left: .5rem
237 | font-size: .85rem
238 | a
239 | color: $font-color
240 | &:hover
241 | color: $primary-color
242 | text-decoration: none
243 |
244 | .jumbotron
245 | .container
246 | padding-left: 0
247 |
248 | @media (min-width: 576px)
249 | .jumbotron
250 | padding: 2rem 1rem
251 |
252 | // make main container width wider at different breakpoints to take advantage of screen real estate
253 | .container
254 | box-sizing: border-box
255 |
256 | @media (min-width: 576px)
257 | .container-md, .container-sm, .container
258 | max-width: 1500px
259 |
260 | // responsive left nav
261 |
262 | .section-nav
263 | border-left: solid 4px #ddd
264 | padding-left: 0
265 | font-size: .85rem
266 | p
267 | padding-left: 1rem
268 | button
269 | margin-left: 1rem
270 |
271 | .menu-list
272 | padding-left: 1rem
273 | ul
274 | padding-left: .4rem
275 | a
276 | color: $font-color
277 | &:hover
278 | text-decoration: none
279 | color: $primary-color
280 |
281 | @media (max-width: 650px)
282 | .menu-list
283 | a
284 | display: block
285 | padding: .3rem
286 |
287 | // sticky footer
288 | html, body
289 | height: 100%
290 |
291 | body
292 | display: flex
293 | flex-direction: column
294 |
295 | .content
296 | flex: 1 0 auto
297 |
298 | footer
299 | flex-shrink: 0
300 | box-sizing: border-box
301 | width: 100%
302 | padding: 2rem 0
303 | a
304 | color: lighten($primary-color, 30%)
305 | text-decoration: none
306 |
307 |
308 |
309 | // styles for copy button on code snippets
310 | .highlight
311 | position: relative
312 |
313 | .highlight pre
314 | padding-right: 75px
315 |
316 | .highlight-copy-btn
317 | position: absolute
318 | top: 7px
319 | right: 7px
320 | border: 0
321 | border-radius: 4px
322 | font-size: 0.8rem
323 | color: #fff
324 | background-color: #777
325 | min-width: 55px
326 |
327 | .highlight-copy-btn:hover
328 | background-color: #666
--------------------------------------------------------------------------------
/config.yaml:
--------------------------------------------------------------------------------
1 | title: Hugo Netlify Starter
2 |
3 | disableKinds:
4 | - taxonomy
5 | - taxonomyTerm
6 |
7 | enableGitInfo: true
8 |
9 | caches:
10 | assets:
11 | dir: ':cacheDir/_gen'
12 | maxAge: -1
13 | getcsv:
14 | dir: ':cacheDir/:project'
15 | maxAge: 60s
16 | getjson:
17 | dir: ':cacheDir/:project'
18 | maxAge: 60s
19 | images:
20 | dir: ':cacheDir/_images'
21 | maxAge: -1
22 | modules:
23 | dir: ':cacheDir/modules'
24 | maxAge: -1
25 |
26 | markup:
27 | highlight:
28 | style: paraiso-dark
29 |
30 | params:
31 | projectName: Hugo Netlify Starter
32 | font_awesome_version: 5.12.0
33 | description: Boilerplate for building beautiful websites
34 | favicon: favicon.png
35 | repositoryUrl: 'https://github.com/cncf/hugo-netlify-starter'
36 | contentDir: /content/
37 | logos:
38 | navbar: cncf-color.png
39 | social:
40 | - name: GitHub
41 | color: '#000000'
42 | url: 'https://github.com/cncf/hugo-netlify-starter'
43 | icon: fab fa-github
44 | - name: Twitter
45 | color: '#00aced'
46 | url: 'https://twitter.com/CloudNativeFdn'
47 | icon: fab fa-twitter
48 | fonts:
49 | - name: Roboto
50 | sizes:
51 | - 400
52 | - 500
53 | - 700
54 | type: heading_font
55 | - name: Open Sans
56 | sizes:
57 | - 400
58 | - 600
59 | - 700
60 | type: sans_serif
61 |
62 | menu:
63 | main:
64 | - name: Home
65 | url: /
66 | weight: 1
67 | - name: Documentation
68 | url: /docs/
69 | weight: 2
70 |
--------------------------------------------------------------------------------
/content/_index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Home"
3 | ---
4 |
5 | This is *not* a full-fledged Hugo theme! It's just a convenient way to get started with a brand new site that's wired with:
6 |
7 | * A [Netlify](https://netlify.com) configuration for easy deployment, plus deploy previews
8 | * Some baseline [Hugo](https://gohugo.io) scaffolding
9 | * The [Bootstrap 4.5.x](https://getbootstrap.com/docs/4.5/getting-started/introduction/) CSS framework
10 | * An example Hugo configuration with:
11 | * A main menu
12 | * Specified sans-serif and monospace fonts
13 | * Some extra colors
14 | * A Twitter button
15 | * Some copyright text for the footer
16 |
--------------------------------------------------------------------------------
/content/docs/_index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Introduction"
3 | description: "Index of docs section"
4 | toc: true
5 | weight: 1
6 | ---
7 |
8 | ## This is an h2
9 |
10 | Tempor enim dolor magna elit. Aliquip enim sint fugiat et id et occaecat. Ea aliquip anim commodo amet magna amet.
11 |
12 | ### This is an h3
13 |
14 | Tempor enim dolor magna elit. Aliquip enim sint fugiat et id et occaecat. Ea aliquip anim commodo amet magna amet.
15 |
16 | #### This is an h4 (not in toc)
17 |
18 | Tempor enim dolor magna elit. Aliquip enim sint fugiat et id et occaecat. Ea aliquip anim commodo amet magna amet.
19 |
20 | ## This is an h2
21 |
22 | Tempor enim dolor magna elit. Aliquip enim sint fugiat et id et occaecat. Ea aliquip anim commodo amet magna amet.
23 |
--------------------------------------------------------------------------------
/content/docs/demo.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Demo Page
3 | description: "Smoke test page, repurposed from https://github.com/kubernetes/website/blob/master/content/en/docs/test.md"
4 | main_menu: false
5 | toc: true
6 | ---
7 |
8 | This page serves two purposes:
9 |
10 | - Demonstrate how the CNCF Hugo Netlify Starter uses Markdown
11 | - Provide a "smoke test" document we can use to test HTML, CSS, and template
12 | changes that affect the overall documentation.
13 |
14 | ## Heading levels {#heading-levels}
15 |
16 | The above heading is an H2. The page title renders as an H1. The following
17 | sections show H3-H6.
18 |
19 | ### H3
20 |
21 | This is in an H3 section.
22 |
23 | #### H4
24 |
25 | This is in an H4 section.
26 |
27 | ##### H5
28 |
29 | This is in an H5 section.
30 |
31 | ###### H6
32 |
33 | This is in an H6 section.
34 |
35 | ## Inline elements
36 |
37 | Inline elements show up within the text of paragraph, list item, admonition, or
38 | other block-level element.
39 |
40 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
41 | incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
42 | nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
43 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
44 | fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
45 | culpa qui officia deserunt mollit anim id est laborum.
46 |
47 | ### Inline text styles
48 |
49 | - **bold**
50 | - _italic_
51 | - ***bold italic***
52 | - ~~strikethrough~~
53 | - underline
54 | - _underline italic_
55 | - **underline bold**
56 | - ***underline bold italic***
57 | - `monospace text`
58 | - **`monospace bold`**
59 |
60 | ## Lists
61 |
62 | Markdown doesn't have strict rules about how to process lists. When we moved
63 | from Jekyll to Hugo, we broke some lists. To fix them, keep the following in
64 | mind:
65 |
66 | - Make sure you indent sub-list items **2 spaces**.
67 |
68 | - To end a list and start another, you need a HTML comment block on a new line
69 | between the lists, flush with the left-hand border. The first list won't end
70 | otherwise, no matter how many blank lines you put between it and the second.
71 |
72 | ### Bullet lists
73 |
74 | - This is a list item
75 | * This is another list item in the same list
76 | - You can mix `-` and `*`
77 | - To make a sub-item, indent two spaces.
78 | - This is a sub-sub-item. Indent two more spaces.
79 | - Another sub-item.
80 |
81 |
82 |
83 | - This is a new list. With Hugo, you need to use a HTML comment to separate two
84 | consecutive lists. **The HTML comment needs to be at the left margin.**
85 | - Bullet lists can have paragraphs or block elements within them.
86 |
87 | Indent the content to be the same as the first line of the bullet point.
88 | **This paragraph and the code block line up with the first `B` in `Bullet`
89 | above.**
90 |
91 | ```bash
92 | ls -l
93 | ```
94 |
95 | - And a sub-list after some block-level content
96 |
97 | - A bullet list item can contain a numbered list.
98 | 1. Numbered sub-list item 1
99 | 2. Numbered sub-list item 2
100 |
101 | ### Numbered lists
102 |
103 | 1. This is a list item
104 | 2. This is another list item in the same list. The number you use in Markdown
105 | does not necessarily correlate to the number in the final output. By
106 | convention, we keep them in sync.
107 | 3. {{
Sample HTML
215 |Heading cell 1 | 300 |Heading cell 2 | 301 |
---|---|
Body cell 1 | 306 |Body cell 2 | 307 |
{{ .Page.Description | markdownify }}
15 | {{ partial "docs/content.html" . }} 16 |{{ .Page.Description | markdownify }}
15 | {{ partial "docs/content.html" . }} 16 |On this page:
7 | {{ $toc }} 8 |
8 |
9 |
10 |
11 |
13 | {{ $title }} is a Cloud Native Computing Foundation sandbox project. 14 |
15 |11 | {{ . }} 12 |
13 | {{ end }} 14 |4 |6 | 7 | -------------------------------------------------------------------------------- /layouts/shortcodes/kat-button: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /layouts/shortcodes/note.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |{{ T "caution" }} {{ trim .Inner " \n" | markdownify }}5 |
4 |6 | 7 | -------------------------------------------------------------------------------- /layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ if .Parent }} 4 | {{ $name := trim (.Get "name") " " }} 5 | {{ $include := trim (.Get "include") " "}} 6 | {{ $codelang := .Get "codelang" }} 7 | {{ if not (.Parent.Scratch.Get "tabs") }} 8 | {{ .Parent.Scratch.Set "tabs" slice }} 9 | {{ end }} 10 | {{ with .Inner }} 11 | {{ if $codelang }} 12 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" (highlight . $codelang "") ) }} 13 | {{ else }} 14 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} 15 | {{ end }} 16 | {{ else }} 17 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "include" $include "codelang" $codelang) }} 18 | {{ end }} 19 | {{ else }} 20 | {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} 21 | {{ end}} 22 | 23 | -------------------------------------------------------------------------------- /layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- .Page.Scratch.Add "tabset-counter" 1 -}} 4 | {{- $tab_set_id := .Get "name" | default (printf "tabset-%s-%d" (.Page.RelPermalink) (.Page.Scratch.Get "tabset-counter") ) | anchorize -}} 5 | {{- $tabs := .Scratch.Get "tabs" -}} 6 | {{- if .Inner -}}{{- /* We don't use the inner content, but Hugo will complain if we don't reference it. */ -}}{{- end -}} 7 | 17 |{{ T "note" }} {{ trim .Inner " \n" | markdownify }}5 |
26 | {{- with .content -}} 27 | {{- . -}} 28 | {{- else -}} 29 | {{- if eq $.Page.BundleType "leaf" -}} 30 | {{- /* find the file somewhere inside the bundle. Note the use of double asterisk */ -}} 31 | {{- with $.Page.Resources.GetMatch (printf "**%s*" .include) -}} 32 | {{- if ne .ResourceType "page" -}} 33 | {{- /* Assume it is a file that needs code highlighting. */ -}} 34 | {{- $codelang := $e.codelang | default ( path.Ext .Name | strings.TrimPrefix ".") -}} 35 | {{- highlight .Content $codelang "" -}} 36 | {{- else -}} 37 | {{- .Content -}} 38 | {{- end -}} 39 | {{- end -}} 40 | {{- else -}} 41 | {{- $path := path.Join $.Page.File.Dir .include -}} 42 | {{- $page := site.GetPage "page" $path -}} 43 | {{- with $page -}} 44 | {{- .Content -}} 45 | {{- else -}} 46 | {{- errorf "[%s] tabs include not found for path %q" site.Language.Lang $path -}} 47 | {{- end -}} 48 | {{- end -}} 49 | {{- end -}} 50 |
4 |6 | 7 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "public" 3 | command = "npm run build:production" 4 | 5 | [context.deploy-preview] 6 | command = "npm run build:preview" 7 | 8 | [context.branch-deploy] 9 | command = "npm run build:preview" 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build-and-serve": "npm run build && npm run serve", 4 | "build:preview": "hugo --cleanDestinationDir -DFE --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"", 5 | "build:production": "hugo --cleanDestinationDir --minify", 6 | "build": "hugo --cleanDestinationDir -e dev -DFE", 7 | "hugo:version": "hugo version", 8 | "serve": "netlify dev -c \"hugo serve -DFE --minify -w\"" 9 | }, 10 | "devDependencies": { 11 | "@fortawesome/fontawesome-free": "^5.14.0", 12 | "bootstrap": "^4.5.2", 13 | "hugo-extended": "^0.86.0", 14 | "jquery": "^3.5.1", 15 | "netlify-cli": "^5.2.10", 16 | "popper.js": "^1.16.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cncf/hugo-netlify-starter/996f07b2e023e0a737d85ef4622d6213b89862e5/static/favicon.png -------------------------------------------------------------------------------- /static/img/icon-pencil.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/img/logos/cncf-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cncf/hugo-netlify-starter/996f07b2e023e0a737d85ef4622d6213b89862e5/static/img/logos/cncf-color.png -------------------------------------------------------------------------------- /static/img/logos/cncf-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cncf/hugo-netlify-starter/996f07b2e023e0a737d85ef4622d6213b89862e5/static/img/logos/cncf-white.png -------------------------------------------------------------------------------- /static/img/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cncf/hugo-netlify-starter/996f07b2e023e0a737d85ef4622d6213b89862e5/static/img/pencil.png -------------------------------------------------------------------------------- /static/img/test/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cncf/hugo-netlify-starter/996f07b2e023e0a737d85ef4622d6213b89862e5/static/img/test/architecture.png --------------------------------------------------------------------------------{{ T "warning" }} {{ trim .Inner " \n" | markdownify }}5 |