Skip to content

Commit

Permalink
Merge branch 'main' into gvkries/user-graphql-15540
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco authored Apr 22, 2024
2 parents f7a0418 + 2a628f7 commit 7dab147
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@

TagBuilder tag = Tag(Model, "a");
tag.Attributes["id"] = null;
tag.Attributes["href"] = Model.Href;

if (Model.Href.ToString() == "#")
if (Model.Href == null || Model.Href.ToString() == "#")
{
tag.Attributes["href"] = "#m" + Model.GetHashCode().ToString();
}
else
{
tag.Attributes["href"] = Model.Href;
}

var prefix = "icon-class-";

// Extract classes that are not icons from Model.Classes
// Extract classes that are not icons from Model.Classes.
var notIconClasses = ((IEnumerable<string>)Model.Classes)
.ToList()
.Where(c => !c.StartsWith(prefix, StringComparison.OrdinalIgnoreCase));
.Where(c => !c.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
.ToArray();

if (notIconClasses.Count() > 0)
if (notIconClasses.Length > 0)
{
tag.Attributes["class"] = string.Join(" ", notIconClasses);
tag.Attributes["class"] = string.Join(' ', notIconClasses);
}

tag.AddCssClass("item-label d-flex");
Expand Down
6 changes: 3 additions & 3 deletions src/docs/topics/docs-contributions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Do the following if you're adding docs for a newly developed extension, or if yo

With MkDocs you can get the full docs.orchardcore.net experience locally too. If you are looking to contribute substantial amount of docs then please do run the site locally to make sure what you write will actually look like it should.

1. Follow the [MkDocs installation guide](https://www.mkdocs.org/#installation) to install Python. once you have Python installed you won't need to install MkDocs by hand, we'll do that in a next step. If you're on Windows be sure to add the Python `Scripts` folder to the `PATH` as noted there, otherwise none of the `mkdocs` commands will be found. You may need to add your user's Scripts folder (something like `C:\Users\<user name>\AppData\Roaming\Python\Python39\Scripts`) to the `PATH` too.
1. Follow the [MkDocs installation guide](https://www.mkdocs.org/user-guide/installation/) to install Python, PIP and MkDocs. If you already have a fresh enough Python installation, you can simply run `pip install mkdocs`.
2. Open a command line in the root of your clone of the repository.
3. Run `pip3 install -r src/docs/requirements.txt` to install dependencies.
4. Run `mkdocs serve` to start the site. You'll then be able to browse it under <http://127.0.0.1:8000>.
3. Run `pip install -r src/docs/requirements.txt` to install dependencies.
4. Run `python -m mkdocs serve` to start the site. You'll then be able to browse it under <http://127.0.0.1:8000>.

0 comments on commit 7dab147

Please sign in to comment.