Skip to content

Commit

Permalink
Adjust the submodule issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rpsene committed Apr 27, 2024
1 parent d778fb0 commit b1ad901
Show file tree
Hide file tree
Showing 41 changed files with 1,566 additions and 11,194 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "docs-resources"]
path = docs-resources
url = https://github.com/riscv/docs-resources.git
200 changes: 0 additions & 200 deletions build/images/stem-1e8e163e1531cbeba91c4a43fc294331.svg

This file was deleted.

215 changes: 0 additions & 215 deletions build/images/stem-466183e87f695e3be086d156da0dc43c.svg

This file was deleted.

191 changes: 0 additions & 191 deletions build/images/stem-4f126504230fb6043d56b4613b87d32a.svg

This file was deleted.

245 changes: 0 additions & 245 deletions build/images/stem-55f186b17f5b72a18df43cb8d870ac41.svg

This file was deleted.

239 changes: 0 additions & 239 deletions build/images/stem-7b7f4632e365a1bf06c078a3717374b5.svg

This file was deleted.

245 changes: 0 additions & 245 deletions build/images/stem-7e97bcc12c709952185c5c0c82613b20.svg

This file was deleted.

236 changes: 0 additions & 236 deletions build/images/stem-c1511cc054ef443df34ab2716100d25f.svg

This file was deleted.

9,619 changes: 0 additions & 9,619 deletions build/riscv-cove.html

This file was deleted.

1 change: 0 additions & 1 deletion docs-resources
Submodule docs-resources deleted from 005cb0
395 changes: 395 additions & 0 deletions docs-resources/LICENSE

Large diffs are not rendered by default.

195 changes: 195 additions & 0 deletions docs-resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# RISC-V Documentation Resources
This repository (repo) contains the resources needed to build docs with the RISC-V themes, fonts, and logos.

Specification repos created after January 2022 are generally created from the
[docs-spec-template](https://github.com/riscv/docs-spec-template) repository and will
have all the requisites parts included in a basic document.

Older repos can be updated with 3 basic steps:

1. Update the directory structure to reference the docs-resources, (this) repository.
2. Update the main AsciiDoc source file to include new variables needed for build.
3. Update the `Makefile` to build using the new resources.

## Updating the directory structure
The three main directories in this repo contain various components of the RISC-V documentation
template. The `docs-resources/images/` directory has artwork like the RISC-V logo. The `docs-resources/fonts/`
directory contains the necessary fonts. And, the `docs-resources/themes/` directory contains the YAML file
for configuring the document.

In order to be able to link a repo with this project, you must use
[Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules). While there are many ways to do this,
we will take the simplest approach and use the submodule defaults,
placing a `docs-resources/` directory in the repo head. This can be accomplished by executing
the following command in the top project directory (assuming http access):

```
git submodule add https://github.com/riscv/docs-resources.git
```

This command will create a `docs-resources/` directory when completed. Additionally, the `git status`
command should show new files of `docs-resources` and either a new or modified file of `.gitmodules`
depending upon whether Git Submodules are already in use in the project.

**Note:** The use of Submodules creates a “link” in Git between projects that are tied to
specific commit id. This provides “safety” for the including projects by making sure that
they don’t inadvertently get broken. However, it creates an additional maintenance responsibility
to intermittently rebase the link and verify that nothing has been broken. Project maintainers need to
understand this and plan accordingly.

## Updating the main AsciiDoc source file
From the `Makefile`, find the main AsciiDoc file that is used to build the project.
It usually has the same base name as the .pdf which is generated.

Open this file and ensure that the following variables are added to top the document:

```
// These variables need customization for the specification
:description: Short, text description of spec…
:revdate: Month day, Year
:revnumber: X.Y.Z
:revremark: This document is in Development state. Change should be expected.
// These variables should not require customization
:company: RISC-V
:url-riscv: http://riscv.org
:doctype: book
:preface-title: Preamble
:colophon:
:appendix-caption: Appendix
:title-logo-image: image:docs-resources/images/risc-v_logo.svg[pdfwidth=3.25in,align=center]
// Settings:
:experimental:
:reproducible:
:WaveDromEditorApp: wavedrom-cli
:icons: font
:lang: en
:listing-caption: Listing
:sectnums:
:sectnumlevels: 5
:toclevels: 5
:toc: left
:source-highlighter: pygments
ifdef::backend-pdf[]
:source-highlighter: coderay
endif::[]
:data-uri:
:hide-uri-scheme:
:stem: latexmath
:footnote:
:xrefstyle: short
```

The variables in the first section above should be visited and updated as appropriate.
Additionally, any variables which already exist in the document should be evaluated
for the better value, which most likely is the template value specified above for anything
in the document.

## Updating the `Makefile`
Typical build invocations for basic AsciiDoc builds look like this:

```
%.pdf: %.adoc
asciidoctor-pdf $<
```

To build using the RISC-V template, this statement needs to look like this:
```
%.pdf: %.adoc
asciidoctor-pdf \
-a toc \
-a compress \
-a pdf-theme=docs-resources/themes/riscv-pdf.yml \
-a pdf-fontsdir=docs-resources/fonts \
-o $@ $<
```

**Note:** if you want to include a bibliography, you can include a
“-r asciidoctor-bibtex” statement. Likewise, to use various diagramming
capabilities, you can include “-r asciidoctor-diagram”.

## Additional items to consider for the document

### License and copyright statements
While making updates to documents, ensure that a License statement is included near the front
of the document, preferably in the Preamble. The Asciidoc text for this should look something like this:

```
[NOTE]
.Copyright and licensure:
====
This work is licensed under a
link:http://creativecommons.org/licenses/by/4.0/[Creative Commons Attribution 4.0 International License].
This work is Copyright 2022 by RISC-V International.
====
```

### Document state markings
Document state should be reflected in the `:revmark:` variable and be contained in
an in-document admonition statement near the front of the document (Preface or Preamble).

The recommended values for `:revmark:` and the front matter admonition based on the document
state are as follows:

* For **Discussion Document** state, use:
* `:revmark: This document is in Discussion state. Change should be expected.`
* Formal admonition text:
```
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Discussion state]
====
Assume everything can change. This document is not complete yet and was created only
for the purpose of conversation outside of the document.
====
```
* For **Development** state, use:
* `:revmark: This document is in Development state. Change should be expected.`
* Formal admonition text:
```
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Development state]
====
Assume everything can change. This draft specification will change before being accepted
as standard, so implementations made to this draft specification will likely not conform
to the future standard.
====
```
* For **Stable** state, use:
* `:revmark: This document is in Stable state. Assume it may change.`
* Formal admonition text:
```
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Stable state]
====
Assume anything could still change, but limited change should be expected.
====
```
* For **Frozen** state, use:
* `:revmark: This document is in Frozen state. Change is extremely unlikely.`
* Formal admonition text:
```
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Frozen state]
====
Change is extremely unlikely. A high threshold will be used, and a change
will only occur because of some truly critical issue being identified during
the public review cycle. Any other desired or needed changes can be the subject
of a follow-on new extension.
====
```
* For **Ratified** state, use:
* `:revmark: This document is in Ratified state. No changes are allowed.`
* Formal admonition text:
```
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Ratified state]
====
No changes are allowed. Any desired or needed changes can be the subject
of a follow-on new extension. Ratified extensions are never revised.
====
```

# Additional information
For additional information, see the [docs-dev-guide/example.pdf](https://github.com/riscv/docs-dev-guide/blob/main/example.pdf) or reach out to
[email protected].
Binary file added docs-resources/fonts/Montserrat-ExtraLight.ttf
Binary file not shown.
Binary file not shown.
Binary file added docs-resources/fonts/Montserrat-Italic.ttf
Binary file not shown.
Binary file added docs-resources/fonts/Montserrat-Light.ttf
Binary file not shown.
Binary file added docs-resources/fonts/Montserrat-Medium.ttf
Binary file not shown.
Binary file added docs-resources/fonts/Montserrat-MediumItalic.ttf
Binary file not shown.
Binary file added docs-resources/fonts/Montserrat-Regular.ttf
Binary file not shown.
93 changes: 93 additions & 0 deletions docs-resources/fonts/OFL-M.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
93 changes: 93 additions & 0 deletions docs-resources/fonts/OFL-P.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2019 The Petrona Project Authors (https://github.com/RingoSeeber/Petrona)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Loading

0 comments on commit b1ad901

Please sign in to comment.