Using fossil embedded documents - fossil

I'm using fossil to manage some home projects and keeping notes in the wiki. After running like this for a few months, I'd like to at least try to use embedded documentation; mainly so as to be able easily to go back to previous versions.
I've studied the website page about managing project documentation which confirms that this is a technique I want to follow up, but I can't make out how to do it.
I've cut-and-pasted one of my wiki pages and added it to my fossil repo, but I can't work out where it should go in the directory structure to be accessible as described on the above page.
I've tried in a few places none of which worked. The document is currently %fossil-root%\doc\foo.wiki, (I'm on Windows), where %fossil-root% is the directory holding _ _FOSSIL__ (slighly mangled filename because of markdown), but having started a server with fossil ui, when I point my browser at http://localhost:8080/doc/foo.wiki, fossil presents me with a nicely formatted page saying it can't find index.html. I created /doc/index.html to see what would happen, but it made no difference.
Please can someone help me out, and/or point me to an example repository containing embedded documentation or another "how-to" document.

If your document is located in %fossil-root%\doc\foo.wiki, you can access it at the following URL:
http://localhost:8080/doc/trunk/doc/foo.wiki
This URL breaks down as follows:
http://localhost:8080 is the root URL to access Fossil when you run fossil ui
/doc signals that you want to access embedded documentation
/trunk indicates the checkin containing the documentation you wish to access
/doc/foo.wiki is the path of the document inside the repository
Instead of trunk, you can also specify a tag, or a branch name, or even a hexadecimal checkin identifier.
In the URL you were using, http://localhost:8080/doc/foo.wiki, foo.wiki is interpreted as the checkin name, and no document path is specified, which logically means Fossil won't find anything.
As for an example repository containing embedded documentation, the homepage of the Fossil website itself is a prime example:
https://www.fossil-scm.org/index.html/doc/trunk/www/index.wiki
where
https://www.fossil-scm.org/index.html is Fossil's root URL
/doc indicates a request for embedded documentation
/trunk indicates we want to fetch files from the trunk
/www/ is the path to the requested file inside the repository
index.wiki is the name of the file inside the repository.
So, in the 'trunk' branch of the repository, the file www/index.wiki contains the home page of the Fossil website.

You simply need to put the documentation under the %fossil-root%\www\ directory (or any other directory under version control) in your repository and then you can, for example, add the following line to your header's mainmenu section to link to it:
html "<a href='$home/doc/trunk/www/foo.wiki'>Documentation</a>\n"
As I said, it can be any directory under version control. To test this, pick any file in the repository, let's say a README file at the top level, and go to http://localhost:8080/doc/trunk/README. You should see the README file load up in your browser in a raw text format. By putting wiki or html files under a particular directory such as www you make it easy to organize the files that you specifically want rendered as documentation, which makes it easier to link to them.

http://www.fossil-scm.org/index.html/doc/trunk/www/embeddeddoc.wiki
After fossil 1.33, just prepare your document in the repository.
If the wiki file is put in
/doc/index.wiki
And use web browser to setup -> Admin -> Configuration.
There is a "Index Page" field, fill in your main index.html.
For example:
/doc/trunk/doc/index.wiki
Or if you just want the released version:
/doc/<version>/doc/index.wiki

Related

Syncing code on static site between multiple html pages?

I have a large website with several consistent text, like the nav, contact, footer, etc. I was wondering how I could keep all of these consistent on my static website (hosted on github pages) by loading the code from another file or any other method, since currently I have to manually update everything and it takes a while.
Github pages uses Jekyll as the underlying static site generator. You can break down your site into multiple smaller html pages that can be included into a main layout.
https://jekyllrb.com/docs/includes/
The include tag allows you to include the content from another file
stored in the _includes folder:
{% include footer.html %}
Jekyll will look for the referenced file (in this case, footer.html)
in the _includes directory at the root of your source directory and
insert its contents.
Read the documentation on this and you can easily find repeated text/html and replace them with includes.
If you're not already, this site has instructions so you can run jekyll locally to verify changes before pushing the changes to Github.

VuePress build deletes CNAME file in ./docs needed for Github Pages custom domain

I'm trying to get VuePress to work well with GitHub Pages and a custom domain. I have the site working -- https://www.southertonrr.com (repo) -- as long as I manually add a CNAME file to my output folder ('./dest', or in my case, './docs', because that's where GitHub Pages looks for the site) every time after I issue a build command. Otherwise, I assume the build command deletes everything in my output folder and rebuilds the entire site.
Is there a way to get vuepress build to either leave that file alone, or copy a CNAME file from my ./src to my ./docs? Should I be looking at the configureWebpack config to use webpack to do it? (I'm new to webpack.)
Different product completely, but I noticed that Docusaurus for React has a CNAME config setting that does this for you, so I thought I'd check to see if the VuePress community had something similar.
See relative document
Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components - for example, favicons and PWA icons. In such cases, you can put them inside .vuepress/public and they will be copied to the root of the generated directory.

Host Hugo website on github-pages

I created a static website using Hugo and I don't know how to host it on github. The documentation on their website didn't help me.
After finishing my website, I created the public folder which contains in theory all the files needed for the website (whith this command : hudo -t hyde-hyde). When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
How should I porceed to generate correctly my website and host it on github ? Thanks.
How to create with HUGO
If you have a problem while creating your site, check this tutorial.
How to Host HUGO website on GitHub (Pages)
Check this LINK where it shows you step by step all the procedures to host HUGO on GitHub, on both User/Organization Pages and on Project Pages.
Check list:
When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
I know it might seem a little too obvious, but check the spelling. Sometimes you spend hours trying to find the error and it's just a typo, this case in the theme you wanted to.
Have you tried another browser? It might not be the case, but checking it will get you out of doubt, also remember to delete the cache just in case.
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
Do you have a User/Organization Page (syntax: username.github.io) or a Project Page (syntax: username.github.io/project)?
UPDATE 1: Follow the instructions on this video for hosting on GitHub if unclear.
Could you add a link to your repo? Thanks.

dotCMS backup from .zip

I have a problem with dotCMS. I have a site which is uploaded to the Internet and I want to export it to take care of this site locally on my computer. I've downloaded all data/assets from Maintenance -> Export dotCMS Content. I have a zip file with all content from this site. I managed and configured dotCMS locally on my computer. I have no idea how I can get access in dotCMS to my site from that zip file. In Maintenance menu I have no option to upload this site. I've read about folder dotCMS/starter.zip but I don't have anything like that. Can anyone tell step by step, how can I manage my site from zip file locally? Thx
Create a new database for dotCMS and replace the starter.zip with your downloaded .zip. Start dotCMS and it should import your site on initial startup. There are some caveats - the databases and versions should match from the server you've downloaded the .zip from.
So to add a couple things to Will's answer in case a few more details help:
The easiest way to do what Will advised may be to start with a new dotCMS distribution.
Make sure the versions of both dotCMS and the database in the new installation match those of the site you made the backup from.
Go through all the normal install steps (including setting up a database), but before you actually start dotCMS, replace the starter.zip file in the ROOT (/dotserver/tomcat-8.0.18/webapps/ROOT) with your own ZIP file (renaming your file to starter.zip).
Alternately, if you want to start with an existing install.
You still need to make sure the dotCMS and database versions match those of the site you backed up.
You still need to replace the starter.zip file with your backup ZIP file.
In addition, make sure you create a new DB (and update the context.xml file to point to it) before you start up dotCMS. If you don't do this, the starter.zip file (your backup) will not get read when dotCMS starts up.

Embedding a functional website inside a Squarespace webpage

First of all, thank you for everything that you do. Without this community, I would hate web design and be reliant on my teacher's outdated, static methods. Much love <3
So, this is a tricky one (maybe).
I want to have, essentially, an iframe on a webpage that contains a website I coded previously. It was a project for school that never went live, but I'd like to include it as part of my portfolio. Problem is, an iframe needs a URL for a source, but I just have the folder with more folders full of code, fonts, and images. How can I tell the browser to populate this box with everything from "name" folder? And then how will it know to run the code instead of just showing a file tree or something?
In the end, I want a page describing a previous web project and let the client experience that project within the one page. And I don't want to get a domain for every project I do.
Maybe there's an easier way I'm not thinking of?
To make it interesting, my new portfolio site is being made in Squarespace...maybe. I bought a domain from them because I had a promo code and wanted to try the platform, but I kind of hate it. I can't change any of the code and it won't maintain a connection to Typekit. So all I can do is change the basic appearance of preexisting elements. It's like WordPress all over again....LAME! Sadly, I already bought the domain.
Can Squarespace just be a host? Is there a way to download the raw code of these templates, edit it, and upload it again?
Thanks for all your help!
I want to have, essentially, an iframe on a webpage that contains a
website I coded previously.
Squarespace's file upload mechanism is very limited. Without using the Developers Platform, there is no effective way to upload many files at once. Furthermore, there is no way to create folders. Therefore, even if you were willing to upload each .html file and each asset one-by-one, there'd be no way to organize the files into folders (assuming that the "tree" you mentioned includes additional sub-folders).
Initially, in order to get the files to be accessible by Squarespace, you'd have to do one of the following:
Use Squarespace Developers Platform (A.K.A. "Developer Mode") and upload your to-be-iframed
(TBI) website files to the "assets" folder using SFTP or Git.
Host your TBI website files somewhere else (a different host
environment, for example) which will maintain your file/folder
structure.
How can I tell the browser to populate this box with everything from
"name" folder? And then how will it know to run the code instead of
just showing a file tree or something?
Assuming that the TBI website has an index.html file or home.html file or similar, and assuming you were to use the Squarespace Developer Platform, you'd insert the iframe either in a Code Block or within a template/.region file directly using something like
<iframe src="/assets/tbiwebsitefolder/index.html"></iframe>
while setting your other iframe attributes (such as height and width) as needed.
Is there a way to download the raw code of these templates, edit it,
and upload it again?
Yes. You select a template and then enable Developer Mode on that template. From there, you use SFTP or Git to download the template files, edit, and reupload.
You may benefit by reviewing some considerations of enabling Developer Mode on a Squarespace Template.
One other idea, to avoid the iframe and Developer Mode entirely, would be to capture images of the TBI website rendered in a browser, and then simply add those images to a gallery block or gallery page. This could allow you to convey the general idea of the project but would of course not capture the full "experience" of it.