diff --git a/.github/workflows/Test.yaml b/.github/workflows/Test.yaml index deebdd1795..d63617e325 100644 --- a/.github/workflows/Test.yaml +++ b/.github/workflows/Test.yaml @@ -73,3 +73,5 @@ jobs: run: make analysis - name: "Graphs" run: make graphs + - name: "Website" + run: make website diff --git a/code/Makefile b/code/Makefile index b7ac515781..b58ba109c9 100644 --- a/code/Makefile +++ b/code/Makefile @@ -75,7 +75,7 @@ BC_EXAMPLES = $(addsuffix $(BC_E_SUFFIX), $(EXAMPLES)) EXAMPLE_GEN_TARGET = GEN TEST TEX CODE DCP -GENNED_FOLDERS = $(ANALYSIS_FOLDER_NAME) $(BUILD_FOLDER_NAME) $(DEPLOY_FOLDER_NAME) $(DOCS_FOLDER_NAME) $(GRAPH_FOLDER_NAME) $(LOG_FOLDER_NAME) $(TRACEY_GRAPHS_FOLDER_NAME) +GENNED_FOLDERS = $(ANALYSIS_FOLDER_NAME) $(BUILD_FOLDER_NAME) $(DEPLOY_FOLDER_NAME) $(DOCS_FOLDER_NAME) $(GRAPH_FOLDER_NAME) $(LOG_FOLDER_NAME) $(TRACEY_GRAPHS_FOLDER_NAME) $(WEBSITE_FOLDER_PATH) CLEAN_GF_PREFIX = clean_ CLEAN_FOLDERS = $(addprefix $(CLEAN_GF_PREFIX), $(GENNED_FOLDERS)) @@ -113,6 +113,8 @@ TRACEY_GRAPH_FOLDER = $(TRACEY_GRAPH_FOLDER_NAME)/ TRACEY_GRAPHS_FOLDER_NAME = traceygraphs TRACEY_GRAPHS_FOLDER = $(TRACEY_GRAPHS_FOLDER_NAME)/ TRACEY_GRAPH_NAMES = allvsall allvsr avsa avsall refvsref +WEBSITE_FOLDER_NAME = Website +WEBSITE_FOLDER_PATH = drasil-website/$(WEBSITE_FOLDER_NAME) # make command line options # GHC debug options PROFALL = --executable-profiling --library-profiling diff --git a/code/drasil-docLang/Drasil/DocumentLanguage/TraceabilityGraph.hs b/code/drasil-docLang/Drasil/DocumentLanguage/TraceabilityGraph.hs index 1cf5817e5d..2d70ae423a 100644 --- a/code/drasil-docLang/Drasil/DocumentLanguage/TraceabilityGraph.hs +++ b/code/drasil-docLang/Drasil/DocumentLanguage/TraceabilityGraph.hs @@ -176,7 +176,7 @@ traceyGraphPath :: String -> String -> String traceGFiles = ["avsa", "avsall", "refvsref", "allvsr", "allvsall"] traceGUIDs = ["TraceGraphAvsA", "TraceGraphAvsAll", "TraceGraphRefvsRef", "TraceGraphAllvsR", "TraceGraphAllvsAll"] traceyGraphPaths ex = map (\x -> resourcePath ++ concat (words ex) ++ "/" ++ x ++ ".svg") traceGFiles -traceyGraphGetRefs ex = map makeFigRef traceGUIDs ++ zipWith (\x y -> Reference (x ++ "Link") (URI y) (shortname' $ S x) None) traceGUIDs (traceyGraphPaths $ concat $ words ex) +traceyGraphGetRefs ex = map makeFigRef traceGUIDs ++ zipWith (\x y -> Reference (x ++ "Link") (URI y) (shortname' $ S x)) traceGUIDs (traceyGraphPaths $ concat $ words ex) -- for actual use in creating the graph figures traceyGraphPath ex f = resourcePath ++ concat (words ex) ++ "/" ++ f ++ ".svg" diff --git a/code/drasil-website/Drasil/Website/Analysis.hs b/code/drasil-website/Drasil/Website/Analysis.hs index 42b17d7a97..099a03944a 100644 --- a/code/drasil-website/Drasil/Website/Analysis.hs +++ b/code/drasil-website/Drasil/Website/Analysis.hs @@ -18,8 +18,8 @@ drasilDataTableTitle = S "Drasil Data Table" dataTableDesc path = S "Here is the updated" +:+ namedRef (dataTableHTMLRef path) (S "Data Table") +:+ S "for the Drasil framework. There is also a" +:+ namedRef (dataTableCSVRef path) (S "downloadable version") +:+ S "(csv format)." dataTableHTMLPath = "DataTable/DataTable.html" dataTableCSVPath = "DataTable/DataTable.csv" -dataTableHTMLRef path = Reference "dataTableHTML" (URI (path ++ dataTableHTMLPath)) (shortname' $ S "dataTableHTML") None -dataTableCSVRef path = Reference "dataTableCSV" (URI (path ++ dataTableCSVPath)) (shortname' $ S "dataTableCSV") None +dataTableHTMLRef path = Reference "dataTableHTML" (URI (path ++ dataTableHTMLPath)) (shortname' $ S "dataTableHTML") +dataTableCSVRef path = Reference "dataTableCSV" (URI (path ++ dataTableCSVPath)) (shortname' $ S "dataTableCSV") analysisSecRef :: Reference analysisSecRef = makeSecRef "Analysis" $ S "Analysis" diff --git a/code/drasil-website/Drasil/Website/Body.hs b/code/drasil-website/Drasil/Website/Body.hs index d1da36d65f..90a6df578f 100644 --- a/code/drasil-website/Drasil/Website/Body.hs +++ b/code/drasil-website/Drasil/Website/Body.hs @@ -22,8 +22,8 @@ printSetting fl = PI (symbMap fl) Equational defaultConfiguration -- Instead of being an SRSDecl, this takes the folder locations and generates the document from there. mkWebsite :: FolderLocation -> Document mkWebsite fl = - --Document Title author (hack for now to show up in proper spot) [Section] - Document (S websiteTitle) (namedRef gitHubRef (S "Link to GitHub Repository")) $ sections fl + --Document -- Title -- author (hack for now to show up in proper spot) -- no table of contents -- [Section] + Document (S websiteTitle) (namedRef gitHubRef (S "Link to GitHub Repository")) NoToC $ sections fl -- Folder locations based on environment variables (using getEnv on Main.hs) data FolderLocation = Folder { @@ -110,7 +110,7 @@ imageRef = makeFigRef "Drasil" -- Used for the repository link. gitHubRef :: Reference -gitHubRef = Reference "gitHubRepo" (URI gitHubInfoURL) (shortname' $ S "gitHubRepo") None +gitHubRef = Reference "gitHubRepo" (URI gitHubInfoURL) (shortname' $ S "gitHubRepo") -- Hardcoded info for the title, URL, and image path. websiteTitle :: String diff --git a/code/drasil-website/Drasil/Website/Documentation.hs b/code/drasil-website/Drasil/Website/Documentation.hs index d82a889e46..300bc0226b 100644 --- a/code/drasil-website/Drasil/Website/Documentation.hs +++ b/code/drasil-website/Drasil/Website/Documentation.hs @@ -18,8 +18,8 @@ haddockDocsTitle = S "Haddock Documentation" haddockDocsDesc path = S "The current" +:+ namedRef (docsRef path) (S "Haddock documentation") +:+ S "for the Drasil framework. A variant with" +:+ namedRef (fullDocsRef path) (S "fully exposed modules") +:+ S "is also available." docsPath = "index.html" fullDocsPath = "full/index.html" -docsRef path = Reference "haddockDocs" (URI (path ++ docsPath)) (shortname' $ S "HaddockDocs") None -fullDocsRef path = Reference "fullHaddockDocs" (URI (path ++ fullDocsPath)) (shortname' $ S "fullHaddockDocs") None +docsRef path = Reference "haddockDocs" (URI (path ++ docsPath)) (shortname' $ S "HaddockDocs") +fullDocsRef path = Reference "fullHaddockDocs" (URI (path ++ fullDocsPath)) (shortname' $ S "fullHaddockDocs") docsSecRef :: Reference docsSecRef = makeSecRef "Documentation" $ S "Documentation" diff --git a/code/drasil-website/Drasil/Website/Example.hs b/code/drasil-website/Drasil/Website/Example.hs index 6d5535c7eb..3975d60fb9 100644 --- a/code/drasil-website/Drasil/Website/Example.hs +++ b/code/drasil-website/Drasil/Website/Example.hs @@ -128,21 +128,21 @@ projectileCase5Dox = ["cpp", "csharp", "java", "python"] -- Make references for each of the generated SRS files getHTMLRef, getPDFRef :: FilePath -> String -> Reference -getHTMLRef path ex = Reference ("htmlRef" ++ ex) (URI (getHTMLPath path ex)) (shortname' $ S ("htmlRef" ++ ex)) None -getPDFRef path ex = Reference ("pdfRef" ++ ex) (URI (getPDFPath path ex)) (shortname' $ S ("pdfRef" ++ ex)) None +getHTMLRef path ex = Reference ("htmlRef" ++ ex) (URI (getHTMLPath path ex)) (shortname' $ S ("htmlRef" ++ ex)) +getPDFRef path ex = Reference ("pdfRef" ++ ex) (URI (getPDFPath path ex)) (shortname' $ S ("pdfRef" ++ ex)) getHTMLPath, getPDFPath :: FilePath -> String -> FilePath getHTMLPath path ex = path ++ ex ++ "/srs/" ++ ex ++ "_SRS.html" getPDFPath path ex = path ++ ex ++ "/srs/" ++ ex ++ "_SRS.pdf" -- Make display names and references for generated code and docs getCodeRef, getDoxRef :: FilePath -> String -> String -> (Sentence, Reference) -getCodeRef path ex lang = (S ("[" ++ convertlang ++ "]"), Reference ("codeRef" ++ ex ++ lang) (URI (getCodePath path ex lang)) (shortname' $ S ("codeRef" ++ ex ++ lang)) None) +getCodeRef path ex lang = (S ("[" ++ convertlang ++ "]"), Reference ("codeRef" ++ ex ++ lang) (URI (getCodePath path ex lang)) (shortname' $ S ("codeRef" ++ ex ++ lang))) where convertlang | lang == "cpp" = "C++" | lang == "csharp" = "C Sharp" -- Drasil printers dont like the # symbol, so we use the full word. | otherwise = (toUpper.head) lang : tail lang -getDoxRef path ex lang = (S ("[" ++ convertlang lang ++ "]"), Reference ("doxRef" ++ ex ++ lang) (URI (getDoxPath path ex lang)) (shortname' $ S ("doxRef" ++ ex ++ lang)) None) +getDoxRef path ex lang = (S ("[" ++ convertlang lang ++ "]"), Reference ("doxRef" ++ ex ++ lang) (URI (getDoxPath path ex lang)) (shortname' $ S ("doxRef" ++ ex ++ lang))) where convertlang l | l == "cpp" = "C++" diff --git a/code/drasil-website/Drasil/Website/Graphs.hs b/code/drasil-website/Drasil/Website/Graphs.hs index 6dfdc9a55c..22bc629fee 100644 --- a/code/drasil-website/Drasil/Website/Graphs.hs +++ b/code/drasil-website/Drasil/Website/Graphs.hs @@ -17,7 +17,7 @@ drasilDepGraphRefs :: FilePath -> [Reference] packDepGraphTitle = S "Package Dependency Graphs" drasilFolders = ["drasil-build", "drasil-code", "drasil-data", "drasil-database", "drasil-docLang", "drasil-example", "drasil-gen", "drasil-gool", "drasil-lang", "drasil-printers", "drasil-theory", "drasil-utils"] drasilDepGraphPaths path = map (\x -> path ++ x ++ ".pdf") drasilFolders -drasilDepGraphRefs path = zipWith (\x y -> Reference x (URI y) (shortname' $ S x) None) drasilFolders $ drasilDepGraphPaths path +drasilDepGraphRefs path = zipWith (\x y -> Reference x (URI y) $ shortname' $ S x) drasilFolders $ drasilDepGraphPaths path folderList :: FilePath -> RawContent folderList path= Enumeration $ Bullet $ zip (folderList' path) $ repeat Nothing