This website is built with Hugo. You will need to install the extended version of Hugo 0.83.1.
Blog posts relating to PyTorch-Ignite are welcomed for pull requests.
Current directory structure:
.
├── archetypes # frontmatter template for markdown files
├── assets # website assets (css + js)
│ ├── css
│ └── js
├── content # the main markdown content
│ ├── guide # PyTorch-Ignite How-to guides
│ ├── posts # blog posts
│ └── tutorials # PyTorch-Ignite tutorials
├── layouts
│ ├── _default # default layout theme
│ ├── partials # partial layouts (can be reused)
│ ├── posts # layouts for blog posts
│ ├── shortcodes # Hugo shortcodes
│ ├── taxonomy # layouts for tags
│ └── tutorials # layouts for tutorials
├── scripts # various CI/CD scripts
├── static
│ ├── examples # https://github.com/pytorch-ignite/examples submodule
│ └── images # static images
└── themes
└── hugo-fresh
After installing Hugo, start a dev server with
hugo server # dev server at localhost:1313
If the included submodules are out of sync, run
git submodule update --remote -- static/examples
Hugo and theme level configurations are defined in config.yaml.
-
Use
hugo new posts/file-name.md
to make a new markdown file insidecontent/posts
. That file will include frontmatter defined inarchetypes/posts.md
. If custom slug url is desired,slug
in frontmatter can be used. -
New blog posts automatically get previous and next blog post links.
-
When creating new templates, try to create a one level directory (currently no nested) inside
layouts
with the directory name that will be used insidecontent
. For example,content/posts
has its respective templates insidelayouts/posts
. -
When creating new templates, take a look at
layouts/_default
,layouts/posts
, and use available template parts insidelayouts/partials
. -
We can also use Hugo shortcodes for
TIP
,WARNING
,DANGER
, andDETAILS
admonitions. There is 2 syntaxes for shortcodes ({{%%}}
and{{<>}}
).{{% mdshortcode %}}Stuff to `process` in the *center*.{{% /mdshortcode %}}
{{< highlight go >}} A bunch of code here {{< /highlight >}}
For tip:
{{% tip %}}
Some text
{{% /tip %}}
For warning:
{{% warning %}}
Some text
{{% /warning %}}
For danger:
{{% danger %}}
Some text
{{% /danger %}}
For details:
{{% details %}}
Some text
{{% /details %}}
It also accept optional title. For example,
For custom note title:
{{% tip "Engine's device NOTE" %}}
Some text
{{% /tip %}}