docs: Move slint language docs from langref to language folder

This commit is contained in:
Tobias Hunger 2023-02-22 20:15:48 +01:00 committed by Tobias Hunger
parent 39d215bee0
commit 0867aa1ed9
47 changed files with 7 additions and 7 deletions

View file

@ -48,7 +48,7 @@
}, },
{ {
"languageId": "restructuredtext", "languageId": "restructuredtext",
"words": ["genindex", "langref", "modindex", "toctree"], "words": ["genindex", "modindex", "toctree"],
"ignoreRegExpList": ["/:.+:/"] "ignoreRegExpList": ["/:.+:/"]
}, },
{ {

View file

@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut tests_file = std::fs::File::create(&tests_file_path)?; let mut tests_file = std::fs::File::create(&tests_file_path)?;
let prefix = Path::new(env!("CARGO_MANIFEST_DIR")).join("../..").canonicalize()?; let prefix = Path::new(env!("CARGO_MANIFEST_DIR")).join("../..").canonicalize()?;
for entry in std::fs::read_dir(prefix.join("docs/langref/src"))? for entry in std::fs::read_dir(prefix.join("docs/language/src"))?
.chain(std::fs::read_dir(prefix.join("docs"))?) .chain(std::fs::read_dir(prefix.join("docs"))?)
.chain(std::fs::read_dir(prefix.join("docs/recipes"))?) .chain(std::fs::read_dir(prefix.join("docs/recipes"))?)
{ {

View file

@ -38,7 +38,7 @@ pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
let root = super::root_dir(); let root = super::root_dir();
let path = root.join("docs/langref/src/builtin_enums.md"); let path = root.join("docs/language/src/builtin_enums.md");
let mut file = std::fs::File::create(&path).context(format!("error creating {path:?}"))?; let mut file = std::fs::File::create(&path).context(format!("error creating {path:?}"))?;
file.write_all( file.write_all(

View file

@ -273,8 +273,8 @@ lazy_static! {
("^\\.reuse/dep5$", LicenseLocation::NoLicense), // .reuse files have no license headers ("^\\.reuse/dep5$", LicenseLocation::NoLicense), // .reuse files have no license headers
("^api/cpp/docs/Pipfile$", LicenseLocation::NoLicense), ("^api/cpp/docs/Pipfile$", LicenseLocation::NoLicense),
("^api/cpp/docs/conf.py$", LicenseLocation::NoLicense), ("^api/cpp/docs/conf.py$", LicenseLocation::NoLicense),
("^docs/langref/Pipfile$", LicenseLocation::NoLicense), ("^docs/language/Pipfile$", LicenseLocation::NoLicense),
("^docs/langref/conf.py$", LicenseLocation::NoLicense), ("^docs/language/conf.py$", LicenseLocation::NoLicense),
("^editors/tree-sitter-slint/binding.gyp$", LicenseLocation::NoLicense), // liberal license ("^editors/tree-sitter-slint/binding.gyp$", LicenseLocation::NoLicense), // liberal license
("^editors/tree-sitter-slint/test-to-corpus.py$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())), ("^editors/tree-sitter-slint/test-to-corpus.py$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())),
("^editors/tree-sitter-slint/corpus/", LicenseLocation::NoLicense), // liberal license ("^editors/tree-sitter-slint/corpus/", LicenseLocation::NoLicense), // liberal license

View file

@ -58,7 +58,7 @@ fn symlink_files_in_dir<S: AsRef<Path>, T: AsRef<Path>, TS: AsRef<Path>>(
pub fn generate(show_warnings: bool) -> Result<(), Box<dyn std::error::Error>> { pub fn generate(show_warnings: bool) -> Result<(), Box<dyn std::error::Error>> {
let root = super::root_dir(); let root = super::root_dir();
let docs_source_dir = root.join("docs/langref"); let docs_source_dir = root.join("docs/language");
let docs_build_dir = root.join("target/slintdocs"); let docs_build_dir = root.join("target/slintdocs");
let html_static_dir = docs_build_dir.join("_static"); let html_static_dir = docs_build_dir.join("_static");
@ -69,7 +69,7 @@ pub fn generate(show_warnings: bool) -> Result<(), Box<dyn std::error::Error>> {
symlink_files_in_dir( symlink_files_in_dir(
&docs_source_dir, &docs_source_dir,
&docs_build_dir, &docs_build_dir,
["..", "..", "docs", "langref"].iter().collect::<PathBuf>(), ["..", "..", "docs", "language"].iter().collect::<PathBuf>(),
) )
.context(format!("Error creating symlinks from docs source {docs_source_dir:?} to docs build dir {docs_build_dir:?}"))?; .context(format!("Error creating symlinks from docs source {docs_source_dir:?} to docs build dir {docs_build_dir:?}"))?;