Commit 6f2474b4 authored by Drane, Lance's avatar Drane, Lance
Browse files

New approach to handling URLs



Signed-off-by: Drane, Lance's avatarLance Drane <dranelt@ornl.gov>
parent 115bf17e
......@@ -64,3 +64,11 @@ The process for hotfixes is similar to features, except for the following:
- Hotfix changes should be much narrower in focus - only make fixes which are mandatory for the application to function.
- Create a merge request into `main` .
- After the hotfix is merged into `main`, `main` should be merged into `dev` by a maintainer.
## Handling intra-site URLs
All URLs between website pages should work, regardless of the actual URL being used. You should be able to comment/uncomment the `baseurl` configuration value in `_config.yml` and have the website work consistently.
- Inside of HTML and Markdown, you should always reference URLs like ``` <a href="{{ 'path/to/page' | relative_url }}"> ...```
- Inside of SCSS, if using `url()`, just use a relative path to the file (i.e. `url(../images/image.png`))
- Inside of Javascript, start the URL string with ``` `${window.config.baseUrl}` ```
......@@ -215,6 +215,8 @@ GEM
racc (~> 1.4)
nokogiri (1.13.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
......@@ -256,6 +258,7 @@ GEM
PLATFORMS
universal-darwin-21
x86_64-linux
DEPENDENCIES
github-pages
......@@ -269,4 +272,4 @@ DEPENDENCIES
webrick
BUNDLED WITH
2.2.24
2.3.22
......@@ -4,7 +4,11 @@
### WEBSITE VARIABLES ###
name: "ORNL Software Catalog"
repo_url: "https://github.com/ORNL/ornl.github.io"
repo_url: "https://github.com/ORNL/software-catalog"
repo_branch: "dev"
# tree path varies based on github/gitlab repo, gitlab should be "-/tree"
repo_tree_path: "tree"
repo_blob_path: "blob"
lab_name: "ORNL"
### SEO ###
......@@ -12,7 +16,7 @@ lab_name: "ORNL"
title: ORNL Software Catalog
tagline: The hub for open-source software produced at ORNL
description: "Get the latest news and metadata about ORNL's software"
url: "https://software.ornl.gov/catalog"
url: "https://ornl.github.io/software-catalog/"
author: "ORNL Open Source Software <software@ornl.gov>"
twitter:
username: ornl
......@@ -36,11 +40,11 @@ remote_theme: ORNL/Jekyll-ORNL-Theme@main
### JEKYLL DEFAULTS ###
#baseurl: ""
# NOTE: the website needs to be able to work with the next line both commented AND uncommented
baseurl: "/software-catalog"
# supported Github plugins are available at https://pages.github.com/versions/
plugins:
#[github-pages]
- jekyll-github-metadata
- jekyll-seo-tag
- jekyll-feed
- jekyll-sitemap
......
......@@ -148,7 +148,7 @@
<div class="field-element">
<article aria-label="footer-logos-UTB.png">
<a href="https://ut-battelle.org/">
<img src="/assets/images/footer-logos-UTB_0.png" width="154" height="42" alt="UT-Battelle Icon" typeof="foaf:Image" />
<img src="{{ 'assets/images/footer-logos-UTB_0.png' | relative_url }}" width="154" height="42" alt="UT-Battelle Icon" typeof="foaf:Image" />
</a>
</article>
</div>
......@@ -158,7 +158,7 @@
<div class="field-element">
<article aria-label="footer-logo-DOE-OOS.png">
<a href="https://www.energy.gov/science/">
<img src="/assets/images/footer-logo-DOE-OOS_0.png" width="252" height="44" alt="DOE Icon" typeof="foaf:Image" />
<img src="{{ 'assets/images/footer-logo-DOE-OOS_0.png' | relative_url }}" width="252" height="44" alt="DOE Icon" typeof="foaf:Image" />
</a>
</article>
</div>
......
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="{{site.baseurl}}" />
{% seo %}
......@@ -18,5 +17,8 @@
{% endif %}
<!-- Transfer lab-specific variables from site-generator config file to Javascript via window definitions here -->
<script>
window.labName = '{{site.lab_name}}';
window.config = {
'labName': '{{site.lab_name}}',
'baseUrl': '{{site.baseurl}}',
}
</script>
......@@ -18,32 +18,32 @@
<li id="home"
{% if page.url == "/" %} class="active dropdown"
{% else %} class="dropdown"
{% endif %}><a class="navbar-normal" href="/">Home</a>
{% endif %}><a class="navbar-normal" href="{{ '/' | relative_url }}">Home</a>
</li>
<li id="news"
{% if page.url == "/news/" %} class="active dropdown"
{% else %} class="dropdown"
{% endif %}><a class="navbar-normal" href="/news/">News</a>
{% endif %}><a class="navbar-normal" href="{{ 'news' | relative_url }}">News</a>
<div class="dropdown-content">
<p><a class="navbar-normal" href="/news/archive/">Archive</a></p>
<p><a class="navbar-normal" href="{{ 'news/archive' | relative_url }}">Archive</a></p>
</div>
</li>
<li id="about"
{% if page.url == "/about/" %} class="active dropdown"
{% else %} class="dropdown"
{% endif %}><a class="navbar-normal" href="/about/">About</a>
{% endif %}><a class="navbar-normal" href="{{ 'about' | relative_url }}">About</a>
<div class="dropdown-content">
<p><a class="navbar-normal" href="/about/faq/">FAQ</a></p>
<p><a class="navbar-normal" href="/about/licenses/">Licenses Guide</a></p>
<p><a class="navbar-normal" href="{{ 'about/faq' | relative_url }}">FAQ</a></p>
<p><a class="navbar-normal" href="{{ 'about/licenses' | relative_url }}">Licenses Guide</a></p>
</div>
</li>
<li id="explore"
{% if page.url == "/explore/" %} class="active dropdown"
{% else %} class="dropdown"
{% endif %}><a class="navbar-normal" href="/explore/">Explore</a>
{% endif %}><a class="navbar-normal" href="{{ 'explore' | relative_url }}">Explore</a>
<div class="dropdown-content">
<p><a class="navbar-normal" href="/explore/dependencies/">Dependencies</a></p>
<p><a class="navbar-normal" href="/explore/popular-repos/">Popular Repositories</a></p>
<p><a class="navbar-normal" href="{{ 'explore/dependencies' | relative_url }}">Dependencies</a></p>
<p><a class="navbar-normal" href="{{ 'explore/popular-repos' | relative_url }}">Popular Repositories</a></p>
</div>
</li>
<li id="github-button"><a href="https://github.com/ornl"><span class="fa fa-github fa-lg"></span></a></li>
......@@ -54,7 +54,7 @@
</div>
</nav>
<span id="forkongithub"><a alt="Fork me on GitHub" title="Fork me on GitHub" href="{{site.repo_url}}/tree/main/{{page.path}}" target="_blank">Fork me on GitHub</a></span>
<span id="forkongithub"><a alt="Fork me on GitHub" title="Fork me on GitHub" href="{{site.repo_url}}" target="_blank">Fork me on GitHub</a></span>
<header id="banner-container">
<div id="banner-img"></div>
......
......@@ -3,7 +3,7 @@ layout: default
---
<h2>
<a href="{{ page.url }}">{{ page.title }}</a>
<a href="{{ page.url | relative_url }}">{{ page.title }}</a>
<small class="pull-right">{{ page.date | date: '%B %d, %Y' }}</small>
</h2>
......
......@@ -3,7 +3,7 @@ layout: default
---
<p>
<a href="/category/?name=all" class="btn btn-primary nav-button" role="button">Back to Category List</a>
<a href="{{ 'category/?name=all' | relative_url }}" class="btn btn-primary nav-button" role="button">Back to Category List</a>
</p>
<div id="inner-content">
......
......@@ -373,7 +373,7 @@ a:visited {
height: 300px;
max-height: 33vh;
filter: brightness(75%);
background-image: url("/assets/images/banner.jpg");
background-image: url("../assets/images/banner.jpg");
background-repeat: round;
}
......
......@@ -98,7 +98,7 @@ When in doubt, contact a Derivative Classifier (DC) and/or IM for further guidan
Make sure your repo contains [community health files](https://github.com/LLNL/.github/tree/main/community-health):
- An appropriate open source **license** and `LLNL-CODE-xxxxxx` **release number**. See the [LLNL Software Licensing](/about/licenses) page for details and examples.
- An appropriate open source **license** and `LLNL-CODE-xxxxxx` **release number**. See the [ORNL Software Licensing]({{ 'about/licenses' | relative_url }}) page for details and examples.
- A [**README**](https://guides.github.com/features/wikis/) file that summarizes what the software does and how others can use it.
......@@ -112,7 +112,7 @@ After your project has been initially released on GitHub and you are ready to pr
Another good practice is to provide **user documentation**. Read the Docs (RtD) is a common platform for user guides, tutorials, quick start instructions, and other forms of documentation. Our [LLNL/.github repo](https://github.com/LLNL/.github) contains step-by-step instructions for setting up a RtD instance, a [template](https://github-main.readthedocs.io/en/latest/) you can start with, and links to various resources for tips and additional details.
Submit your repo to [**DOE CODE**](https://www.osti.gov/doecode/faq#what-is) so others can find it when searching through DOE-funded projects. After your repo is included in DOE CODE, you may also want to add the **digital object identifier** (DOI) to the repo. See the [relevant section](/about/licenses/#digital-object-identifier-doi) of our LLNL Software Licensing page for more information.
Submit your repo to [**DOE CODE**](https://www.osti.gov/doecode/faq#what-is) so others can find it when searching through DOE-funded projects. After your repo is included in DOE CODE, you may also want to add the **digital object identifier** (DOI) to the repo. See the [relevant section]({{ 'about/licenses/#digital-object-identifier-doi' | relative_url }}) of our LLNL Software Licensing page for more information.
If your repo is research software, consider submitting it to the _Journal of Open Source Software_ ([JOSS](https://joss.theoj.org/about)). Submission will produce a **citation** to include in your README file, then users or other researchers can cite your software correctly. The [JOSS RtD site](https://joss.readthedocs.io/en/latest/submitting.html) describes the submission requirements. JOSS defines _research software_ as "software that solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library; or similar." (You can also [sign up](https://joss.theoj.org/reviewer-signup.html) to review JOSS papers, if you are so inclined.)
......@@ -120,13 +120,13 @@ If your repo is research software, consider submitting it to the _Journal of Ope
Repositories within the LLNL organization are owned and managed by LLNL. Please do not create personal repositories here.
Make sure your repository is included on this website’s home page and [full catalog](/). If you’ve set up your repository within the LLNL organization, you don’t need to take any action; it will automatically appear after the next data update.
Make sure your repository is included on this website’s home page and [full catalog]({{ '/' | relative_url }}). If you’ve set up your repository within the LLNL organization, you don’t need to take any action; it will automatically appear after the next data update.
- If your repository exists under a different organization, you can move it to LLNL by selecting “Transfer Ownership” under Settings.
- Alternatively, you can submit a pull request [updating the `input_lists.json` file](https://code.ornl.gov/rse/ornl.github.io/-/blob/main/_explore/input_lists.json), with your organization and/or repository names.
- Alternatively, you can submit a pull request [updating the `input_lists.json` file]({{site.repo_url}}/{{site.repo_blob_path}}/{{site.repo_branch}}/_explore/input_lists.json), with your organization and/or repository names.
- If you have a project logo, please follow the [instructions](https://code.ornl.gov/rse/ornl.github.io/-/tree/main/assets/images/logos) for naming and uploading the file. If your repo is part of a non-LLNL organization that has its own avatar, that image will automatically display next to the repo name in the catalog, unless superseded by a repo-specific logo.
- If you have a project logo, please follow the [instructions]({{site.repo_url}}/{{site.repo_tree_path}}/{{site.repo_branch}}/assets/images/logos) for naming and uploading the file. If your repo is part of a non-LLNL organization that has its own avatar, that image will automatically display next to the repo name in the catalog, unless superseded by a repo-specific logo.
### How do I let people know about my new repo?
......@@ -134,7 +134,7 @@ Now that your project is on GitHub, make sure users and contributors can find it
1. Include meaningful metadata (description and topic tags) in your repository. Example: [Spack](https://github.com/spack/spack) lists several topic tags below a one-sentence description.
- Start with our [list](https://code.ornl.gov/rse/ornl.github.io/-/blob/main/category/README.md) of recommended, standardized topics.
- Start with our [list]({{site.repo_url}}/{{site.repo_blob_path}}/{{site.repo_branch}}/category/README.md) of recommended, standardized topics.
- See helpful hints on [GitHub's topic help page](https://help.github.com/articles/about-topics/). Add tags relevant to your project's programming language, platforms, and more (e.g., Python, HPC, Linux).
......@@ -146,7 +146,7 @@ Now that your project is on GitHub, make sure users and contributors can find it
### How do I contribute news or other content to this website?
Submit a pull request! This website is a GitHub repo just like any other LLNL open source project. News is housed in the [`_posts` directory](https://code.ornl.gov/rse/ornl.github.io/-/tree/main/_posts), and templates are found in the [LLNL/.github repo](https://github.com/LLNL/.github). See the guidelines below about contributing.
Submit a pull request! This website is a GitHub repo just like any other LLNL open source project. News is housed in the [`_posts` directory]({{site.repo_url}}/{{site.repo_tree_path}}/{{site.repo_branch}}/_posts), and templates are found in the [LLNL/.github repo](https://github.com/LLNL/.github). See the guidelines below about contributing.
Before contributing, please contact [open-source@llnl.gov](mailto:open-source@llnl.gov) with your idea or if you have questions about whether your proposed content requires the LLNL review and release process.
......@@ -154,7 +154,7 @@ Before contributing, please contact [open-source@llnl.gov](mailto:open-source@ll
1. Remove your repo’s topic tags (e.g., `math-physics`), which connect it to this website’s browsable categories. Also remove the `radiuss` tag, if applicable.
2. Submit a pull request [updating the `input_lists.json` file](https://code.ornl.gov/rse/ornl.github.io/-/blob/main/_explore/input_lists.json) to remove your repo’s name.
2. Submit a pull request [updating the `input_lists.json` file]({{site.repo_url}}/{{site.repo_blob_path}}/{{site.repo_branch}}/_explore/input_lists.json) to remove your repo’s name.
3. Change your repo's status via Settings > Manage Access > Who has access > Manage > Danger Zone > Archive this repository (`settings#danger-zone`). Contact [open-source@llnl.gov](mailto:open-source@llnl.gov) if for some reason GitHub won't let you complete this step.
......@@ -166,7 +166,7 @@ Migrating the repo outside of the LLNL organization requires an organization adm
Once the repository has moved to the new organization:
1. Submit a pull request [updating the `input_lists.json` file](https://code.ornl.gov/rse/ornl.github.io/-/blob/main/_explore/input_lists.json) to add the new organization/repo’s name. This allows for the software catalog to continue including the project even after it moves.
1. Submit a pull request [updating the `input_lists.json` file]({{site.repo_url}}/{{site.repo_blob_path}}/{{site.repo_branch}}/_explore/input_lists.json) to add the new organization/repo’s name. This allows for the software catalog to continue including the project even after it moves.
2. Retain topic tags (e.g., `math-physics`) to connect it to this website’s browsable categories, including the `radiuss` tag, if applicable.
......
......@@ -16,7 +16,7 @@ Welcome to the Oak Ridge National Laboratory (ORNL) software portal&mdash;a hub
LLNL developers create and evolve software on a daily basis. Some of this software is used only internally; other components are licensed for use by external partners and collaborators; and still other software is released and actively developed out in the open on software-hosting platforms. This website is the gateway to all of it.
LLNL is a Department of Energy (DOE) institution, so we abide by the [Federal Source Code Policy](https://sourcecode.cio.gov) that guides release of open source software (OSS). And not just because we have to but because we _want_ to. Long before GitHub was founded, [we started releasing software](/explore/) for public use and collaboration.
LLNL is a Department of Energy (DOE) institution, so we abide by the [Federal Source Code Policy](https://sourcecode.cio.gov) that guides release of open source software (OSS). And not just because we have to but because we _want_ to. Long before GitHub was founded, [we started releasing software]({{ 'explore' | relative_url }}) for public use and collaboration.
We often work with other national labs, universities, and industry partners. Working on these projects is a lot easier when we can share code directly. For example, building the next generation of supercomputers requires collaboration. The [Exascale Computing Project (ECP)](https://www.exascaleproject.org) uses OSS to develop the exascale ecosystem of apps, analytics, infrastructure, and so much more. The ECP is tackling a huge range of scientific areas, like precision medicine and nuclear physics. Future breakthroughs will likely owe some debt to the best practices and accelerated development made possible by OSS.
......
---
title: LLNL Software Licensing
title: ORNL Software Licensing
layout: default
---
......@@ -10,20 +10,20 @@ layout: default
- Table of Contents
{:toc}
_This page contains information meant for LLNL Employees with instructions for
_This page contains information meant for ORNL Employees with instructions for
how to mark their source code projects. It is not intended to serve as legal
advice._
### Required Files
All LLNL software must contain the following files at the root of the source
All ORNL software must contain the following files at the root of the source
code repository:
#### 1. README file
All projects shall have a `README.md` file at the root of the repository.
The `README.md` must contain the LLNL release number
(`LLNL-CODE-XXXXXX`). We recommend putting it at the bottom in a section
The `README.md` must contain the ORNL release number
(`ORNL-CODE-XXXXXX`). We recommend putting it at the bottom in a section
called "Release". See
[this example](https://github.com/spack/spack#release).
......@@ -43,7 +43,7 @@ formatting and links so that your `README.md` will render nicely on
GitHub. Take a look at GitHub's
[markdown guide](https://guides.github.com/features/mastering-markdown/)
for the basics. For inspiration, look at other projects' `README.md`
files at [software.ornl.gov/catalog/](/), or take a look
files in our [catalog]({{ '/' | relative_url }}), or take a look
at this
[simple README.md template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2).
......@@ -64,13 +64,13 @@ One of the following files must be included at the top level of your repository
with the file name `LICENSE`. The only content which may be changed in the file
is the copyright year.
- [Apache 2.0 License with LLVM Exception](/about/licenses/apache-2.0-llvm-exception.txt)
- [Apache 2.0 License](/about/licenses/apache-2.0.txt)
- [BSD-3 License](/about/licenses/bsd-3-clause.txt)
- [GPL-2.0 License](/about/licenses/gpl-2.0.txt)
- [GPL-3.0 License](/about/licenses/gpl-3.0.txt)
- [LGPL-2.1 License](/about/licenses/lgpl-2.1.txt)
- [MIT License](/about/licenses/mit.txt)
- [Apache 2.0 License with LLVM Exception]({{'about/licenses/apache-2.0-llvm-exception.txt' | relative_url}})
- [Apache 2.0 License]({{'about/licenses/apache-2.0.txt' | relative_url}})
- [BSD-3 License]({{'about/licenses/bsd-3-clause.txt' | relative_url}})
- [GPL-2.0 License]({{'about/licenses/gpl-2.0.txt' | relative_url}})
- [GPL-3.0 License]({{'about/licenses/gpl-3.0.txt' | relative_url}})
- [LGPL-2.1 License]({{'about/licenses/lgpl-2.1.txt' | relative_url}})
- [MIT License]({{'about/licenses/mit.txt' | relative_url}})
If your repository was approved for release under a different open source
license, the text of that license will be provided by the Innovation and
......
......@@ -26,6 +26,6 @@ In general, topic tags raise a repo's visibility on GitHub and help users find r
To add a new category to the catalog:
1. Update this README with the category name (in alphabetical order), description, and tag.
2. Add the new icon (.svg) to [Assets > Images > Categories](https://code.ornl.gov/rse/ornl.github.io/-/tree/main/assets/images/categories).
3. Update [`category_info.json`](https://code.ornl.gov/rse/ornl.github.io/-/blob/main/category/category_info.json) with category metadata such as image file path, descriptive blurb, and corresponding topic(s).
2. Add the new icon (.svg) to [Assets > Images > Categories](../assets/images/categories).
3. Update [`category_info.json`](category_info.json) with category metadata such as image file path, descriptive blurb, and corresponding topic(s).
4. Tag repos with the new topic as appropriate.
......@@ -44,7 +44,7 @@ function renderHeaderHtml() {
const category = catData[selectedCategoryIndex];
REPO_HEADER_ELEMENT.innerHTML = `
<img
src="${category.icon.path}"
src="${window.config.baseUrl}${category.icon.path}"
width="125"
height="125"
alt="${category.icon.alt}"
......@@ -81,7 +81,7 @@ function renderRepoHtml() {
.map(
(repo) => `
<div class="flex-item">
<a href="/repo?name=${encodeURIComponent(repo.nameWithOwner)}">
<a href="${window.config.baseUrl}/repo?name=${encodeURIComponent(repo.nameWithOwner)}">
<h3 class="text-center">
<span title="Name">${repo.name}</span>
<small><span title="Owner">${repo.owner}</span></small>
......@@ -139,7 +139,7 @@ function onCategoryUpdate(categoryIdx) {
}
// init
fetch('/category/category_info.json')
fetch(`${window.config.baseUrl}/category/category_info.json`)
.then((res) => res.json())
.then((catInfoJson) => {
catData = Object.values(catInfoJson.data)
......@@ -161,7 +161,7 @@ fetch('/category/category_info.json')
alt: 'All Software',
},
description: {
short: `Browse all ${window.labName} open source projects`,
short: `Browse all ${window.config.labName} open source projects`,
long: '',
},
displayTitle: 'All Software',
......@@ -184,7 +184,7 @@ fetch('/category/category_info.json')
(category, idx) => `
<button id="btn__${idx}" class="tab${idx === selectedCategoryIndex ? ' selected-tab' : ''}">
<img
src="${category.icon.path}"
src="${window.config.baseUrl}${category.icon.path}"
height="40"
width="40"
alt="${category.icon.alt}"
......@@ -218,7 +218,7 @@ fetch('/category/category_info.json')
}
// map topics to categories
fetch('/explore/github-data/intRepos_Topics.json')
fetch(`${window.config.baseUrl}/explore/github-data/intRepos_Topics.json`)
.then((res) => res.json())
.then((topicJson) => {
const reposObj = topicJson.data;
......@@ -236,7 +236,7 @@ fetch('/category/category_info.json')
}
topicRepos.push(catRepos);
});
fetch('/explore/github-data/intReposInfo.json').then((res) => res.json())
fetch(`${window.config.baseUrl}/explore/github-data/intReposInfo.json`).then((res) => res.json())
.then((infoJson) => {
const reposInfoObj = infoJson.data;
for (let repo in reposInfoObj) {
......
......@@ -57,7 +57,7 @@ function draw_popularRepos(areaID, columns = 2, orthogonalOrdering = false) {
.attr('y', (d, i) => (fontSize + rowSpacing) * i)
.html(
(d) =>
`<tspan style="font-weight: bold">${d.position}.</tspan> <a xlink:href=${window.location['origin']}/repo/?name=${encodeURIComponent(`${d.entry.owner}/${d.entry.name}`)}>${d.entry.owner}/${d.entry.name}</a>`,
`<tspan style="font-weight: bold">${d.position}.</tspan> <a xlink:href=${window.config.baseUrl}/repo/?name=${encodeURIComponent(`${d.entry.owner}/${d.entry.name}`)}>${d.entry.owner}/${d.entry.name}</a>`,
);
chart
......
......@@ -35,7 +35,7 @@ function uniqueLogo(logos, fileName, ownerAvatar) {
}
// init
fetch('/category/category_info.json')
fetch(`${window.config.baseUrl}/category/category_info.json`)
.then((res) => res.json())
.then((json) => {
const catData = Object.values(json.data).sort((a, b) => {
......@@ -43,7 +43,7 @@ fetch('/category/category_info.json')
const y = b['title'].toLowerCase();
return x < y ? -1 : x > y ? 1 : 0;
});
fetch('/explore/github-data/intRepos_Topics.json')
fetch(`${window.config.baseUrl}/explore/github-data/intRepos_Topics.json`)
.then((res) => res.json())
.then((topicJson) => {
const reposObj = topicJson.data;
......@@ -63,11 +63,11 @@ fetch('/category/category_info.json')
}
return catRepos;
});
fetch('/assets/images/logos/repo_logos.json')
fetch(`${window.config.baseUrl}/assets/images/logos/repo_logos.json`)
.then((res) => res.json())
.then((logosJson) => {
const logos = logosJson.data;
fetch('/explore/github-data/intReposInfo.json')
fetch(`${window.config.baseUrl}/explore/github-data/intReposInfo.json`)
.then((res) => res.json())
.then((infoJson) => {
const reposInfoObj = infoJson.data;
......@@ -107,8 +107,8 @@ fetch('/category/category_info.json')
document.getElementById('categories').innerHTML = catData
.map((category, categoryIdx) => `
<div class="flex-category dynamic">
<a class="dynamic-link" href="/category/?name=${categoryToUrl(category.title)}">
<img src="${category.icon.path}" height="150" width="150" alt="${category.icon.alt}" loading="lazy" />
<a class="dynamic-link" href="${window.config.baseUrl}/category/?name=${categoryToUrl(category.title)}">
<img src="${window.config.baseUrl}${category.icon.path}" height="150" width="150" alt="${category.icon.alt}" loading="lazy" />
<h2>${sanitizeHTML(category.title)}</h2>
<p class="text-center">${sanitizeHTML(category.description.short)}</p>
</a>
......@@ -136,14 +136,14 @@ fetch('/category/category_info.json')
</span>
<span>
<a href="/repo/?name=${encodeURIComponent(repo.nameWithOwner)}" title="Repo Info">
<a href="${window.config.baseUrl}/repo/?name=${encodeURIComponent(repo.nameWithOwner)}" title="Repo Info">
<span class="fa fa-info-circle"></span>
</a>
</span>
</p>
`).join('')}
</div>
${topicRepos[categoryIdx].length > MAX_REPOS_TO_SHOW ? `<a href="/category/?name=${categoryToUrl(category.title)}" class="more">MORE...</a>` : ''}
${topicRepos[categoryIdx].length > MAX_REPOS_TO_SHOW ? `<a href="${window.config.baseUrl}/category/?name=${categoryToUrl(category.title)}" class="more">MORE...</a>` : ''}
</div>
`).join('');
});
......
......@@ -93,7 +93,7 @@ function renderRepo(repo, pulls, issues) {
* @param {string} queryParam parameter which was decoded from URL query parameter
*/
function render(queryParam) {
fetch('/explore/github-data/intReposInfo.json')
fetch(`${window.config.baseUrl}/explore/github-data/intReposInfo.json`)
.then((res) => res.json())
.then((infoJson) => {
const reposObj = infoJson.data;
......
# News Posts
News posts appear on the [News](https://software.ornl.gov/news/), [Events](https://software.ornl.gov/news/events/), and [Archive](https://software.ornl.gov/news/archive/) pages in reverse chronological order (i.e., newest first). The list is curated to promote ORNL's open source endeavors and community engagement. Posts should be tagged with at least one of the following categories, which are not associated with the [catalog topics](https://code.ornl.gov/rse/ornl.github.io/-/tree/main/_posts) applied to repos:
News posts appear on the [News](https://ornl.github.io/software-catalog/news/), [Events](https://ornl.github.io/software-catalog/news/events/), and [Archive](https://ornl.github.io/software-catalog/news/archive/) pages in reverse chronological order (i.e., newest first). The list is curated to promote ORNL's open source endeavors and community engagement. Posts should be tagged with at least one of the following categories, which are not associated with the [catalog topics](../../_posts) applied to repos:
- `event` - announcement of an upcoming event/conference
- `event-report` - recap of an event/conference
......
......@@ -67,4 +67,4 @@ permalink: /news/
</section>
<a class="btn btn-block news-archive-link" href="/news/archive/" role="button">See all news in the archive</a>
<a class="btn btn-block news-archive-link" href="{{ 'news/archive' | relative_url }}" role="button">See all news in the archive</a>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment