I can upload CAD files to a MW wiki after adding the line
application/dwg dwg
to the file include/mime.types and allowing uploads for the file extension in LocalSettings.php.
But then if a page includes a link e.g. Lorem ipsum [[file:some_plan.dwg]] dolor ... it shows as an ugly text link
Lorem ipsum file:some_plan.dwg dolor ...
Clicking on this link goes instead to the file description page.
How is it possible to share non-image files via a MW wiki and to have:
a) Only a file name alias to appear as a link?
b) An icon to show with the link to indicate it's CAD file?
c) The CAD file to download with one click on the link?
d) Also allow users to upload these files?
a) To pipe a file name to some alias, preface file: with a colon e.g.
Lorem ipsum [[:file:example.dwg|some name]] dolor ...
b) For an icon to indicate a file-type. This only works for external hotlinks. Edit MediaWiki:Common.css similar to how it's done for links to PDF files.
c) See b) then use the filepath magic word e.g.
Lorem ipsum [{{filepath:example.dwg}} some alias] dolor ...
d) Users upload files as usual
Related
Why won't my images from my computer show up in my html file I had no issue using images from the web using the url. I saved my html file, css and images all in on folder but it doesn't show up on the website. This is the code I used using Sublime Text Editor.
<div>
<img src="/images/profile-pic.jpg"/>
<h1 id="myname">John Smith</h1>
<h3>Web developer</h3>
<p>{{ pause and ponder }}</p>
</div>
</div class="intro">
Another easy way to do this.
Go to your files on your system, navigate to the folder where your image is stored right click and click properties then copy out the address there.
Just give a correct path of the image in the html file and remove the forward slash (/) behind the path.
Most likely you're in a new directory and need to come back up one level. You could try:
<img src="../images/profile-pic.jpg"/>
Now on folder structure, this is how you arrange your documents.
First create a folder for your entire website. Let's call it "Codes"
Then in codes add the HTML file and name it "index"(easier for the browser to recognize when hosting) the along side the index create another folder for your additional material. Example images, font files, CSS files,videos and lot more. Name the folder asset. Then in asset, create a folder for keeping the images only, another for CSS files and another for font files.
Then you are done
Copy address from the first folder created( this is easier)
Now you provided screenshots, I can try to help better. In the folder tree, you can see folder named Portfolio and folder named Images are on same level. Because of this, when you are inside of folder Portfolio, you should navigate one level up.
Please try to use
<img src="../images/profile-pic.jpg">
My Atom text editor is not determining folders automatically. For example, if I want to put an image inside HTML, other text editors show me the path of folders automatically, but Atom doesn't. Is there any case? I am using Atom v1.47.0.
Just worked after installation of the autocomplete-paths plugin by atom-community.
so i am pretty new to this and i was wondering if the index.html file for my site is supposed to be a text file (also, i'm on Windows 10). When i create the index.html file in file explorer the file that makes the most sense to me is a text file. (The files are: bitmap image, contact, rich text document, text document, and compressed zipped folder), So i would assume i'm supposed to pick text document. The folder ends up looking like index.html.txt, not sure if this is how i'm supposed to do it.
Start notepad, or an editor of your choice.
Type in the content you want for your file.
Save-As “Index.html” in the location you desire.
Well, the file extension is in the name itself ".html" just the same as a Cascading Style Sheet (CSS) file would be saved as a ".css" file and a Javascript file as ".js"
Everything after the "." is the type of file.
Yep, everyone above answered correctly. You want to save the file in a plain-text format with a .html at the end. Then you can open it in a browser like Internet Explorer and it will interperate the file as an HTML page.
You can use a program like CoffeeCup to easily edit HTML files and it will save them as plain-text.
You can't edit HTML files in rich-text editors like Word.
I've created a very simple website in a Codecademy exercise that I'd like to upload to the Internet using Github Pages. Because you are unable to export your index.html and main.css files from Codecademy, I copy and pasted them into a word document, with the intent to get them in their proper file formats. However, I have been unable to find a source to convert these plain text files to .html and .css formats. Also, I've created an account on Github and a new repository, but the tutorial doesn't cover how to insert these two files into this repository.
How do I convert code from text in a document to .html and .css file format, and then insert these files into a Github repository? Thanks!
You don't need any special tools to convert plain text files to html or css.
You simply do it yourself as well.
Follow the steps to change .txt files to .html or .css:
Right-click on your index.txt or main.txt
Click on Rename from the list of options shown
Then it will take you to editing the file name
Navigate the cursor and delete txt
Type html in txt's place
Press Enter
Then you might receive a prompt asking if you are sure. Click on Yes/use .html whichever is appropriate for your prompt.
Voila! you have your file extension changed
Follow a similar approach to change the files to css as well
*Please note that my screenshots are from Mac OS and may look different from yours depending on the Operating system you are using
Hosting Webpages on Github:
Github pages website gives you a step by step guide with visual illustrations on how to do it.
If you are looking for a more comprehensive guide, then please refer to this page.
Seems nonsense, but after struggling a lot with Github Pages I have tested (and worked):
duplicate your first html file and rename it as index.html
drag and drop it into the /docs folder
drag and drop the remaining html files to the /docs folder (including the one you
have duplicated, of course with it´s original name)
commit changes
Goto Settings / Github pages and
Go down till “Github Pages”
Clic on the down arrow in [None] and select “main”
Clic on the down arrow in [/root] and select “/docs”
Clic on [Save]
After a few minutes you will see in [Settings] / “Github Pages”
Your site is published at
https://your_account_name.github.io/your_repo_name/
I am creating lots of link in my page and mostly the text file is being opened when user click on link. But some files are being downloaded. I cannot understand why, because the format is the same (file name is dat_chsa_create_existing.2.diff)
DIFF