diff --git a/archetypes/project.md b/archetypes/project.md index b923f240..95a7febd 100644 --- a/archetypes/project.md +++ b/archetypes/project.md @@ -1,7 +1,21 @@ +++ +# Tags: can be used for filtering projects. +# Example: `tags = ["machine-learning", "deep-learning"]` tags = [] + +# Project summary to display on homepage. summary = "" + +# Optional image to display on homepage. +image_preview = "" + +# Optional image to display on project detail page. image = "" -math = false + +# Optional external URL for project (replaces project detail page). external_link = "" + +# Does the project detail page use math formatting? +math = false + +++ diff --git a/exampleSite/content/home/projects.md b/exampleSite/content/home/projects.md index 402ec6d0..ed02d4d4 100644 --- a/exampleSite/content/home/projects.md +++ b/exampleSite/content/home/projects.md @@ -12,5 +12,26 @@ widget = "projects" # Order that this section will appear in. weight = 40 +# View. +# Customize how projects are displayed. +# Legend: 0 = list, 1 = cards. +view = 1 + +# Filter toolbar. +# Add or remove as many filters (`[[filter]]` instances) as you like. +# Use "*" tag to show all projects or an existing tag prefixed with "." to filter by specific tag. +# To remove toolbar, delete/comment all instances of `[[filter]]` below. +[[filter]] + name = "All" + tag = "*" + +[[filter]] + name = "Deep Learning" + tag = ".deep-learning" + +[[filter]] + name = "Other" + tag = ".demo" + +++ diff --git a/exampleSite/content/project/deep-learning.md b/exampleSite/content/project/deep-learning.md index 44735ab6..b0e80c9b 100644 --- a/exampleSite/content/project/deep-learning.md +++ b/exampleSite/content/project/deep-learning.md @@ -2,9 +2,9 @@ client_name = "" date = "2016-04-27" image = "" -image_preview = "" +image_preview = "bubbles.jpg" summary = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." -tags = [] +tags = ["deep-learning"] title = "Deep Learning" external_link = "" diff --git a/exampleSite/content/project/example-external-project.md b/exampleSite/content/project/example-external-project.md index b9749819..84e24ccd 100644 --- a/exampleSite/content/project/example-external-project.md +++ b/exampleSite/content/project/example-external-project.md @@ -2,9 +2,9 @@ client_name = "" date = "2016-04-27" image = "" -image_preview = "" +image_preview = "boards.jpg" summary = "An example of linking directly to an external project website using `external_link`." -tags = [] +tags = ["demo"] title = "External Project" external_link = "http://example.org" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8266ab3a..5f35f627 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,6 +2,7 @@ + {{ range .Site.Params.custom_js }} diff --git a/layouts/partials/widgets/projects.html b/layouts/partials/widgets/projects.html index 59ccafe0..009643dd 100644 --- a/layouts/partials/widgets/projects.html +++ b/layouts/partials/widgets/projects.html @@ -15,36 +15,68 @@
{{ . | markdownify }}
{{ end }} -{{ . }}
{{ end }} - - {{ if isset .Params "tags" }} - {{ $tagsLen := len .Params.tags }} - {{ if gt $tagsLen 0 }} -