Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HCC docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Holland Computing Center
HCC docs
Commits
3c92497e
Verified
Commit
3c92497e
authored
6 years ago
by
Adam Caprez
Browse files
Options
Downloads
Patches
Plain Diff
Add section on static content.
parent
8742a3f8
No related branches found
No related tags found
1 merge request
!16
Add section on static content.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+14
-0
14 additions, 0 deletions
README.md
with
14 additions
and
0 deletions
README.md
+
14
−
0
View file @
3c92497e
...
...
@@ -123,6 +123,20 @@ are used:
```
Note that you can omit the
`.md`
suffix from the filename.
4.
*Static content*
Hugo has special handling for static content (images, linked zip files, etc.). In the root of the repo,
there is a
`static/`
directory; all static content should go there. Subdirectories can be made to keep
things organized; there are existing directories for
`images`
and
`attachments`
. Feel free to create
additional directories if it makes sense. To link to static content, you can use an absolute path from
any page. For example, assuming there is an image in the repo at
`static/images/my_image.png`
,
you can link to it using the
`figure`
shortcode as
`{{< figure src="/images/my_image.png" >}}`
.
-
**Special note for .png files**
: In order to keep the repo size as small as possible, all images
should be png's if possible, and further processed using the
[
pngquant
](
https://pngquant.org
)
compression
tool. This will reduce the size by ~3-4x while keeping good quality. For example, to process and
overwrite all png files in a directory, run
`pngquant --ext .png --force *.png`
.
*
Do the processing
prior to committing the files to the repo, otherwise git will be forced to keep multiple copies as the files
are binary.
*
#### Adding your changes
Once you've got your set of changes, add and commit them to your branch. Push the branch and
...
...
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