Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tags to links in docs #2183

Merged
merged 8 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_markbind/layouts/headers/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<navbar type="dark">
<a slot="brand" href="{{baseUrl}}/index.html" title="Home" class="navbar-brand"><img src="{{baseUrl}}/images/logo-darkbackground.svg" height="20"></a>
<li><a highlight-on="exact" href="{{baseUrl}}/index.html" class="nav-link">HOME</a></li>
<div tags="environment--ug"><li><a highlight-on="sibling-or-child" href="{{baseUrl}}/userGuide/index.html" class="nav-link">USER GUIDE</a></li></div>
<div tags="environment--dg"><li><a highlight-on="sibling-or-child" href="{{baseUrl}}/devGuide/index.html" class="nav-link">DEVELOPER GUIDE</a></li></div>
<div tags="environment--ug environment--combined"><li><a highlight-on="sibling-or-child" href="{{baseUrl}}/userGuide/index.html" class="nav-link">USER GUIDE</a></li></div>
<div tags="environment--dg environment--combined"><li><a highlight-on="sibling-or-child" href="{{baseUrl}}/devGuide/index.html" class="nav-link">DEVELOPER GUIDE</a></li></div>
<li><a highlight-on="exact" href="{{baseUrl}}/showcase.html" class="nav-link">SHOWCASE</a></li>
<li><a highlight-on="exact" href="{{baseUrl}}/about.html" class="nav-link">ABOUT</a></li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion docs/devGuide/bootcamp/contributeToDocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Ensure that you can serve the MarkBind documentation site in development mode. Y

In the following steps, we will be fixing a hypothetical typo. You do not need to commit the changes or raise a PR, but understand the context and follow the steps to get a feel for the process.

**!!Let's suppose we want to change the use of "Pop-Up" in our [user guide](../../userGuide/components/popups.html) to "Popup" (i.e. remove the hyphen).!!**
**!!Let's suppose we want to change the use of "Pop-Up" in our <a tags="environment--combined" href="/userGuide/components/popups.html">user guide</a><a tags="environment--dg" href="https://markbind.org/userGuide/components/popups.html">user guide</a> to "Popup" (i.e. remove the hyphen).!!**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are switching to the new combined tag, do we still need the anchor with tags="environment --dg", and if so, in what situations do we need them?

^ This comment applies for all occurrences of this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lhw-1! We are not exactly switching to the new combined tag, we are adding a new combined tag to differentiate when using serving the site.json which displays both the ug and dg together and serving dg-site.json and ug-site.json individually as the individual dg and ug do not have access to the intra-linked files between them

Copy link
Contributor

@tlylt tlylt Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lhw-1! We are not exactly switching to the new combined tag, we are adding a new combined tag to differentiate when using serving the site.json which displays both the ug and dg together and serving dg-site.json and ug-site.json individually as the individual dg and ug do not have access to the intra-linked files between them

👍 so there are three scenarios:

  • DG + UG - markbind-master via netlify
  • DG - markbind.org via github pages
  • UG - markbind.org/devdocs via github pages

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lhw-1! We are not exactly switching to the new combined tag, we are adding a new combined tag to differentiate when using serving the site.json which displays both the ug and dg together and serving dg-site.json and ug-site.json individually as the individual dg and ug do not have access to the intra-linked files between them

Yep, that makes sense!

I think that just as a side note, the duplication of the anchor tags seem unnecessary - a method of declaring an alternate syntax for tags that do not provide such a way could be something to look into. For instance, it would be nice to be able to declare <a tags="environment--combined" href="/userGuide/components/popups.html">user guide</a><alt tags="environment--dg" href="https://markbind.org/userGuide/components/popups.html" />.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that makes sense!

I think that just as a side note, the duplication of the anchor tags seem unnecessary - a method of declaring an alternate syntax for tags that do not provide such a way could be something to look into. For instance, it would be nice to be able to declare <a tags="environment--combined" href="/userGuide/components/popups.html">user guide</a><alt tags="environment--dg" href="https://markbind.org/userGuide/components/popups.html" />.

I think thats a great idea! Do you want to open an issue to request that feature?


<box type="info" light>

Expand Down
34 changes: 17 additions & 17 deletions docs/devGuide/bootcamp/exploreMarkBind.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Getting to know MarkBind as a user will help you understand what MarkBind offers

## Setup the master branch of MarkBind

As mentioned in our [user guide]({{baseUrl}}/userGuide/gettingStarted.html), we can either install MarkBind via npm or create a new MarkBind site with npx.
As mentioned in our <a tags="environment--combined" href="/userGuide/gettingStarted.html">user guide</a><a tags="environment--dg" href="https://markbind.org/userGuide/gettingStarted.html">user guide</a>, we can either install MarkBind via npm or create a new MarkBind site with npx.

In this bootcamp, we want to set up the master branch MarkBind so that we can test out any changes we make to the codebase on our local machine.

Expand Down Expand Up @@ -218,7 +218,7 @@ $ markbind init
info: Initialization success.
```

4. With the site generated, create a `.gitignore` file in the root directory and add the [recommended content]({{baseUrl}}/userGuide/gitignoreFile.html) to it. This is to ensure log files etc are not committed to the repository.
4. With the site generated, create a `.gitignore` file in the root directory and add the <a tags="environment--combined" href="/userGuide/gitignoreFile.html">recommended content</a><a tags="environment--dg" href="https://markbind.org/userGuide/gitignoreFile.html">recommended content</a> to it. This is to ensure log files etc are not committed to the repository.


<box type="important" light>
Expand All @@ -239,8 +239,8 @@ You now have the test site up and running!
MarkBind contains a range of additional syntax on top of Markdown. It also comes with a set of components that can be used to create content.

Two essential sections of the user guide to get started with are:
- [Formatting Contents]({{baseUrl}}/userGuide/formattingContents.html) - Covering Markdown & Markdown-like syntax.
- [Using Components]({{baseUrl}}/userGuide/usingComponents.html) - Covering MarkBind components (Built with Vue.js or Native HTML).
- <a tags="environment--combined" href="/userGuide/formattingContents.html">Formatting Contents</a><a tags="environment--dg" href="https://markbind.org/userGuide/formattingContents.html">Formatting Contents</a> - Covering Markdown & Markdown-like syntax.
- <a tags="environment--combined" href="/userGuide/usingComponents.html">Using Components</a><a tags="environment--dg" href="https://markbind.org/userGuide/usingComponents.html">Using Components</a> - Covering MarkBind components (Built with Vue.js or Native HTML).

<panel src="{{baseUrl}}/userGuide/authoringContents.md" header="**Creating Content**" type="info" minimized></panel>

Expand All @@ -251,14 +251,14 @@ Now, let's try editing the `index.md` file to add some content of our own!
1. Open the `index.md` file in your `mb-dev-xxx` folder.
1. Replace the wording `Landing Page Title` with `MarkBind Developer Test Site`.
1. Modify or add some content utilizing one or more of the following syntaxes:
- [Text Styles]({{baseUrl}}/userGuide/formattingContents.html#text-styles)
- [Code Block]({{baseUrl}}/userGuide/formattingContents.html#code)
- [Emoji]({{baseUrl}}/userGuide/formattingContents.html#emoji)
- <a tags="environment--combined" href="/userGuide/formattingContents.html#text-styles">Text Styles</a><a tags="environment--dg" href="https://markbind.org/userGuide/formattingContents.html#text-styles">Text Styles</a>
- <a tags="environment--combined" href="/userGuide/formattingContents.html#code">Code Block</a><a tags="environment--dg" href="https://markbind.org/userGuide/formattingContents.html#code">Code Block</a>
- <a tags="environment--combined" href="/userGuide/formattingContents.html#emoji">Emoji</a><a tags="environment--dg" href="https://markbind.org/userGuide/formattingContents.html#emoji">Emoji</a>
- etc.
1. Modify or add some content utilizing one or more of the following components:
- [Box]({{baseUrl}}/userGuide/components/presentation.html#boxes)
- [Panel]({{baseUrl}}/userGuide/components/presentation.html#panels)
- [Tooltip]({{baseUrl}}/userGuide/components/popups.html#tooltips)
- <a tags="environment--combined" href="/userGuide/components/presentation.html#boxes">Box</a><a tags="environment--dg" href="https://markbind.org/userGuide/components/presentation.html#boxes">Box</a>
- <a tags="environment--combined" href="/userGuide/components/presentation.html#panels">Panel</a><a tags="environment--dg" href="https://markbind.org/userGuide/components/presentation.html#panels">Panel</a>
- <a tags="environment--combined" href="/userGuide/components/presentation.html#tooltips">Tooltip</a><a tags="environment--dg" href="https://markbind.org/userGuide/components/presentation.html#tooltips">Tooltip</a>
- etc.

<box type="important" light>
Expand All @@ -277,9 +277,9 @@ You now have created content with MarkBind!
## Modify Site Structure and Configuration

There are a few ways to modify the site's (as well as the page's) structure and configuration. We will cover the following:
- [Frontmatter]({{baseUrl}}/userGuide/tweakingThePageStructure.html#frontmatter)
- [Layouts]({{baseUrl}}/userGuide/tweakingThePageStructure.html#layouts)
- [site.json]({{baseUrl}}/userGuide/siteJsonFile.html)
- <a tags="environment--combined" href="/userGuide/tweakingThePageStructure.html#frontmatter">Frontmatter</a><a tags="environment--dg" href="https://markbind.org/userGuide/tweakingThePageStructure.html#frontmatter">Frontmatter</a>
- <a tags="environment--combined" href="/userGuide/tweakingThePageStructure.html#layouts">Layouts</a><a tags="environment--dg" href="https://markbind.org/userGuide/tweakingThePageStructure.html#layouts">Layouts</a>
- <a tags="environment--combined" href="/userGuide/siteJsonFile.html">site.json</a><a tags="environment--dg" href="https://markbind.org/userGuide/siteJsonFile.html">site.json</a>

Let's continue with the test site we created earlier and modify the `index.md` file via frontmatter.

Expand Down Expand Up @@ -349,7 +349,7 @@ MarkBind sites can be easily deployed with CLI commands or via CI. Let's try dep

1. Open the `site.json` file in your `mb-dev-xxx` folder.
1. Change `"baseUrl": "",` to `"baseUrl": "/mb-dev-xxx",` (Note the leading `/` and that the value is the same as your GitHub repository name).
1. Create a `.github/workflows/deploy.yml` file with the following content mentioned in the [GitHub Actions guide]({{baseUrl}}/userGuide/deployingTheSite.html#deploying-via-github-actions).
1. Create a `.github/workflows/deploy.yml` file with the following content mentioned in the <a tags="environment--combined" href="/userGuide/deployingTheSite.html#deploying-via-github-actions">GitHub Actions guide</a><a tags="environment--dg" href="https://markbind.org/userGuide/deployingTheSite.html#deploying-via-github-actions">GitHub Actions guide</a>.
1. Note that you should change `branches: master` to `branches: main` if you are using the `main` branch.

<panel src="{{baseUrl}}/userGuide/deployingTheSite.md#markbind-action-tip" header="**MarkBind Action**" type="info" expanded/>
Expand Down Expand Up @@ -382,10 +382,10 @@ Congratulations! :tada::tada::tada: You have deployed your MarkBind site!
In the first part of this bootcamp, we experimented with MarkBind as a user. We have set up the master branch of MarkBind and created a new MarkBind site. We have also created content with MarkBind components/syntax and deployed our site.

Here are some additional tasks for you to try out:
- [ ] Create a new MarkBind site with a different [theme]({{baseUrl}}/userGuide/themes.html)
- [ ] Try out MarkBind's [include mechanism]({{baseUrl}}/userGuide/reusingContents.html#includes)
- [ ] Create a new MarkBind site with a different <a tags="environment--combined" href="/userGuide/themes.html">theme</a><a tags="environment--dg" href="https://markbind.org/userGuide/themes.html">theme</a>
- [ ] Try out MarkBind's <a tags="environment--combined" href="/userGuide/reusingContents.html#includes">include mechanism</a><a tags="environment--dg" href="https://markbind.org/userGuide/reusingContents.html#includes">include mechanism</a>
- [ ] Create a dedicated MarkBind site for your personal usage and [share it with us](https://github.com/MarkBind/markbind/discussions/new?category=show-and-tell)
- You can see some examples in the [MarkBind showcase]({{baseUrl}}/showcase.html)
- You can see some examples in the [MarkBind showcase]({{ baseUrl }}/showcase.html)

Take a break now :coffee: and we will continue with the second part of the bootcamp!

Expand Down
2 changes: 1 addition & 1 deletion docs/devGuide/design/projectStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The MarkBind project is developed in a <tooltip content="We follow a monorepo ap

* Various libraries (contained in `lib`) and plugins (in `plugins`) are also stored here. Some external libraries have also been amended to suit MarkBind's purpose – see `patches`.

* MarkBind's [templates](https://markbind.org/userGuide/templates.html), used in the `markbind init` command.
* MarkBind's <a tags="environment--combined" href="/userGuide/templates.html">templates</a><a tags="environment--dg" href="https://markbind.org/userGuide/templates.html">templates</a>, used in the `markbind init` command.

* Unit Tests (though there are more unit tests and functional tests in the cli library)

Expand Down
2 changes: 1 addition & 1 deletion docs/devGuide/devGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Markdown
* Command-line environment

**Third, ensure you have spent time with MarkBind and familiar with the content of the [user guide](https://markbind.org/).** It's important to know the product well before you start contributing code.
**Third, ensure you have spent time with MarkBind and familiar with the content of the <a tags="environment--combined" href="/">user guide</a><a tags="environment--dg" href="https://markbind.org/">user guide</a>.** It's important to know the product well before you start contributing code.

**Now, follow these steps to get started on contributing:**

Expand Down
6 changes: 3 additions & 3 deletions docs/devGuide/development/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The sections below has more information about various stages of submitting a PR.
Once done, see these screenshots for sample debugging configurations, and tweak them further to suit your needs.

**1. Using the docs as a development environment**, with:
* the [lazy reload `-o`](https://markbind.org/userGuide/cliCommands.html#serve-command) option to speed up page building
* the <a tags="environment--combined" href="/userGuide/cliCommands.html#serve-command">lazy reload`-o`</a><a tags="environment--dg" href="https://markbind.org/userGuide/cliCommands.html#serve-command">lazy reload`-o`</a> option to speed up page building
* the `-d` developer option. (see [below](#editing-frontend-features))

{.mb-3}
Expand All @@ -61,7 +61,7 @@ The sections below has more information about various stages of submitting a PR.
In your `.vscode/launch.json` file, you may use these sample configurations as a baseline, and tweak them as you see fit.

**1. Using the docs as a development environment**, with:
* the [lazy reload `-o`](https://markbind.org/userGuide/cliCommands.html#serve-command) option to speed up page building
* the <a tags="environment--combined" href="/userGuide/cliCommands.html#serve-command">lazy reload`-o`</a><a tags="environment--dg" href="https://markbind.org/userGuide/cliCommands.html#serve-command">lazy reload`-o`</a> option to speed up page building
* the `-d` developer option. (see [below](#editing-frontend-features))

{.mb-3}
Expand Down Expand Up @@ -150,7 +150,7 @@ Hence, if you need to view the latest frontend changes (relating to `packages/co
This adds the necessary webpack middlewares to the development server to compile the above bundles,
and enables live and hot reloading for frontend source files.
1. Run `npm run build:web` in the root directory, which builds the above bundles,
then run your markbind-cli [command](https://markbind.org/userGuide/cliCommands.html) of choice.
then run your markbind-cli <a tags="environment--combined" href="/userGuide/cliCommands.html">command</a><a tags="environment--dg" href="https://markbind.org/userGuide/cliCommands.html">command</a> of choice.

<div id="workflow-testing">

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Generate More Dynamic Websites from Markdown Text"
</frontmatter>

<div tags="environment--ug">
<div tags="environment--ug environment--combined">

<h1 class="display-3"><md>**MarkBind**</md></h1>

Expand Down
2 changes: 1 addition & 1 deletion docs/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"pluginsContext" : {
"filterTags" : {
"tags": ["environment--ug", "environment--dg"]
"tags": ["environment--combined"]
tlylt marked this conversation as resolved.
Show resolved Hide resolved
},
"mathDelimiters": {
"delimiters": ["beg_end"]
Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/markBindInTheProjectWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ A MarkBind conversion involves the following:
- Adding a Home page: If your project already has a `README.md` or `Home.md`, the content will be copied over to `index.md`. Otherwise, a default home page will be added.
- Adding an About Us page: If your project already has `about.md`, this will be used as the About page. Otherwise, a default About page will be added.
- Adding a top navigation bar.
- Adding a site navigation menu: If your project has a valid `_Sidebar.md` file, it will be used as the [site navigation menu](https://markbind.org/userGuide/tweakingThePageStructure.html#site-navigation-menus). Otherwise, the menu will be built from your project's directory structure and contain links to all addressable pages.
- Adding a site navigation menu: If your project has a valid `_Sidebar.md` file, it will be used as the [site navigation menu]({{baseUrl}}/userGuide/tweakingThePageStructure.html#site-navigation-menus). Otherwise, the menu will be built from your project's directory structure and contain links to all addressable pages.
- Adding a custom footer: If your project has a valid `_Footer.md` file, it will be used as the website footer. Otherwise, a default footer will be added.

<box type="warning">
Expand Down
4 changes: 2 additions & 2 deletions docs/userGuide/tweakingThePageStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Next, edit the layout file to your liking, and add the `{% raw %}{{ content }}{%
<li>
<a highlight-on="exact" href="{{baseUrl}}/index.html" class="nav-link">HOME</a>
</li>
<li tags="environment--ug">
<li tags="environment--ug environment--combined">
<a highlight-on="sibling-or-child" href="{{baseUrl}}/userGuide/index.html" class="nav-link">USER GUIDE</a>
</li>
<li tags="environment--dg">
<li tags="environment--dg environment--combined">
<a highlight-on="sibling-or-child" href="{{baseUrl}}/devGuide/index.html" class="nav-link">DEVELOPER GUIDE</a>
</li>
<li slot="right">
Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/usingPlugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Plugins come as `.js` files. To install an external plugin, simply put it in the

## Writing Plugins

You may also write your own plugins! Refer [here](https://markbind.org/devdocs/devGuide/development/writingPlugins.html) for the available interfaces to do so.
You may also write your own plugins! Refer <a tags="environment--combined" href="/devGuide/development/writingPlugins.html">here</a><a tags="environment--ug" href="https://markbind.org/devdocs/devGuide/development/writingPlugins.html">here</a> for the available interfaces to do so.

{% from "njk/common.njk" import previous_next %}
{{ previous_next('settingSiteProperties', 'makingTheSiteSearchable') }}