Skip to content

Commit

Permalink
Docs: extract API reference to separate nav item
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Nov 10, 2024
1 parent f02632c commit c076835
Show file tree
Hide file tree
Showing 45 changed files with 77 additions and 85 deletions.
5 changes: 0 additions & 5 deletions web/docs/03-topic-guides/_category_.yml

This file was deleted.

4 changes: 0 additions & 4 deletions web/docs/05-api/_category_.yml

This file was deleted.

1 change: 0 additions & 1 deletion web/docs/06-release-notes/_category_.yml

This file was deleted.

7 changes: 7 additions & 0 deletions web/docs/api/00-introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
slug: /api
---

# Introduction

Welcome to TCFrame API reference.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -10
---

# 0.1.0

February 8, 2015
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -20
---

# 0.2.0

March 13, 2015
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -30
---

# 0.3.0

March 29, 2015
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -40
---

# 0.4.0

June 28, 2015
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -50
---

# 0.5.0

August 4, 2015
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -60
---

# 0.6.0

February 8, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -70
---

# 0.7.0

March 9, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -100
---

# 1.0.0

November 27, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -101
---

# 1.0.1

November 28, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -110
---

# 1.1.0

December 4, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -120
---

# 1.2.0

December 16, 2016
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -121
---

# 1.2.1

January 29, 2017
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -130
---

# 1.3.0

February 10, 2017
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -140
---

# 1.4.0

May 29, 2017
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -150
---

# 1.5.0

July 16, 2017
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar_position: -160
---

# 1.6.0

September 17, 2017
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
6 changes: 6 additions & 0 deletions web/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ const config = {
position: 'left',
label: 'Docs',
},
{
type: 'docSidebar',
sidebarId: 'apiSidebar',
position: 'left',
label: 'API',
},
{
href: 'https://github.com/ia-toki/tcframe',
label: 'GitHub',
Expand Down
69 changes: 58 additions & 11 deletions web/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,68 @@

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
docsSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
docsSidebar: [
'introduction',
'getting-started',
{
type: 'category',
label: 'Topic Guides',
link: {
type: 'generated-index',
slug: '/topic-guides',
description: 'In this guide, we will learn each aspect of TCFrame more thoroughly. Each section may have notes at the end, explaining the current limitations and future plans of the corresponding aspect.',
},
items: [
'topic-guides/problem-package',
'topic-guides/spec',
'topic-guides/io-variables',
'topic-guides/io-formats',
'topic-guides/styles',
'topic-guides/constraints',
'topic-guides/subtasks',
'topic-guides/test-cases',
'topic-guides/test-groups',
'topic-guides/multi-case',
'topic-guides/grading',
],
},
{
type: 'category',
label: 'Tutorials',
link: {
type: 'generated-index',
slug: '/tutorials',
description: 'Here, you can find case studies and best practices on how to write your spec files. It is expected that you have already read the getting started guide before reading through the tutorials.',
},
items: [
'tutorials/tutorial-1',
'tutorials/tutorial-2',
]
},
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
label: 'Release Notes',
items: [
'release-notes/1_6_0',
'release-notes/1_5_0',
'release-notes/1_4_0',
'release-notes/1_3_0',
'release-notes/1_2_1',
'release-notes/1_2_0',
'release-notes/1_1_0',
'release-notes/1_0_1',
'release-notes/1_0_0',
'release-notes/0_7_0',
'release-notes/0_6_0',
'release-notes/0_5_0',
'release-notes/0_4_0',
'release-notes/0_3_0',
'release-notes/0_2_0',
'release-notes/0_1_0',
]
},
],
*/
apiSidebar: [{type: 'autogenerated', dirName: 'api'}],
};

export default sidebars;
6 changes: 6 additions & 0 deletions web/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 14px;
--ifm-link-color: #3b73b9;
--ifm-navbar-link-hover-color: #3b73b9;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

Expand Down Expand Up @@ -63,3 +64,8 @@ li > p:has(strong) {
margin-top: 6px !important;
}
}

.navbar__link--active {
background-color: var(--ifm-menu-color-background-active);
border-radius: .25rem;
}

0 comments on commit c076835

Please sign in to comment.